From e3418f4173501d1723b0ca55dcb7e08d36a2df65 Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Thu, 14 Nov 2024 21:56:42 +0100 Subject: [PATCH] using the go proxy nexus repo if the env vars are set --- Dockerfile.prod | 7 ++++++- compose.yaml | 10 ++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Dockerfile.prod b/Dockerfile.prod index 35badd6..c420976 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,4 +1,9 @@ -FROM alpine:3.20.2 as builder +FROM wharf.wamblee.org/alpine:3.20.2 as builder +ARG GOPROXY +ARG GOSUMDB + +ENV GOPROXY=$GOPROXY +ENV GOSUMDB=$GOSUMDB RUN apk update && apk add go curl RUN mkdir -p /opt/converge/bin diff --git a/compose.yaml b/compose.yaml index dea14e1..7b3a0c9 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,4 +1,8 @@ +x-proxy-args: &proxy-args + GOPROXY: ${GOPROXY} + GOSUMDB: ${GOSUMDB} + services: converge: @@ -6,8 +10,11 @@ services: build: context: . dockerfile: Dockerfile.prod + args: + <<: *proxy-args ports: - 8000:8000 + converge-tester: @@ -15,6 +22,9 @@ services: build: context: . dockerfile: Dockerfile.test + args: + <<: *proxy-args profiles: - build +