forked from rabbitmq/default-user-credential-updater
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (17 loc) · 780 Bytes
/
Dockerfile
File metadata and controls
23 lines (17 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
ARG GO_TAG=1.25
ARG DOCKER_REGISTRY=docker.io
FROM --platform=$BUILDPLATFORM ${DOCKER_REGISTRY}/library/golang:${GO_TAG} AS builder
WORKDIR /go/src/app
ADD . /go/src/app
RUN go get -v ./...
ENV CGO_ENABLED=0
RUN go build -o /go/bin/app
FROM scratch
ARG BININFO_BUILD_DATE BININFO_COMMIT_HASH BININFO_VERSION
LABEL source_repository="https://github.com/sapcc/rabbitmq-user-credential-updater" \
org.opencontainers.image.url="https://github.com/sapcc/rabbitmq-user-credential-updater" \
org.opencontainers.image.created=${BININFO_BUILD_DATE} \
org.opencontainers.image.revision=${BININFO_COMMIT_HASH} \
org.opencontainers.image.version=${BININFO_VERSION}
COPY --from=builder /go/bin/app /default-user-credential-updater
ENTRYPOINT ["/default-user-credential-updater"]