2018-02-26 17:55:56 +00:00
|
|
|
FROM alpine
|
2018-02-16 14:17:34 +00:00
|
|
|
|
|
|
|
# Include dist
|
|
|
|
ADD dist/ /root/dist/
|
|
|
|
|
|
|
|
# Get and install dependencies & packages
|
|
|
|
RUN apk -U upgrade && \
|
2018-03-25 20:58:46 +00:00
|
|
|
apk add bash \
|
|
|
|
nginx \
|
|
|
|
nginx-mod-http-headers-more \
|
|
|
|
procps && \
|
2018-02-16 14:17:34 +00:00
|
|
|
|
|
|
|
# Setup configs
|
2018-02-26 17:55:56 +00:00
|
|
|
mkdir -p /run/nginx && \
|
|
|
|
rm -rf /etc/nginx/conf.d/* /usr/share/nginx/html/* && \
|
2018-02-16 14:17:34 +00:00
|
|
|
cp /root/dist/conf/nginx.conf /etc/nginx/ && \
|
|
|
|
cp -R /root/dist/conf/ssl /etc/nginx/ && \
|
|
|
|
cp /root/dist/conf/tpotweb.conf /etc/nginx/conf.d/ && \
|
|
|
|
cp -R /root/dist/html/ /var/lib/nginx/ && \
|
|
|
|
|
|
|
|
# Clean up
|
|
|
|
rm -rf /root/* && \
|
|
|
|
rm -rf /var/cache/apk/*
|
|
|
|
|
|
|
|
# Start nginx
|
|
|
|
CMD nginx -g 'daemon off;'
|