forked from elico/openspeedtest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (24 loc) · 1023 Bytes
/
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
29
30
31
32
33
# By OpenSpeedTest
# Dockerfile for https://hub.docker.com/r/openspeedtest/latest
FROM nginxinc/nginx-unprivileged:stable-alpine
LABEL maintainer "OpenSpeedTest.com <[email protected]>"
COPY /files/OpenSpeedTest-Server.conf /etc/nginx/conf.d/OpenSpeedTest-Server.conf
RUN rm /etc/nginx/nginx.conf
COPY /files/nginx.conf /etc/nginx/
COPY /files/www/ /usr/share/nginx/html/
#COPY /files/nginx.crt /etc/ssl/
#COPY /files/nginx.key /etc/ssl/
USER root
RUN rm -vf /var/log/nginx/* && rm -rf /etc/nginx/conf.d/default.conf \
&& chown -R nginx /usr/share/nginx/html/ \
&& chmod 755 /usr/share/nginx/html/downloading \
&& chmod 755 /usr/share/nginx/html/upload \
&& chown nginx /etc/nginx/conf.d/OpenSpeedTest-Server.conf \
&& chmod 400 /etc/nginx/conf.d/OpenSpeedTest-Server.conf \
&& chown nginx /etc/nginx/nginx.conf \
&& chmod 400 /etc/nginx/nginx.conf
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
RUN update-ca-certificates
USER 0
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]