Add dockerfile and push to ghcr

This commit is contained in:
Max Stanley 2023-11-21 23:30:14 +00:00
parent 6ed9d4554a
commit d8d9df1c54
3 changed files with 103 additions and 0 deletions

26
Dockerfile Normal file
View file

@ -0,0 +1,26 @@
FROM node:20-alpine3.18 AS cyberchef-build
ENV NODE_OPTIONS="--max_old_space_size=2048"
WORKDIR /usr/src/app
COPY ./Gruntfile.js .
COPY ./webpack.config.js .
COPY ./package.json .
COPY ./package-lock.json .
RUN npm install
COPY . .
RUN npx grunt prod
RUN unzip build/prod/*.zip
FROM nginx:1.25-alpine3.18 AS cyberchef
WORKDIR /usr/share/nginx/html/
COPY --from=cyberchef-build /usr/src/app/build/prod/ .
RUN rm BundleAnalyzerReport.html