Skip to content

Commit 2104809

Browse files
authored
Add more labels to Docker image (#222)
1 parent d772123 commit 2104809

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
with:
112112
file: build/Dockerfile
113113
context: '.'
114-
target: local
114+
target: goreleaser
115115
platforms: ${{ github.event_name != 'pull_request' && env.DOCKER_PLATFORMS || '' }}
116116
tags: ${{ steps.meta.outputs.tags }}
117117
labels: ${{ steps.meta.outputs.labels }}

build/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ FROM intermediate as container
2525
COPY --from=builder /go/src/github.com/nginxinc/nginx-prometheus-exporter/nginx-prometheus-exporter /usr/bin/
2626

2727

28-
FROM intermediate as local
28+
FROM intermediate as goreleaser
2929
ARG TARGETARCH
3030
ARG TARGETVARIANT
31+
ARG TARGETPLATFORM
32+
33+
LABEL org.nginx.exporter.image.build.target="${TARGETPLATFORM}"
34+
LABEL org.nginx.exporter.image.build.version="goreleaser"
3135

3236
COPY dist/nginx-prometheus-exporter_linux_$TARGETARCH${TARGETVARIANT:+_7}*/nginx-prometheus-exporter /usr/bin/

0 commit comments

Comments
 (0)