18 lines
369 B
Docker
18 lines
369 B
Docker
FROM python:3.9-slim-buster
|
|
|
|
RUN apt update
|
|
RUN apt install -y socat
|
|
RUN pip install pycryptodome
|
|
|
|
# Add application
|
|
WORKDIR /challenge
|
|
COPY challenge .
|
|
|
|
# Expose the port
|
|
EXPOSE 1337
|
|
|
|
# Switch to use a non-root user from here on
|
|
USER nobody
|
|
|
|
# Start the python application
|
|
CMD ["socat", "-dd", "TCP-LISTEN:1337,reuseaddr,fork", "exec:python -u /challenge/server.py"]
|