33 lines
759 B
Docker
33 lines
759 B
Docker
# TODO no latest
|
|
FROM alpine:latest
|
|
|
|
EXPOSE 80
|
|
|
|
# install curl
|
|
RUN apk update
|
|
RUN apk add curl
|
|
RUN apk fix
|
|
|
|
# install nginx
|
|
# TODO installed automatically?
|
|
#RUN apk add openssl curl ca-certificates
|
|
RUN printf "%s%s%s%s\n" \
|
|
"@nginx " \
|
|
"http://nginx.org/packages/alpine/v" \
|
|
`egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release` \
|
|
"/main" \
|
|
| tee -a /etc/apk/repositories
|
|
RUN curl -o /tmp/nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub
|
|
RUN mv /tmp/nginx_signing.rsa.pub /etc/apk/keys/
|
|
RUN apk update
|
|
RUN apk add nginx@nginx
|
|
RUN apk fix
|
|
|
|
# add config
|
|
RUN rm /etc/nginx/nginx.conf
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
RUN rm -r /usr/share/nginx/html
|
|
COPY www /usr/share/nginx/html
|
|
|
|
# start
|
|
CMD ["nginx", "-g", "daemon off;"]
|