]> git.p6c8.net - jirafeau_project.git/commitdiff
[TASK] move docker CMD command to separate file
authorJerome Jutteau <jerome@jutteau.fr>
Sun, 13 Dec 2020 19:39:47 +0000 (20:39 +0100)
committerJerome Jutteau <jerome@jutteau.fr>
Sun, 13 Dec 2020 21:23:15 +0000 (22:23 +0100)
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
Dockerfile
docker/cleanup.sh [moved from docker/cleanup with 100% similarity]
docker/run.sh [new file with mode: 0755]

index f0071d0679aa563b3b4371cfd021427686f21d09..b710a852049c134b029afada87e495bc471ee789 100644 (file)
@@ -12,17 +12,20 @@ RUN apk update && \
     echo "UTC" > /etc/timezone
 
 
-# install jirafou
+# install jirafeau
 RUN mkdir /www
 WORKDIR /www
 COPY .git .git
 RUN apk add git && \
-    git reset --hard && rm -rf .git .gitignore .gitlab-ci.yml CONTRIBUTING.md Dockerfile README.md && \
+    git reset --hard && rm -rf docker .git .gitignore .gitlab-ci.yml CONTRIBUTING.md Dockerfile README.md && \
     apk del git && \
     chown -R $USER_UID.$GROUP_UID /www && \
-    chmod o=,ug=rwX -R /www && \
-    chmod +x docker/cleanup
+    chmod o=,ug=rwX -R /www
 
+COPY docker/cleanup.sh /cleanup.sh
+RUN chmod o=,ug=rx /cleanup.sh
+COPY docker/run.sh /run.sh
+RUN chmod o=,ug=rx /run.sh
 
 # install lighttpd
 RUN apk add lighttpd php7-mcrypt && \
@@ -38,5 +41,5 @@ COPY docker/lighttpd.conf /etc/lighttpd/lighttpd.conf
 RUN rm -rf /var/cache/apk/*
 
 
-CMD /www/docker/cleanup & php-fpm -D && lighttpd -D -f /etc/lighttpd/lighttpd.conf
+CMD /run.sh
 EXPOSE 80
\ No newline at end of file
similarity index 100%
rename from docker/cleanup
rename to docker/cleanup.sh
diff --git a/docker/run.sh b/docker/run.sh
new file mode 100755 (executable)
index 0000000..a57fa3b
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh -e
+/cleanup.sh &
+php-fpm -D
+lighttpd -D -f /etc/lighttpd/lighttpd.conf

patrick-canterino.de