root: build outposts without CGO, use debug images for basic shell

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-11-02 10:11:51 +01:00
parent 49a98bb744
commit 97b0f58f25
3 changed files with 7 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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