mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-29 19:58:52 +00:00

create builder for cyberchef and elasticvue based on respective masters builders will build webapps and copy output to nginx html folder as tgz some tweaking for elasticvue to properly load original favicon with cyberchef now run as nginx webapp we gain another 40MB of RAM while webapps will be built on AMD64 all final docker images can now be built as multi arch images for AMD64 and ARM64
37 lines
1,017 B
Docker
37 lines
1,017 B
Docker
FROM alpine:3.15
|
|
#
|
|
# Include dist
|
|
ADD dist/ /root/dist/
|
|
#
|
|
# Get and install dependencies & packages
|
|
RUN apk -U --no-cache add \
|
|
nginx \
|
|
nginx-mod-http-headers-more \
|
|
&& \
|
|
#
|
|
## 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/ && \
|
|
#
|
|
# Clean up
|
|
rm -rf /root/* && \
|
|
rm -rf /var/cache/apk/*
|
|
#
|
|
# Start nginx
|
|
CMD nginx -g 'daemon off;'
|