Skip to content

Commit

Permalink
fix: remove SHAs from S3 Gateway image
Browse files Browse the repository at this point in the history
  • Loading branch information
alessfg committed May 7, 2024
1 parent 2139ac0 commit 0bb378d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ permissions: read-all

jobs:
build-oss-for-test:
name: Build NGINX OSS image
runs-on: ubuntu-22.04
steps:
- name: Check out the codebase
Expand All @@ -49,6 +50,7 @@ jobs:
if-no-files-found: error

test-oss:
name: Test NGINX OSS image
runs-on: ubuntu-22.04
needs: build-oss-for-test
strategy:
Expand Down Expand Up @@ -91,6 +93,7 @@ jobs:
run: S3_STYLE=${{ matrix.path_style }} ./test.sh --type oss

build-latest-njs-for-test:
name: Build NGINX OSS image using latest njs commit
runs-on: ubuntu-22.04
needs: test-oss
steps:
Expand Down Expand Up @@ -134,6 +137,7 @@ jobs:
if-no-files-found: error

test-latest-njs:
name: Test NGINX OSS image using latest njs commit
runs-on: ubuntu-22.04
needs: build-latest-njs-for-test
steps:
Expand Down Expand Up @@ -174,6 +178,7 @@ jobs:
run: ./test.sh --latest-njs --type oss

build-unprivileged-for-test:
name: Build NGINX unprivileged image
runs-on: ubuntu-22.04
needs: test-oss
steps:
Expand Down Expand Up @@ -217,6 +222,7 @@ jobs:
if-no-files-found: error

test-unprivileged:
name: Test NGINX unprivileged image
runs-on: ubuntu-22.04
needs: build-unprivileged-for-test
steps:
Expand Down Expand Up @@ -258,6 +264,7 @@ jobs:

# As a last step (only if run from main) multi-architecture images are built and pushed to Docker Hub and the GitHub Container Registry
tag-and-push:
name: Tag and push all built and tested NGINX images
runs-on: ubuntu-22.04
needs: [test-oss, test-latest-njs, test-unprivileged]
if: |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.latest-njs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This container image removes the existing njs package from the inherited image
# (which could be OSS NGINX or NGINX Plus), builds njs from the latest
# source, and installs it.
FROM nginxinc/nginx-s3-gateway@sha256:8aa48324479b3653b5936183cc97f2ca1aa9078d229042f1bca357834bd906f4
FROM nginx-s3-gateway

RUN set -eux \
export DEBIAN_FRONTEND=noninteractive; \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.unprivileged
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# to allow running NGINX S3 Gateway as a non root user.
# Steps are based on the official unprivileged container:
# https://github.com/nginxinc/docker-nginx-unprivileged/blob/main/Dockerfile-debian.template
FROM nginxinc/nginx-s3-gateway@sha256:8aa48324479b3653b5936183cc97f2ca1aa9078d229042f1bca357834bd906f4
FROM nginx-s3-gateway

# Implement changes required to run NGINX as an unprivileged user
RUN sed -i "/^server {/a \ listen 8080;" /etc/nginx/templates/default.conf.template \
Expand Down
3 changes: 1 addition & 2 deletions examples/brotli-compression/Dockerfile.oss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM nginxinc/nginx-s3-gateway@sha256:8aa48324479b3653b5936183cc97f2ca1aa9078d229042f1bca357834bd906f4@sha256:8aa48324479b3653b5936183cc97f2ca1aa9078d229042f1bca357834bd906f4@sha256:8aa48324479b3653b5936183cc97f2ca1aa9078d229042f1bca357834bd906f4@sha256:8aa48324479b3653b5936183cc97f2ca1aa9078d229042f1bca357834bd906f4@sha256:8aa48324479b3653b5936183cc97f2ca1aa9078d229042f1bca357834bd906f4

FROM nginxinc/nginx-s3-gateway@sha256:8aa48324479b3653b5936183cc97f2ca1aa9078d229042f1bca357834bd906f4
ENV BROTLI_VERSION "v1.0.0rc"

# Build Brotli module from source because there is no repository package
Expand Down

0 comments on commit 0bb378d

Please sign in to comment.