Skip to content

Commit 0985999

Browse files
authored
Update Docker frontend and remove noisy summaries for tests (#2182)
Problem: Docker added summaries for the GitHub Action, but they are very noisy and we don't need them for test images. There's also a new fronted that adds linting. Solution: Remove the summaries for test builds and update Dockerfile with the new fronted. Fix warnings found.
1 parent 5968bc3 commit 0985999

File tree

8 files changed

+22
-18
lines changed

8 files changed

+22
-18
lines changed

.github/workflows/conformance.yml

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
runs-on: ubuntu-22.04
2727
permissions:
2828
contents: write # needed for uploading release artifacts
29+
env:
30+
DOCKER_BUILD_NO_SUMMARY: true
2931
steps:
3032
- name: Checkout Repository
3133
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

.github/workflows/functional.yml

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
functional-tests:
2222
name: Run Tests
2323
runs-on: ubuntu-22.04
24+
env:
25+
DOCKER_BUILD_NO_SUMMARY: true
2426
steps:
2527
- name: Checkout Repository
2628
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

build/Dockerfile

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
# syntax=docker/dockerfile:1.7
2-
FROM golang:1.22 as builder
1+
# syntax=docker/dockerfile:1.8
2+
FROM golang:1.22 AS builder
33

44
WORKDIR /go/src/github.com/nginxinc/nginx-gateway-fabric
55

6-
COPY go.mod go.sum /go/src/github.com/nginxinc/nginx-gateway-fabric
6+
COPY go.mod go.sum /go/src/github.com/nginxinc/nginx-gateway-fabric/
77
RUN go mod download
88

99
COPY . /go/src/github.com/nginxinc/nginx-gateway-fabric
1010
RUN make build
1111

12-
FROM golang:1.22 as ca-certs-provider
12+
FROM golang:1.22 AS ca-certs-provider
1313

14-
FROM alpine:3.20 as capabilizer
14+
FROM alpine:3.20 AS capabilizer
1515
RUN apk add --no-cache libcap
1616

17-
FROM capabilizer as local-capabilizer
17+
FROM capabilizer AS local-capabilizer
1818
COPY ./build/out/gateway /usr/bin/
1919
RUN setcap 'cap_kill=+ep' /usr/bin/gateway
2020

21-
FROM capabilizer as container-capabilizer
21+
FROM capabilizer AS container-capabilizer
2222
COPY --from=builder /go/src/github.com/nginxinc/nginx-gateway-fabric/build/out/gateway /usr/bin/
2323
RUN setcap 'cap_kill=+ep' /usr/bin/gateway
2424

25-
FROM capabilizer as goreleaser-capabilizer
25+
FROM capabilizer AS goreleaser-capabilizer
2626
ARG TARGETARCH
2727
COPY dist/gateway_linux_$TARGETARCH*/gateway /usr/bin/
2828
RUN setcap 'cap_kill=+ep' /usr/bin/gateway
2929

30-
FROM scratch as common
30+
FROM scratch AS common
3131
# CA certs are needed for telemetry report and NGINX Plus usage report features, so that
3232
# NGF can verify the server's certificate.
3333
COPY --from=ca-certs-provider --link /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
@@ -36,11 +36,11 @@ ARG BUILD_AGENT
3636
ENV BUILD_AGENT=${BUILD_AGENT}
3737
ENTRYPOINT [ "/usr/bin/gateway" ]
3838

39-
FROM common as container
39+
FROM common AS container
4040
COPY --from=container-capabilizer /usr/bin/gateway /usr/bin/
4141

42-
FROM common as local
42+
FROM common AS local
4343
COPY --from=local-capabilizer /usr/bin/gateway /usr/bin/
4444

45-
FROM common as goreleaser
45+
FROM common AS goreleaser
4646
COPY --from=goreleaser-capabilizer /usr/bin/gateway /usr/bin/

build/Dockerfile.nginx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# syntax=docker/dockerfile:1.7
1+
# syntax=docker/dockerfile:1.8
22
FROM nginx:1.27.0-alpine-otel
33

44
ARG NJS_DIR

build/Dockerfile.nginxplus

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# syntax=docker/dockerfile:1.7
2-
FROM scratch as nginx-files
1+
# syntax=docker/dockerfile:1.8
2+
FROM scratch AS nginx-files
33

44
# the following links can be replaced with local files if needed, i.e. ADD --chown=101:1001 <local_file> <container_file>
55
ADD --link --chown=101:1001 https://cs.nginx.com/static/keys/nginx_signing.rsa.pub nginx_signing.rsa.pub

debug/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# syntax=docker/dockerfile:1.7
1+
# syntax=docker/dockerfile:1.8
22
# This Dockerfile builds an image with the dlv debugger. See the debugging guide in the developer docs for details
33
# on how to use it.
44
FROM golang:1.22-alpine AS builder

tests/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# syntax=docker/dockerfile:1.7
1+
# syntax=docker/dockerfile:1.8
22
# this is here so we can grab the latest version of kind and have dependabot keep it up to date
33
FROM kindest/node:v1.30.0

tests/conformance/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# syntax=docker/dockerfile:1.7
1+
# syntax=docker/dockerfile:1.8
22
FROM golang:1.22
33

44
WORKDIR /go/src/github.com/nginxinc/nginx-gateway-fabric/tests/conformance

0 commit comments

Comments
 (0)