2023-11-27 04:24:47 -05:00
|
|
|
# Use the official Python image
|
|
|
|
FROM python:3.11
|
|
|
|
|
|
|
|
# Expose the specified port
|
|
|
|
EXPOSE 12000
|
|
|
|
|
|
|
|
# Create and set the working directory
|
2023-11-27 14:19:19 -05:00
|
|
|
WORKDIR /server
|
2023-11-27 04:24:47 -05:00
|
|
|
|
|
|
|
# Create files with random content in the /server directory
|
2023-11-27 14:19:19 -05:00
|
|
|
RUN mkdir /server_directory
|
2023-12-07 17:44:08 -05:00
|
|
|
|
|
|
|
# These files is only 750 bytes, can fit inside a UDP/TCP packet
|
2023-12-06 17:30:12 -05:00
|
|
|
RUN dd if=/dev/urandom of=/server_directory/file_server.txt bs=1 count=750
|
|
|
|
RUN dd if=/dev/urandom of=/server_directory/image_server.png bs=1 count=750
|
2023-11-27 04:24:47 -05:00
|
|
|
|
2023-12-07 17:44:08 -05:00
|
|
|
# generate a file that has random numbers
|
|
|
|
RUN for _ in $(seq 1 150); do shuf -i 0-1000 -n 1 >> /server_directory/numbers.txt; done
|