tpotce/docker/deprecated/cyberchef/Dockerfile

35 lines
762 B
Text
Raw Normal View History

FROM node:10.24.1-alpine3.11 as builder
2019-08-16 17:14:58 +00:00
#
2018-07-12 09:03:33 +00:00
# Install CyberChef
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
2022-01-19 00:46:04 +00:00
FROM alpine:3.15
#
RUN apk -U --no-cache add \
curl \
npm && \
npm install -g http-server && \
2019-08-16 17:14:58 +00:00
#
2018-07-12 09:03:33 +00:00
# Clean up
rm -rf /root/* && \
rm -rf /var/cache/apk/*
2019-08-16 17:14:58 +00:00
#
COPY --from=builder /srv/build/prod /opt/cyberchef
#
2018-07-12 09:03:33 +00:00
# Healthcheck
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:8000'
2019-08-16 17:14:58 +00:00
#
2021-02-15 10:01:03 +00:00
# Set user, workdir and start cyberchef
2018-07-12 09:03:33 +00:00
USER nobody:nobody
WORKDIR /opt/cyberchef
CMD ["http-server", "-p", "8000"]