-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (29 loc) · 858 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
30
31
32
33
34
35
36
FROM python:3
# install dependencies
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install curl libgconf-2-4 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libgbm-dev libnss3-dev libxss-dev libasound2 -y
RUN curl -sL https://deb.nodesource.com/setup_17.x | bash -
RUN apt-get update
RUN apt-get install nodejs -y
RUN rm -rf /var/lib/apt/lists/*
# create ctf user and directory
RUN mkdir /ctf
WORKDIR /ctf
RUN useradd -M -d /ctf ctf
# copy files
COPY secret.txt /ctf/secret.txt
COPY flag.txt /ctf/flag.txt
COPY server.py /ctf/server.py
COPY start.sh /ctf/start.sh
COPY admin_bot.js /ctf/admin_bot.js
# set permissions
RUN chown -R root:ctf /ctf
RUN chmod -R 750 /ctf
# install flask and nodejs dependencies
RUN pip3 install flask
RUN npm install express puppeteer
#USER ctf
CMD ["bash", "/ctf/start.sh"]
EXPOSE 1337
EXPOSE 1336