diff --git a/docker/Dockerfile.client b/docker/Dockerfile.client new file mode 100644 index 0000000..dd8e1f1 --- /dev/null +++ b/docker/Dockerfile.client @@ -0,0 +1,43 @@ +############## +# +# @ +# @ +# @ @ @ +# +############## + +FROM ubuntu:24.04 + +RUN apt-get update + +RUN apt-get install -y \ + gcc \ + git \ + libz-dev \ + make \ + pkg-config + +RUN apt-get clean + +WORKDIR /app/ + +COPY . /app/ + +RUN make + +# build command (at repo root): [sudo] docker build -t iodine -f docker/Dockerfile.client . + +# iodine require /dev/net/tun from the host. +# run the container with --device /dev/net/tun --cap-add=NET_ADMIN to allow it + +# usage: [sudo] docker run -it --rm \ +# --device /dev/net/tun \ +# --cap-add=NET_ADMIN \ +# iodine -f -r 192.168.0.1 -P "password" test.com + +FROM ubuntu:24.04 + +COPY --from=0 /app/bin/iodine /iodine + +ENTRYPOINT [ "/iodine" ] +CMD [ "-h" ] diff --git a/docker/Dockerfile.server b/docker/Dockerfile.server new file mode 100644 index 0000000..98aab0a --- /dev/null +++ b/docker/Dockerfile.server @@ -0,0 +1,43 @@ +############## +# +# @ +# @ +# @ @ @ +# +############## + +FROM ubuntu:24.04 + +RUN apt-get update + +RUN apt-get install -y \ + gcc \ + git \ + libz-dev \ + make \ + pkg-config + +RUN apt-get clean + +WORKDIR /app/ + +COPY . /app/ + +RUN make + +# build command (at repo root): [sudo] docker build -t iodined -f docker/Dockerfile.server . + +# iodine require /dev/net/tun from the host. +# run the container with --device /dev/net/tun --cap-add=NET_ADMIN to allow it + +# usage: [sudo] docker run -it --rm \ +# --device /dev/net/tun \ +# --cap-add=NET_ADMIN \ +# iodined -f 10.0.0.1 -P "password" test.com + +FROM ubuntu:24.04 + +COPY --from=0 /app/bin/iodined /iodined + +ENTRYPOINT [ "/iodined" ] +CMD [ "-h" ]