You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-07-05 01:08:48 +02:00
doc: add standard opencontainer docker labels (#2800)
This commit is contained in:
@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
## Changes since v7.7.1
|
## Changes since v7.7.1
|
||||||
|
|
||||||
|
- [#2800](https://github.com/oauth2-proxy/oauth2-proxy/pull/2800) Add some opencontainer labels to docker image (@halkeye)
|
||||||
|
|
||||||
# V7.7.1
|
# V7.7.1
|
||||||
|
|
||||||
## Release Highlights
|
## Release Highlights
|
||||||
|
15
Dockerfile
15
Dockerfile
@ -1,5 +1,7 @@
|
|||||||
# This ARG has to be at the top, otherwise the docker daemon does not known what to do with FROM ${RUNTIME_IMAGE}
|
# This ARG has to be at the top, otherwise the docker daemon does not known what to do with FROM ${RUNTIME_IMAGE}
|
||||||
ARG RUNTIME_IMAGE=gcr.io/distroless/static:nonroot
|
ARG RUNTIME_IMAGE=gcr.io/distroless/static:nonroot
|
||||||
|
# version is shared between mutiple buildstages
|
||||||
|
ARG VERSION
|
||||||
|
|
||||||
# All builds should be done using the platform native to the build node to allow
|
# All builds should be done using the platform native to the build node to allow
|
||||||
# cache sharing of the go mod download step.
|
# cache sharing of the go mod download step.
|
||||||
@ -19,7 +21,6 @@ COPY . .
|
|||||||
|
|
||||||
# Arguments go here so that the previous steps can be cached if no external
|
# Arguments go here so that the previous steps can be cached if no external
|
||||||
# sources have changed.
|
# sources have changed.
|
||||||
ARG VERSION
|
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
ARG BUILDPLATFORM
|
ARG BUILDPLATFORM
|
||||||
|
|
||||||
@ -33,7 +34,7 @@ ARG BUILDPLATFORM
|
|||||||
# automatically set by the docker engine.
|
# automatically set by the docker engine.
|
||||||
RUN case ${TARGETPLATFORM} in \
|
RUN case ${TARGETPLATFORM} in \
|
||||||
"linux/amd64") GOARCH=amd64 ;; \
|
"linux/amd64") GOARCH=amd64 ;; \
|
||||||
# arm64 and arm64v8 are equivilant in go and do not require a goarm
|
# arm64 and arm64v8 are equivalent in go and do not require a goarm
|
||||||
# https://github.com/golang/go/wiki/GoArm
|
# https://github.com/golang/go/wiki/GoArm
|
||||||
"linux/arm64" | "linux/arm/v8") GOARCH=arm64 ;; \
|
"linux/arm64" | "linux/arm/v8") GOARCH=arm64 ;; \
|
||||||
"linux/ppc64le") GOARCH=ppc64le ;; \
|
"linux/ppc64le") GOARCH=ppc64le ;; \
|
||||||
@ -46,7 +47,17 @@ RUN case ${TARGETPLATFORM} in \
|
|||||||
|
|
||||||
# Copy binary to runtime image
|
# Copy binary to runtime image
|
||||||
FROM ${RUNTIME_IMAGE}
|
FROM ${RUNTIME_IMAGE}
|
||||||
|
ARG VERSION
|
||||||
|
|
||||||
COPY --from=builder /go/src/github.com/oauth2-proxy/oauth2-proxy/oauth2-proxy /bin/oauth2-proxy
|
COPY --from=builder /go/src/github.com/oauth2-proxy/oauth2-proxy/oauth2-proxy /bin/oauth2-proxy
|
||||||
COPY --from=builder /go/src/github.com/oauth2-proxy/oauth2-proxy/jwt_signing_key.pem /etc/ssl/private/jwt_signing_key.pem
|
COPY --from=builder /go/src/github.com/oauth2-proxy/oauth2-proxy/jwt_signing_key.pem /etc/ssl/private/jwt_signing_key.pem
|
||||||
|
|
||||||
|
LABEL org.opencontainers.image.licenses=MIT \
|
||||||
|
org.opencontainers.image.description="A reverse proxy that provides authentication with Google, Azure, OpenID Connect and many more identity providers." \
|
||||||
|
org.opencontainers.image.documentation=https://oauth2-proxy.github.io/oauth2-proxy/ \
|
||||||
|
org.opencontainers.image.source=https://github.com/oauth2-proxy/oauth2-proxy \
|
||||||
|
org.opencontainers.image.url=https://quay.io/oauth2-proxy/oauth2-proxy \
|
||||||
|
org.opencontainers.image.title=oauth2-proxy \
|
||||||
|
org.opencontainers.image.version=${VERSION}
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/oauth2-proxy"]
|
ENTRYPOINT ["/bin/oauth2-proxy"]
|
||||||
|
Reference in New Issue
Block a user