diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b530363 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +examples/ +target/ +flake.* +.ci +.direnv +.git +.github diff --git a/examples/broker-in-podman-container/Dockerfile b/examples/broker-in-podman-container/Dockerfile new file mode 100644 index 0000000..546158f --- /dev/null +++ b/examples/broker-in-podman-container/Dockerfile @@ -0,0 +1,18 @@ +FROM rust:slim as build + +RUN apt-get update && apt-get install -y \ + build-essential \ + cmake \ + pkg-config \ + libclang-dev \ + libsodium-dev + +WORKDIR /code +COPY . /code + +RUN cargo install --path rosenpass --root / --bins \ + && cargo install --path wireguard-broker --root / --bins +# RUN apt-get install -y libcap2-bin \ +# setcap CAP_NET_ADMIN=+eip "$(which rosenpass-wireguard-broker-privileged)" + +CMD rosenpass diff --git a/examples/broker-in-podman-container/podman-compose.yml b/examples/broker-in-podman-container/podman-compose.yml new file mode 100644 index 0000000..924a578 --- /dev/null +++ b/examples/broker-in-podman-container/podman-compose.yml @@ -0,0 +1,11 @@ +version: "3.8" +services: + rosenpass: + build: + context: ../../ + dockerfile: ./examples/broker-in-podman-container/Dockerfile + env: + RUST_LOG: trace + volumes: + ./peer-a:/config +