Skip to content

Commit 00989aa

Browse files
authored
Update Dockerfile version (#813)
1 parent 8291b25 commit 00989aa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

build/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# syntax=docker/dockerfile:1.6
2-
FROM golang:1.22 as base
1+
# syntax=docker/dockerfile:1.8
2+
FROM golang:1.22 AS base
33
ARG VERSION
44
ARG TARGETARCH
55

66
WORKDIR /go/src/github.com/nginxinc/nginx-prometheus-exporter
77

8-
FROM base as builder
8+
FROM base AS builder
99
COPY --link go.mod go.sum ./
1010
RUN go mod download
1111
COPY --link *.go ./
@@ -14,17 +14,17 @@ COPY --link client ./client
1414
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH go build -trimpath -a -ldflags "-s -w -X main.version=${VERSION}" -o nginx-prometheus-exporter .
1515

1616

17-
FROM scratch as intermediate
17+
FROM scratch AS intermediate
1818
COPY --from=base --link /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
1919
USER 1001:1001
2020
ENTRYPOINT [ "/usr/bin/nginx-prometheus-exporter" ]
2121

2222

23-
FROM intermediate as container
23+
FROM intermediate AS container
2424
COPY --from=builder --link /go/src/github.com/nginxinc/nginx-prometheus-exporter/nginx-prometheus-exporter /usr/bin/
2525

2626

27-
FROM intermediate as goreleaser
27+
FROM intermediate AS goreleaser
2828
ARG TARGETARCH
2929
ARG TARGETVARIANT
3030
ARG TARGETPLATFORM

0 commit comments

Comments
 (0)