Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Docker frontend and remove noisy summaries for tests #2182

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
runs-on: ubuntu-22.04
permissions:
contents: write # needed for uploading release artifacts
env:
DOCKER_BUILD_NO_SUMMARY: true
steps:
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
functional-tests:
name: Run Tests
runs-on: ubuntu-22.04
env:
DOCKER_BUILD_NO_SUMMARY: true
steps:
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand Down
24 changes: 12 additions & 12 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# syntax=docker/dockerfile:1.7
FROM golang:1.22 as builder
# syntax=docker/dockerfile:1.8
FROM golang:1.22 AS builder

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

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

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

FROM golang:1.22 as ca-certs-provider
FROM golang:1.22 AS ca-certs-provider

FROM alpine:3.20 as capabilizer
FROM alpine:3.20 AS capabilizer
RUN apk add --no-cache libcap

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

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

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

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

FROM common as container
FROM common AS container
COPY --from=container-capabilizer /usr/bin/gateway /usr/bin/

FROM common as local
FROM common AS local
COPY --from=local-capabilizer /usr/bin/gateway /usr/bin/

FROM common as goreleaser
FROM common AS goreleaser
COPY --from=goreleaser-capabilizer /usr/bin/gateway /usr/bin/
2 changes: 1 addition & 1 deletion build/Dockerfile.nginx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.7
# syntax=docker/dockerfile:1.8
FROM nginx:1.27.0-alpine-otel

ARG NJS_DIR
Expand Down
4 changes: 2 additions & 2 deletions build/Dockerfile.nginxplus
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1.7
FROM scratch as nginx-files
# syntax=docker/dockerfile:1.8
FROM scratch AS nginx-files

# the following links can be replaced with local files if needed, i.e. ADD --chown=101:1001 <local_file> <container_file>
ADD --link --chown=101:1001 https://cs.nginx.com/static/keys/nginx_signing.rsa.pub nginx_signing.rsa.pub
Expand Down
2 changes: 1 addition & 1 deletion debug/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.7
# syntax=docker/dockerfile:1.8
# This Dockerfile builds an image with the dlv debugger. See the debugging guide in the developer docs for details
# on how to use it.
FROM golang:1.22-alpine AS builder
Expand Down
2 changes: 1 addition & 1 deletion tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# syntax=docker/dockerfile:1.7
# syntax=docker/dockerfile:1.8
# this is here so we can grab the latest version of kind and have dependabot keep it up to date
FROM kindest/node:v1.30.0
2 changes: 1 addition & 1 deletion tests/conformance/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.7
# syntax=docker/dockerfile:1.8
FROM golang:1.22

WORKDIR /go/src/github.com/nginxinc/nginx-gateway-fabric/tests/conformance
Expand Down
Loading