LXD Containers Mount Host Folders

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ก.ย. 2024
  • Docker containers have to mount folders on the docker host to have persistent data. LXD containers have a read/write file system unlike Docker so accessing host files is normally not necessary.
    In this video, I show how to mount host folders from a Docker container and make them read/write.
    Show notes: discussion.sco...
    ------------
    Come visit us at: www.scottibyte...
    Discourse: : discussion.sco...
    RocketChat: chat.scottibyt...

ความคิดเห็น • 16

  • @thompsonexp
    @thompsonexp หลายเดือนก่อน

    This instruction was quite helpful for me. I could not find this info anywhere else. Thank you.

    • @scottibyte
      @scottibyte  หลายเดือนก่อน

      Thanks for that. I have over 250 videos and my method to creating them is to "Google" a problem. If I find nothing on it, that's the subject of the next video. The channel is devoted to self-hosted infrastructure focusing particularly on LXD & Incus as well as networking.

  •  2 ปีที่แล้ว +1

    Finally a clear tutorial on this! Congrats!

    • @scottibyte
      @scottibyte  2 ปีที่แล้ว +1

      Thanks for the kudo. My goal with the channel has been to produce content related to hosting infrastructure for SOHO which has not been well explained or documented.

    •  2 ปีที่แล้ว +1

      @@scottibyte this is a subject about LXD/LXC I find lacking. Documentation is cryptic, there's a lot of confusion on commands/instructions for snapd vs apt installations, I once got this to work but spent a lot of time trying to make sense of pieces and bits of information gathered on search engines. This video of yours is the first I see that's straightforward and to the point. So, your goal with this one (and other videos of yours I've watched) is well met!

  • @dukeofearl8078
    @dukeofearl8078 9 หลายเดือนก่อน +1

    Just the information I was desperately seeking and not finding ... Thank you!
    My own use case is that I'm running various versions of php-fpm in dedicated containers, and I need to map all such containers to the host's DocumentRoot directory. This enables my NgINX web server to support multiple versions of PHP concurrently. So, I need to map the "www-data" user/group (which I actually rename to "web/web" for some reason) to a user/group in those containers. Note that read-only access is not sufficient because PHP sometimes needs to write to the file system.

    • @scottibyte
      @scottibyte  9 หลายเดือนก่อน

      Yes, I use this for tons of use cases. Glad it helped!

  • @steven.cutright
    @steven.cutright ปีที่แล้ว

    You sir, are a true professional..

    • @scottibyte
      @scottibyte  ปีที่แล้ว

      Thanks. My goal is to try and simplify answers to things that are even hard to find on Google.

  • @PopularWebz
    @PopularWebz 4 หลายเดือนก่อน

    note that now you can pass shift=true to incus device add to simplify read/write access

  • @YannMetalhead
    @YannMetalhead 3 หลายเดือนก่อน

    Thank you!

    • @scottibyte
      @scottibyte  3 หลายเดือนก่อน +1

      Glad it helped. Be sure to watch my Incus content as well.

  • @try-that
    @try-that 2 ปีที่แล้ว

    I was wondering how this was done. I've got to admit I've still not tried and lxc stuff yet, as I said I use OMV5, have OMV6 on a vm at the moment. OMV does a nice KVM plugin. I do like docker and use that mostly on OMV.
    Thinking of building a new AMD server as mine is a 6th gen I5, but I'm tight with money😀
    I do think I'm going to go through both your docker and lxc series again, now that I understand a very little better (my problem, not your teaching 😆)

    • @scottibyte
      @scottibyte  2 ปีที่แล้ว

      OMV and Proxmox are decent tools. My thoughts are why would someone not just build a compute server and load LXD on it. LXDWare LXD Dashboard could be the GUI monitor. Docker could be loaded in LXD containers where required. LXD VMs could provide the resources needed where a LXD or Docker would not work.

    • @try-that
      @try-that 2 ปีที่แล้ว

      @@scottibyte I get what you're saying, infact my CCTV server is just Ubuntu and docker/portainer works very well. with Frigate and 2 drives.
      I suppose I like OMV as I can very easily have more than 1 drive, and setting up shares via samba and NFS just seems easier. I suppose I should setup a vm and have a play with LXDware. But I do really like docker and using the host file system just using volumes.
      But as we know, there really isn't a 'proper' way to computer stuff.😁
      Plus I'm enjoying your video's.

    • @scottibyte
      @scottibyte  2 ปีที่แล้ว

      @@try-that True. There is no right way. I tend to not have a "docker" host for my docker containers. The reason is that some apps can use as many as 11 or more containers (Bitwarden). I prefer to have applications truly segmented and isolated from one another. For that reason, I often run a LXD container and nest my Docker app within it. I am getting out of the classic VM realm and when I need a dedicated kernel, I am using LXD VMs as featured in my recent videos. Bulk storage I share via Samba or iSCSI. I deal with large storage on my QNAP NAS's. I suppose that is my OMV. So, my LXDWare LXD Dashboard runs in a LXD container and it manages three LXD hosts on my network.