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