17 lines
571 B
Docker
17 lines
571 B
Docker
FROM node:latest as builder
|
|
LABEL maintainer="Ash Leece <ash@leece.im>"
|
|
ARG VERSION
|
|
WORKDIR /data
|
|
ENV NODE_OPTIONS=--max_old_space_size=2048
|
|
RUN git config --global http.sslVerify false && git clone -b "$VERSION" --depth=1 https://github.com/gchq/CyberChef.git .
|
|
RUN npm install && npm run build
|
|
|
|
FROM busybox:latest
|
|
RUN adduser -D -u 1000 cyberchef
|
|
USER cyberchef
|
|
WORKDIR /data
|
|
COPY --from=builder /data/build/prod /data
|
|
ENTRYPOINT ["httpd", "-f", "-p", "80"]
|
|
|
|
COPY healthcheck.sh /healthcheck.sh
|
|
HEALTHCHECK --interval=30s --start-period=5s CMD /bin/sh /healthcheck.sh |