-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
36 lines (24 loc) · 887 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.10-slim-bullseye
# Randark's permission limit questioning framework
LABEL auther="Randark_JMT"
EXPOSE 8080
# RUN sed -i "s@http://deb.debian.org@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list
# RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple flask
RUN pip3 install flask
RUN useradd -m ctf -s /bin/rbash
WORKDIR /home/ctf
# modify according to functional requirements
RUN mkdir /home/ctf/bin && \
cp /bin/ls /home/ctf/bin && \
cp /bin/cat /home/ctf/bin && \
cp /usr/local/bin/flask /home/ctf/bin &&\
cp /bin/rm /home/ctf/bin
COPY ./docker/src/.bashrc /home/ctf
RUN chown root /home/ctf/.bashrc && \
chmod 755 /home/ctf/.bashrc
COPY ./docker/bin/start.sh /start.sh
RUN chmod +x /start.sh
COPY ./src /home/ctf/
RUN chown -R root:ctf /home/ctf && \
chmod -R 750 /home/ctf
ENTRYPOINT [ "/bin/bash","/start.sh" ]