diff options
| author | Louis Burda <quent.burda@gmail.com> | 2024-04-17 02:38:10 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2024-04-17 02:38:41 +0200 |
| commit | 67484e60f9627d69e406a533afd4bb2be9480c21 (patch) | |
| tree | 18f048aacca8902c9ba095699d34d86502727cfd /solve/Dockerfile | |
| parent | 727aaf505985fdbcf3ceaf5148df8ce8fb427ed0 (diff) | |
| download | cscg2024-wsbx-master.tar.gz cscg2024-wsbx-master.zip | |
Diffstat (limited to 'solve/Dockerfile')
| -rw-r--r-- | solve/Dockerfile | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/solve/Dockerfile b/solve/Dockerfile new file mode 100644 index 0000000..0a480b5 --- /dev/null +++ b/solve/Dockerfile @@ -0,0 +1,28 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.18.2@sha256:25fad2a32ad1f6f510e528448ae1ec69a28ef81916a004d3629874104f8a7f70 + +# Install OS dependencies and add a challenge user +RUN apk add nodejs npm chromium \ + && addgroup -S wsbx \ + && adduser -S -G wsbx wsbx \ + && mkdir -p /home/wsbx/Downloads \ + && chown -R wsbx:wsbx /home/wsbx + +# Set config for running in a container +ENV FLAG=CSCG{fake_flag} \ + HOST=0.0.0.0 \ + PORT=1337 \ + PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser + +# Install NPM dependencies +WORKDIR /app +COPY package.json package-lock.json /app/ +RUN npm ci + +# Add the actual app +COPY . /app + +# Don't run as root +USER wsbx + +CMD ["node", "server.js"] |
