feat: added steps to build. moved Dockerfiles to a "docker" directory (changes the build command !)

This commit is contained in:
Tech0ne 2025-07-18 09:41:19 +02:00
parent 01a1156ad7
commit ea7ffdd1ef
2 changed files with 16 additions and 26 deletions

View file

@ -6,19 +6,7 @@
#
##############
# FROM alpine:3.22.0
#
# RUN apk update
# RUN apk add --no-cache \
# gcc \
# git \
# linux-headers \
# make \
# musl-dev \
# pkgconfig \
# zlib-dev
FROM ubuntu:24.04
FROM ubuntu:24.04 AS builder
RUN apt-get update
@ -37,6 +25,8 @@ 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
@ -45,5 +35,9 @@ RUN make
# --cap-add=NET_ADMIN \
# iodine -f -r 192.168.0.1 -P "password" test.com
ENTRYPOINT [ "/app/bin/iodine" ]
FROM ubuntu:24.04
COPY --from=0 /app/bin/iodine /iodine
ENTRYPOINT [ "/iodine" ]
CMD [ "-h" ]

View file

@ -6,17 +6,7 @@
#
##############
# FROM alpine:3.22.0
#
# RUN apk update
# RUN apk add --no-cache \
# gcc \
# make \
# musl-dev \
# pkgconfig \
# zlib-dev
FROM ubuntu:24.04
FROM ubuntu:24.04 AS builder
RUN apt-get update
@ -35,6 +25,8 @@ 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
@ -43,5 +35,9 @@ RUN make
# --cap-add=NET_ADMIN \
# iodined -f 10.0.0.1 -P "password" test.com
ENTRYPOINT [ "/app/bin/iodined" ]
FROM ubuntu:24.04
COPY --from=0 /app/bin/iodined /iodined
ENTRYPOINT [ "/iodined" ]
CMD [ "-h" ]