From 4e6a5d4dc7355e08b2b12e3bc54849f7018e20ee Mon Sep 17 00:00:00 2001 From: Matt Hardcastle Date: Sat, 15 Aug 2015 11:44:05 -0700 Subject: [PATCH] Split /tmp/bootstrap.sh chmod and exec commands When I ran the original I got the following error: Step 3 : RUN chmod +x /tmp/bootstrap.sh && /tmp/bootstrap.sh ---> Running in 62f54b7a5e6d /bin/sh: 1: /tmp/bootstrap.sh: Text file busy Splitting the two commands up seems to give the text file enough time to finish up. I suppose a slight sleep could also be added inbetween the two commands if one was worried about creating too many images. --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0cf0cca..5659e30 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,8 @@ MAINTAINER Jim Myhrberg "contact@jimeh.me" # We use a bootstrap script to avoid having temporary cache files and build # dependencies being committed and included into the docker image. ADD bootstrap.sh /tmp/ -RUN chmod +x /tmp/bootstrap.sh && /tmp/bootstrap.sh +RUN chmod +x /tmp/bootstrap.sh +RUN /tmp/bootstrap.sh RUN useradd znc ADD start-znc /usr/local/bin/