switch root to a tmpfs filesystem, so pivot_root works, should make #57 work now

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2016-03-29 22:09:23 +01:00
parent 38aef85f6a
commit 4dec575407
3 changed files with 10 additions and 4 deletions

View File

@ -90,7 +90,8 @@ RUN \
rc-update add hupper default && \
rc-update add hv_fcopy_daemon default && \
rc-update add hv_kvp_daemon default && \
rc-update add hv_vss_daemon default && \
ln -s /bin/busybox /init
rc-update add hv_vss_daemon default
COPY init /
CMD ["/bin/sh"]

7
alpine/init Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
/bin/mount -t tmpfs tmpfs /mnt
/bin/cp -a / /mnt 2>/dev/null
exec /sbin/switch_root /mnt /sbin/init

View File

@ -30,8 +30,6 @@ start()
rm -rf /var/tmp/log
fi
export DOCKER_RAMDISK="true"
command="${DOCKER_BINARY:-/usr/bin/docker}"
pidfile="/run/docker.pid"