From 97b0f58f25721cd0710fa9a2dc8c0dcd2bc11437 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 2 Nov 2021 10:11:51 +0100 Subject: [PATCH] root: build outposts without CGO, use debug images for basic shell Signed-off-by: Jens Langhammer --- Dockerfile | 2 +- ldap.Dockerfile | 6 +++--- proxy.Dockerfile | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 22de1393d..c2996141b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ ENV NODE_ENV=production RUN cd /static && npm i && npm run build # Stage 4: Build go proxy -FROM docker.io/golang:1.17.2 AS builder +FROM docker.io/golang:1.17.2-bullseye AS builder WORKDIR /work diff --git a/ldap.Dockerfile b/ldap.Dockerfile index 85f3201f5..bf375beab 100644 --- a/ldap.Dockerfile +++ b/ldap.Dockerfile @@ -1,14 +1,14 @@ # Stage 1: Build -FROM docker.io/golang:1.17.2 AS builder +FROM docker.io/golang:1.17.2-bullseye AS builder WORKDIR /go/src/goauthentik.io COPY . . - +ENV CGO_ENABLED=0 RUN go build -o /go/ldap ./cmd/ldap # Stage 2: Run -FROM gcr.io/distroless/static-debian11 +FROM gcr.io/distroless/static-debian11:debug ARG GIT_BUILD_HASH ENV GIT_BUILD_HASH=$GIT_BUILD_HASH diff --git a/proxy.Dockerfile b/proxy.Dockerfile index 08ad36e40..912807b11 100644 --- a/proxy.Dockerfile +++ b/proxy.Dockerfile @@ -7,7 +7,7 @@ ENV NODE_ENV=production RUN cd /static && npm i && npm run build # Stage 2: Build -FROM docker.io/golang:1.17.2 AS builder +FROM docker.io/golang:1.17.2-bullseye AS builder WORKDIR /go/src/goauthentik.io @@ -17,10 +17,11 @@ COPY --from=web-builder /static/security.txt /work/web/security.txt COPY --from=web-builder /static/dist/ /work/web/dist/ COPY --from=web-builder /static/authentik/ /work/web/authentik/ +ENV CGO_ENABLED=0 RUN go build -o /go/proxy ./cmd/proxy # Stage 3: Run -FROM gcr.io/distroless/static-debian11 +FROM gcr.io/distroless/static-debian11:debug ARG GIT_BUILD_HASH ENV GIT_BUILD_HASH=$GIT_BUILD_HASH