tweak cyberchef image for better security, prep citrixhoneypot for rebuild

This commit is contained in:
t3chn0m4g3
2021-09-20 14:29:42 +00:00
parent e9c03e512c
commit ed224215a4
3 changed files with 23 additions and 23 deletions

View File

@ -1,30 +1,30 @@
FROM alpine:3.10
#
# Get and install dependencies & packages
RUN apk -U --no-cache add \
curl \
git \
npm \
nodejs && \
npm install npm@latest -g && \
npm install -g grunt-cli http-server && \
FROM node:10.24.1-alpine3.11 as builder
#
# Install CyberChef
cd /root && \
git clone https://github.com/gchq/cyberchef -b v9.32.3 && \
cd cyberchef && \
npm install && \
grunt prod && \
mkdir -p /opt/cyberchef && \
mv build/prod/* /opt/cyberchef && \
cd / && \
RUN apk -U --no-cache add git
RUN chown -R node:node /srv
RUN npm install -g grunt-cli
WORKDIR /srv
USER node
RUN git clone https://github.com/gchq/cyberchef -b v9.32.3 .
ENV NODE_OPTIONS=--max_old_space_size=2048
RUN npm install
RUN grunt prod
#
# Move from builder
FROM alpine:3.14
#
RUN apk -U --no-cache add \
curl \
npm && \
npm install -g http-server && \
#
# Clean up
apk del --purge git \
npm && \
rm -rf /root/* && \
rm -rf /var/cache/apk/*
#
COPY --from=builder /srv/build/prod /opt/cyberchef
#
# Healthcheck
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:8000'
#