From c3220327e11cb4a2a2cc7c5f678374ee61bc686c Mon Sep 17 00:00:00 2001 From: m5r Date: Sat, 20 Jul 2024 03:18:49 +0200 Subject: [PATCH] remove CGO_ENABLED=0 & introduce compose file --- .dockerignore | 5 ++--- .gitignore | 6 +++++- Dockerfile | 2 +- compose.yml | 14 ++++++++++++++ 4 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 compose.yml diff --git a/.dockerignore b/.dockerignore index 04dcbec..20ca78a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,4 @@ ddd -old loadtest -.lego.new -.lego.bak \ No newline at end of file +*.log +local-ip.sh diff --git a/.gitignore b/.gitignore index 67e910e..1877be4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ -/.lego \ No newline at end of file +/.lego +ddd +loadtest +*.log +local-ip.sh diff --git a/Dockerfile b/Dockerfile index 653c1a9..17a690b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /app COPY . . RUN go mod download -RUN CGO_ENABLED=0 go build -o /app/local-ip +RUN go build -o /app/local-ip FROM gcr.io/distroless/base-debian12:latest diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..b06b38c --- /dev/null +++ b/compose.yml @@ -0,0 +1,14 @@ +services: + local-ip.sh: + image: local-ip.sh + build: . + volumes: + - lego:/local-ip/.lego + restart: unless-stopped + ports: + - 53:53/udp + - 80:80/tcp + - 443:443/tcp + +volumes: + lego: