-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (22 loc) · 835 Bytes
/
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
# References base image by SHA to avoid drift. This is Ubuntu 24.04. You will
# probably want to update the hash when working on a new challenge.
FROM ubuntu:20.04 AS base
# Install python3
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip
# Challenge metadata and artifacts go here. Only root has access
RUN mkdir /challenge && \
chmod 700 /challenge
# * Copy capture and setup script to the image
COPY setup-challenge.py /app/
COPY requirements.txt /app/
WORKDIR /app/
RUN pip3 install -r requirements.txt
# RUN tar czvf /challenge/artifacts.tar.gz traffic.pcap
FROM base AS challenge
ARG FLAG
RUN python3 setup-challenge.py
#
# This is a dummy command that keeps the container running. cmgr will keep
# restarting the container if it exits.
CMD ["tail", "-f", "/dev/null"]