From b8bed8832b77a478360ae946a69dab5e922b194e Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 21 Aug 2015 15:47:50 -0700 Subject: [PATCH] Update dind "/tmp" mounting to be optional This allows someone running the image to use `-v` to mount a non-tmpfs `/tmp` into their image if they so require/desire. Signed-off-by: Andrew "Tianon" Page --- hack/dind | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hack/dind b/hack/dind index 1c564922c3..4ed2b36cb4 100755 --- a/hack/dind +++ b/hack/dind @@ -105,8 +105,10 @@ if ! grep -qw devices /proc/1/cgroup; then echo >&2 'WARNING: it looks like the "devices" cgroup is not mounted.' fi -# Mount /tmp -mount -t tmpfs none /tmp +# Mount /tmp (conditionally) +if ! mountpoint -q /tmp; then + mount -t tmpfs none /tmp +fi if [ $# -gt 0 ]; then exec "$@"