forked from r2c-CSE/bad-js-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (33 loc) · 1.38 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM node:18 as installer
COPY . /juice-shop
WORKDIR /juice-shop
RUN npm i -g typescript ts-node
RUN npm install --omit=dev --unsafe-perm
RUN npm dedupe
RUN rm -rf frontend/node_modules
RUN rm -rf frontend/.angular
RUN rm -rf frontend/src/assets
RUN mkdir logs && \
chown -R 65532 logs && \
chgrp -R 0 ftp/ frontend/dist/ logs/ data/ i18n/ && \
chmod -R g=u ftp/ frontend/dist/ logs/ data/ i18n/
FROM gcr.io/distroless/nodejs:18
ARG BUILD_DATE
ARG VCS_REF
LABEL maintainer="Bjoern Kimminich <[email protected]>" \
org.opencontainers.image.title="OWASP Juice Shop" \
org.opencontainers.image.description="Probably the most modern and sophisticated insecure web application" \
org.opencontainers.image.authors="Bjoern Kimminich <[email protected]>" \
org.opencontainers.image.vendor="Open Web Application Security Project" \
org.opencontainers.image.documentation="https://help.owasp-juice.shop" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.version="14.4.0" \
org.opencontainers.image.url="https://owasp-juice.shop" \
org.opencontainers.image.source="https://github.com/juice-shop/juice-shop" \
org.opencontainers.image.revision=$VCS_REF \
org.opencontainers.image.created=$BUILD_DATE
WORKDIR /juice-shop
COPY --from=installer --chown=nonroot /juice-shop .
USER 65532
EXPOSE 3000
CMD ["/juice-shop/build/app.js"]