Skip to content

Commit

Permalink
Switch to alpine docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaseizinger committed Sep 13, 2023
1 parent 1f5a753 commit 06ae18c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions hole-punching-tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ RUN --mount=type=cache,target=./target \
RUN --mount=type=cache,target=./target \
mv ./target/x86_64-unknown-linux-musl/release/hole-punching-tests /usr/local/bin/hole-punching-tests

FROM ubuntu:jammy
FROM alpine:3

ARG DEBIAN_FRONTEND=noninteractive
RUN --mount=type=cache,target=/var/cache/apt apt-get update && apt-get install -y iproute2
# Debugging tools
RUN --mount=type=cache,target=/var/cache/apt apt-get install -y tcpdump ncat iputils-ping
RUN --mount=type=cache,target=/var/cache/apk apk add nftables

COPY --from=builder /usr/local/bin/hole-punching-tests /usr/bin/hole-punching-tests

Expand Down
4 changes: 2 additions & 2 deletions hole-punching-tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ services:
dockerfile: ./hole-punching-tests/Dockerfile
context: ..
container_name: alice
command: ["/bin/bash", "-c", "ip route add 17.0.0.0/16 via 192.168.0.10 dev eth0 && /usr/bin/hole-punching-tests dial"]
command: ["/bin/sh", "-c", "ip route add 17.0.0.0/16 via 192.168.0.10 dev eth0 && /usr/bin/hole-punching-tests dial"]
environment:
TRANSPORT: tcp
networks:
Expand All @@ -60,7 +60,7 @@ services:
dockerfile: ./hole-punching-tests/Dockerfile
context: ..
container_name: bob
command: ["/bin/bash", "-c", "ip route add 17.0.0.0/16 via 192.168.1.10 dev eth0 && /usr/bin/hole-punching-tests listen"]
command: ["/bin/sh", "-c", "ip route add 17.0.0.0/16 via 192.168.1.10 dev eth0 && /usr/bin/hole-punching-tests listen"]
environment:
TRANSPORT: tcp
networks:
Expand Down

0 comments on commit 06ae18c

Please sign in to comment.