2020-01-03 16:25:33 +00:00
|
|
|
FROM alpine:3.10
|
2019-08-16 17:14:58 +00:00
|
|
|
#
|
2018-07-12 09:03:33 +00:00
|
|
|
# Get and install dependencies & packages
|
2021-02-12 17:09:44 +00:00
|
|
|
RUN apk -U --no-cache add \
|
2018-07-12 09:03:33 +00:00
|
|
|
curl \
|
|
|
|
git \
|
|
|
|
npm \
|
|
|
|
nodejs && \
|
|
|
|
npm install npm@latest -g && \
|
2021-02-12 17:09:44 +00:00
|
|
|
npm install -g grunt-cli http-server && \
|
2019-08-16 17:14:58 +00:00
|
|
|
#
|
2018-07-12 09:03:33 +00:00
|
|
|
# Install CyberChef
|
|
|
|
cd /root && \
|
2021-09-20 09:15:28 +00:00
|
|
|
git clone https://github.com/gchq/cyberchef -b v9.32.3 && \
|
2018-07-12 09:03:33 +00:00
|
|
|
cd cyberchef && \
|
|
|
|
npm install && \
|
|
|
|
grunt prod && \
|
|
|
|
mkdir -p /opt/cyberchef && \
|
|
|
|
mv build/prod/* /opt/cyberchef && \
|
|
|
|
cd / && \
|
2019-08-16 17:14:58 +00:00
|
|
|
#
|
2018-07-12 09:03:33 +00:00
|
|
|
# Clean up
|
|
|
|
apk del --purge git \
|
|
|
|
npm && \
|
|
|
|
rm -rf /root/* && \
|
|
|
|
rm -rf /var/cache/apk/*
|
2019-08-16 17:14:58 +00:00
|
|
|
#
|
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"]
|