[lxc-devel] [PATCH] lxc-plamo: mount tmpfs on /dev/shm

Serge Hallyn serge.hallyn at ubuntu.com
Tue Nov 18 15:13:41 UTC 2014


Quoting TAMUKI Shoichi (tamuki at linet.gr.jp):
> Do mkdir $rootfs/dev/shm and then mount tmpfs on /dev/shm.
> 
> Signed-off-by: TAMUKI Shoichi <tamuki at linet.gr.jp>
> ---
>  config/templates/plamo.common.conf.in | 1 +
>  templates/lxc-plamo.in                | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/config/templates/plamo.common.conf.in b/config/templates/plamo.common.conf.in
> index 483a556..e056809 100644
> --- a/config/templates/plamo.common.conf.in
> +++ b/config/templates/plamo.common.conf.in
> @@ -3,6 +3,7 @@ lxc.include = @LXCTEMPLATECONFIG@/common.conf
>  
>  # Default mount
>  lxc.mount.auto = proc sys cgroup
> +lxc.mount.entry = none dev/shm tmpfs nosuid,nodev,mode=1777 0 0

Did you want to add noexec to the mount options?  I notice that the
gentoo template uses

rw,nosuid,nodev,relatime,mode=755

>  
>  # Doesn't support consoles in /dev/lxc/
>  lxc.devttydir =
> diff --git a/templates/lxc-plamo.in b/templates/lxc-plamo.in
> index ce98c1a..5061056 100644
> --- a/templates/lxc-plamo.in
> +++ b/templates/lxc-plamo.in
> @@ -153,6 +153,7 @@ configure_plamo() {
>    chmod    666 $rootfs/dev/random
>    mknod -m 666 $rootfs/dev/urandom c 1 9
>    mkdir -m 755 $rootfs/dev/pts
> +  mkdir -m 755 $rootfs/dev/shm
>    chmod    666 $rootfs/dev/tty
>    chmod    600 $rootfs/dev/console
>    mknod -m 666 $rootfs/dev/tty0 c 4 0
> -- 
> 1.9.0
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


More information about the lxc-devel mailing list