]> git.p6c8.net - jirafeau_project.git/blob - Dockerfile
[BUGFIX] fix jirafeau docker image
[jirafeau_project.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 jirafou
16 RUN mkdir /www
17 WORKDIR /www
18 COPY .git .git
19 RUN apk add git && \
20 git reset --hard && rm -rf .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 chmod +x docker/cleanup
25
26
27 # install lighttpd
28 RUN apk add lighttpd php7-mcrypt && \
29 echo "extension=/usr/lib/php7/modules/mcrypt.so" > /usr/local/etc/php/conf.d/mcrypt.ini && \
30 chown -R $USER_UID /var/log/lighttpd && \
31 chmod oug=rwX /run && \
32 mkdir -p /usr/local/etc/php
33 COPY docker/php.ini /usr/local/etc/php/php.ini
34 COPY docker/lighttpd.conf /etc/lighttpd/lighttpd.conf
35
36
37 # cleanup
38 RUN rm -rf /var/cache/apk/*
39
40
41 CMD /www/docker/cleanup & php-fpm -D && lighttpd -D -f /etc/lighttpd/lighttpd.conf
42 EXPOSE 80

patrick-canterino.de