-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pwn(hacker-recruitment-center): working dockerfile
- Loading branch information
1 parent
9de2577
commit 651ded1
Showing
1 changed file
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'"] |