-
Notifications
You must be signed in to change notification settings - Fork 64
/
dockerfile
28 lines (24 loc) · 1.05 KB
/
dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM alpine:latest
EXPOSE 10120
WORKDIR /var/www/html
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&& apk add nginx supervisor php7-fpm php7-session php7-json php7-gd php7-exif git wget unzip zip\
&& mkdir -p /var/www/html/Public \
&& wget https://release.larsjung.de/h5ai/h5ai-0.29.2.zip \
&& unzip h5ai-0.29.2.zip \
&& cp -rp /var/www/html/_h5ai /var/www/html/Public/_h5ai \
&& rm h5ai-0.29.2.zip \
&& mkdir /run/nginx
ADD ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
ADD ./nginx.conf /etc/nginx/nginx.conf
ADD ./php.ini /etc/php7/php.ini
RUN rm /etc/nginx/conf.d/default.conf
RUN chown -R nobody.nobody /var/www/html && \
chown -R nobody.nobody /run && \
chown -R nobody.nobody /var/lib/nginx && \
chown -R nobody.nobody /var/log/nginx && \
chown -R nobody.nobody /var/log/php7
USER nobody
ADD --chown=nobody ./flag.txt /var/www/html/
ADD --chown=nobody ./dockerfile ./nginx.conf /var/www/html/Public/
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]