How to bindmount a hostfolder to guest?


I’ve added this line to my ‘config’ file:
lxc.mount.entry = /tmp/aaa bbb none bind,relative,create=dir 0 0
‘aaa’ is a folder. It doesn’t show up in the guest. No errors show up anywhere.

Are there any prerequisites i’m missing or anything’s wrong here?

lxc-start v2.1.1
Guest: Alpine Linux edge x86-64
Linux OpenWrt 4.14.115 #0 SMP Sat May 11 22:05:04 2019 x86_64 GNU/Linux

(Stéphane Graber) #2

Hmm, that’s odd, this config should have given you a /bbb in the container.
Maybe try again with maximum debugging enabled?

I remember us having some odd behavior around mounts on some specific C libraries, so I wonder if that may be what you’re hitting since you’re running on OpenWRT.


Weird. It does work now out of the box indeed.
Maybe its related to some binaries (shadow, coreutils, gnu-utils…) that have been replaced from stripped down versions (mostly busybox) to full versions in the meantime.