forked from w3th4nds/Thesis-2023
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 648 Bytes
/
Dockerfile
File metadata and controls
31 lines (21 loc) · 648 Bytes
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
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND noninteractive
# Update
RUN apt-get update -y
# Install dependencies
RUN apt-get install -y lib32z1 libseccomp-dev socat supervisor
# Clean up
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Create ctf-user
RUN groupadd -r ctf && useradd -r -g ctf ctf
RUN mkdir -p /home/ctf
# Configuration files/scripts
ADD config/supervisord.conf /etc/
# Challenge files
COPY --chown=ctf challenge/ /home/ctf/
# Set some proper permissions
RUN chown -R root:ctf /home/ctf
RUN chmod 750 /home/ctf/challenge0
RUN chmod 440 /home/ctf/flag.txt
EXPOSE 1337
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]