tpotce/docker/nginx/Dockerfile

40 lines
1.1 KiB
Text
Raw Normal View History

FROM alpine:3.19
#
# Include dist
2022-03-08 23:36:03 +00:00
COPY dist/ /root/dist/
#
2024-09-11 10:42:17 +00:00
# Install packages
RUN apk --no-cache -U add \
nginx \
nginx-mod-http-brotli \
2023-04-27 16:42:38 +00:00
nginx-mod-http-headers-more \
nginx-mod-http-lua && \
#
## Setup T-Pot Landing Page, Eleasticvue, Cyberchef
cp -R /root/dist/html/* /var/lib/nginx/html/ && \
cd /var/lib/nginx/html/esvue && \
tar xvfz esvue.tgz && \
rm esvue.tgz && \
cd /var/lib/nginx/html/cyberchef && \
tar xvfz cyberchef.tgz && \
rm cyberchef.tgz && \
#
## Change ownership, permissions
chown root:www-data -R /var/lib/nginx/html && \
chmod 755 -R /var/lib/nginx/html && \
#
## Add Nginx / T-Pot specific configs
rm -rf /etc/nginx/conf.d/* /usr/share/nginx/html/* && \
mkdir -p /etc/nginx/conf.d && \
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 /root/dist/conf/lsweb.conf /etc/nginx/conf.d/ && \
#
# Clean up
2024-09-11 10:42:17 +00:00
rm -rf /root/* \
/var/cache/apk/*
#
# Start nginx
2024-09-05 19:49:52 +00:00
CMD ["nginx", "-g", "daemon off;"]