]> git.p6c8.net - jirafeau_mojo42.git/blob - Dockerfile
[TASK] move docker CMD command to separate file
[jirafeau_mojo42.git] / Dockerfile
1 FROM php:7.3-fpm-alpine
2 MAINTAINER "Jérôme Jutteau <jerome@jutteau.fr>"
3
4 # lighttpd user
5 ARG USER_UID=100
6 # www-data group
7 ARG GROUP_UID=82
8
9 # install base
10 RUN apk update && \
11 ln -snf /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
12 echo "UTC" > /etc/timezone
13
14
15 # install jirafeau
16 RUN mkdir /www
17 WORKDIR /www
18 COPY .git .git
19 RUN apk add git && \
20 git reset --hard && rm -rf docker .git .gitignore .gitlab-ci.yml CONTRIBUTING.md Dockerfile README.md && \
21 apk del git && \
22 chown -R $USER_UID.$GROUP_UID /www && \
23 chmod o=,ug=rwX -R /www
24
25 COPY docker/cleanup.sh /cleanup.sh
26 RUN chmod o=,ug=rx /cleanup.sh
27 COPY docker/run.sh /run.sh
28 RUN chmod o=,ug=rx /run.sh
29
30 # install lighttpd
31 RUN apk add lighttpd php7-mcrypt && \
32 echo "extension=/usr/lib/php7/modules/mcrypt.so" > /usr/local/etc/php/conf.d/mcrypt.ini && \
33 chown -R $USER_UID /var/log/lighttpd && \
34 chmod oug=rwX /run && \
35 mkdir -p /usr/local/etc/php
36 COPY docker/php.ini /usr/local/etc/php/php.ini
37 COPY docker/lighttpd.conf /etc/lighttpd/lighttpd.conf
38
39
40 # cleanup
41 RUN rm -rf /var/cache/apk/*
42
43
44 CMD /run.sh
45 EXPOSE 80

patrick-canterino.de