ssh-treasure-hunt/Dockerfile

34 lines
562 B
Docker
Raw Permalink Normal View History

2022-01-18 18:02:41 +00:00
FROM debian:10
2022-01-18 19:03:06 +00:00
WORKDIR /root
2022-01-18 18:02:41 +00:00
RUN addgroup eleve
RUN apt-get update && apt-get install -y \
2022-01-20 12:50:31 +00:00
nano \
netcat \
nginx \
2022-01-20 18:45:04 +00:00
pandoc \
2022-01-18 18:02:41 +00:00
ssh \
2022-01-20 12:50:31 +00:00
vim \
2022-01-18 18:02:41 +00:00
&& rm -rf /var/lib/apt/lists/*
ENV TZ=Europe/Paris
#CMD ["sh", "-c", "echo lol"]
# SSH server
RUN mkdir /run/sshd
2022-01-20 18:45:04 +00:00
CMD ["sh", "-c", "while true ; do netcat -lp 5000 -e /root/http_bash.sh ; done"]
2022-01-20 17:03:05 +00:00
# Nginx conf
2022-01-20 18:45:04 +00:00
COPY ./nginx-server.conf /etc/nginx/sites-enabled/default
# Bash HTTP website
COPY ./http_bash.sh ./http_bash.sh
2022-01-18 18:02:41 +00:00
# Entrypoint
COPY ./entrypoint.sh ./entrypoint.sh
ENTRYPOINT ["./entrypoint.sh"]