ssh-treasure-hunt/Dockerfile
2022-01-20 19:45:04 +01:00

34 lines
562 B
Docker

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