This commit is contained in:
Zheyuan Wu
2026-03-02 21:18:02 -06:00
commit 4627f0db5c
17 changed files with 1484 additions and 0 deletions

38
docker-compose.yml Normal file
View File

@@ -0,0 +1,38 @@
services:
server:
image: debian:bookworm-slim
container_name: hw4-server
working_dir: /app
env_file:
- .env
networks:
net-hw4:
ipv4_address: ${SERVER_IP}
volumes:
- ./bin/server:/usr/local/bin/server:ro
entrypoint: ["bash", "-lc", "apt-get update && apt-get install -y --no-install-recommends libstdc++6 iproute2 libssl-dev; exec stdbuf -oL -eL /usr/local/bin/server"]
client:
image: debian:bookworm-slim
container_name: hw4-client
working_dir: /app
env_file:
- .env
networks:
net-hw4:
ipv4_address: ${CLIENT_IP}
depends_on:
- server
stdin_open: true
tty: true
volumes:
- ./bin/client:/usr/local/bin/client:ro
entrypoint: ["bash", "-lc", "apt-get update && apt-get install -y --no-install-recommends libstdc++6 iproute2 libssl-dev; exec stdbuf -oL -eL /usr/local/bin/client"]
networks:
net-hw4:
name: net-hw4
driver: bridge
ipam:
config:
- subnet: ${NET_SUBNET}