This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/proxy.Dockerfile

37 lines
867 B
Docker
Raw Permalink Normal View History

# Stage 1: Generate API Client
FROM openapitools/openapi-generator-cli as api-builder
COPY ./schema.yml /local/schema.yml
RUN docker-entrypoint.sh generate \
--git-host goauthentik.io \
--git-repo-id outpost \
--git-user-id api \
-i /local/schema.yml \
-g go \
-o /local/api \
--additional-properties=packageName=api,enumClassPrefix=true,useOneOfDiscriminatorLookup=true && \
rm -f /local/api/go.mod /local/api/go.sum
# Stage 2: Build
FROM golang:1.16.6 AS builder
2020-09-02 22:04:12 +00:00
WORKDIR /go/src/goauthentik.io
2020-09-02 22:04:12 +00:00
COPY . .
COPY --from=api-builder /local/api api
2020-09-02 22:04:12 +00:00
RUN go build -o /go/proxy ./cmd/proxy
2020-09-02 22:04:12 +00:00
# Stage 3: Run
2020-09-19 09:43:22 +00:00
FROM gcr.io/distroless/base-debian10:debug
ARG GIT_BUILD_HASH
ENV GIT_BUILD_HASH=$GIT_BUILD_HASH
COPY --from=builder /go/proxy /
2020-09-19 09:43:22 +00:00
2020-12-05 21:08:42 +00:00
HEALTHCHECK CMD [ "wget", "--spider", "http://localhost:4180/akprox/ping" ]
2020-09-19 09:43:22 +00:00
2020-09-02 22:04:12 +00:00
ENTRYPOINT ["/proxy"]