Skip to content

Commit

Permalink
pwn(hacker-recruitment-center): working dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ChSotiriou committed Jun 30, 2024
1 parent 9de2577 commit 651ded1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions pwn/hacker-recruitment-center/setup/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
FROM python:2.7-slim
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y socat gcc-multilib

RUN addgroup --system ctf && adduser --system --group ctf

USER ctf
WORKDIR /home/ctf

COPY challenge.py .
COPY flag.txt .
COPY socat .
COPY ./challenge .
COPY ./wrap.sh .
COPY ./flag.txt .

env PYTHONUNBUFFERED 1
# RUN chmod +x ./wrap.sh ./challenge

EXPOSE 1337
CMD ["/home/ctf/socat", "-v","TCP-LISTEN:1337,reuseaddr,fork", "EXEC:'python challenge.py'"]
# ENTRYPOINT "bash"
CMD ["socat", "-v","TCP-LISTEN:1337,reuseaddr,fork", "EXEC:'./wrap.sh'"]

0 comments on commit 651ded1

Please sign in to comment.