From 949bae5006eff0ee94c79750793c0c68f77a9c18 Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Tue, 29 Nov 2022 11:43:27 +0000 Subject: [PATCH 1/3] Add support for Amazon ECR --- .github/workflows/alpine-mainline.yml | 63 +++++++++++++++++++++++++++ .github/workflows/alpine-stable.yml | 63 +++++++++++++++++++++++++++ .github/workflows/debian-mainline.yml | 42 ++++++++++++++++++ .github/workflows/debian-stable.yml | 42 ++++++++++++++++++ 4 files changed, 210 insertions(+) diff --git a/.github/workflows/alpine-mainline.yml b/.github/workflows/alpine-mainline.yml index 833585af..6a235734 100644 --- a/.github/workflows/alpine-mainline.yml +++ b/.github/workflows/alpine-mainline.yml @@ -39,6 +39,17 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + + - name: Login to Amazon ECR + uses: aws-actions/amazon-ecr-login@v1 + with: + registry-type: public + - name: Login to Docker Hub uses: docker/login-action@v2 with: @@ -52,6 +63,16 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push NGINX mainline Alpine image to Amazon ECR + uses: docker/build-push-action@v3 + with: + platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64, linux/386, linux/ppc64le, linux/s390x + context: "{{ defaultContext }}:mainline/alpine" + tags: public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}.${{ needs.version.outputs.patch }}-alpine, public.ecr.aws/nginx/nginx-unprivileged:mainline-alpine, public.ecr.aws/nginx/nginx-unprivileged:1-alpine, public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}-alpine, public.ecr.aws/nginx/nginx-unprivileged:alpine + push: true + cache-from: type=gha,scope=alpine + cache-to: type=gha,mode=max,scope=alpine + - name: Build and push NGINX mainline Alpine image to Docker Hub id: build uses: docker/build-push-action@v3 @@ -112,6 +133,17 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + + - name: Login to Amazon ECR + uses: aws-actions/amazon-ecr-login@v1 + with: + registry-type: public + - name: Login to Docker Hub uses: docker/login-action@v2 with: @@ -125,6 +157,16 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push NGINX mainline perl Alpine image to Amazon ECR + uses: docker/build-push-action@v3 + with: + platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64, linux/386, linux/ppc64le, linux/s390x + context: "{{ defaultContext }}:mainline/alpine-perl" + tags: public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}.${{ needs.version.outputs.patch }}-alpine-perl, public.ecr.aws/nginx/nginx-unprivileged:mainline-alpine-perl, public.ecr.aws/nginx/nginx-unprivileged:1-alpine-perl, public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}-alpine-perl, public.ecr.aws/nginx/nginx-unprivileged:alpine-perl + push: true + cache-from: type=gha,scope=alpine-perl + cache-to: type=gha,mode=max,scope=alpine-perl + - name: Build and push NGINX mainline perl Alpine image to Docker Hub id: build uses: docker/build-push-action@v3 @@ -185,6 +227,17 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + + - name: Login to Amazon ECR + uses: aws-actions/amazon-ecr-login@v1 + with: + registry-type: public + - name: Login to Docker Hub uses: docker/login-action@v2 with: @@ -198,6 +251,16 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push NGINX mainline slim Alpine image to Amazon ECR + uses: docker/build-push-action@v3 + with: + platforms: linux/amd64, linux/arm64 + context: "{{ defaultContext }}:mainline/alpine-slim" + tags: public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}.${{ needs.version.outputs.patch }}-alpine-slim, public.ecr.aws/nginx/nginx-unprivileged:mainline-alpine-slim, public.ecr.aws/nginx/nginx-unprivileged:1-alpine-slim, public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}-alpine-slim, public.ecr.aws/nginx/nginx-unprivileged:alpine-slim + push: true + cache-from: type=gha,scope=alpine-slim + cache-to: type=gha,mode=max,scope=alpine-slim + - name: Build and push NGINX mainline slim Alpine image to Docker Hub id: build uses: docker/build-push-action@v3 diff --git a/.github/workflows/alpine-stable.yml b/.github/workflows/alpine-stable.yml index 6b80c83b..12ca928d 100644 --- a/.github/workflows/alpine-stable.yml +++ b/.github/workflows/alpine-stable.yml @@ -39,6 +39,17 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + + - name: Login to Amazon ECR + uses: aws-actions/amazon-ecr-login@v1 + with: + registry-type: public + - name: Login to Docker Hub uses: docker/login-action@v2 with: @@ -52,6 +63,16 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push NGINX stable Alpine image to Amazon ECR + uses: docker/build-push-action@v3 + with: + platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64, linux/386, linux/ppc64le, linux/s390x + context: "{{ defaultContext }}:stable/alpine" + tags: public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}.${{ needs.version.outputs.patch }}-alpine, public.ecr.aws/nginx/nginx-unprivileged:stable-alpine, public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}-alpine + push: true + cache-from: type=gha,scope=stable-alpine + cache-to: type=gha,mode=max,scope=stable-alpine + - name: Build and push NGINX stable Alpine image to Docker Hub id: build uses: docker/build-push-action@v3 @@ -110,6 +131,17 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + + - name: Login to Amazon ECR + uses: aws-actions/amazon-ecr-login@v1 + with: + registry-type: public + - name: Login to Docker Hub uses: docker/login-action@v2 with: @@ -123,6 +155,16 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push NGINX stable perl Alpine image to Amazon ECR + uses: docker/build-push-action@v3 + with: + platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64, linux/386, linux/ppc64le, linux/s390x + context: "{{ defaultContext }}:stable/alpine-perl" + tags: public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}.${{ needs.version.outputs.patch }}-alpine-perl, public.ecr.aws/nginx/nginx-unprivileged:stable-alpine-perl, public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}-alpine-perl + push: true + cache-from: type=gha,scope=stable-alpine-perl + cache-to: type=gha,mode=max,scope=stable-alpine-perl + - name: Build and push NGINX stable perl Alpine image to Docker Hub id: build uses: docker/build-push-action@v3 @@ -181,6 +223,17 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + + - name: Login to Amazon ECR + uses: aws-actions/amazon-ecr-login@v1 + with: + registry-type: public + - name: Login to Docker Hub uses: docker/login-action@v2 with: @@ -194,6 +247,16 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push NGINX stable slim Alpine image to Amazon ECR + uses: docker/build-push-action@v3 + with: + platforms: linux/amd64, linux/arm64 + context: "{{ defaultContext }}:stable/alpine-slim" + tags: public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}.${{ needs.version.outputs.patch }}-alpine-slim, public.ecr.aws/nginx/nginx-unprivileged:stable-alpine-slim, public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}-alpine-slim + push: true + cache-from: type=gha,scope=stable-alpine-slim + cache-to: type=gha,mode=max,scope=stable-alpine-slim + - name: Build and push NGINX stable slim Alpine image to Docker Hub id: build uses: docker/build-push-action@v3 diff --git a/.github/workflows/debian-mainline.yml b/.github/workflows/debian-mainline.yml index 5aa7d47a..c99726f1 100644 --- a/.github/workflows/debian-mainline.yml +++ b/.github/workflows/debian-mainline.yml @@ -39,6 +39,17 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + + - name: Login to Amazon ECR + uses: aws-actions/amazon-ecr-login@v1 + with: + registry-type: public + - name: Login to Docker Hub uses: docker/login-action@v2 with: @@ -52,6 +63,16 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push NGINX mainline Debian image to Amazon ECR + uses: docker/build-push-action@v3 + with: + platforms: linux/amd64, linux/arm/v5, linux/arm/v7, linux/arm64, linux/386, linux/mips64le, linux/ppc64le, linux/s390x + context: "{{ defaultContext }}:mainline/debian" + tags: public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}.${{ needs.version.outputs.patch }}, public.ecr.aws/nginx/nginx-unprivileged:mainline, public.ecr.aws/nginx/nginx-unprivileged:1, public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}, public.ecr.aws/nginx/nginx-unprivileged:latest + push: true + cache-from: type=gha,scope=debian + cache-to: type=gha,mode=max,scope=debian + - name: Build and push NGINX mainline Debian image to Docker Hub id: build uses: docker/build-push-action@v3 @@ -112,6 +133,17 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + + - name: Login to Amazon ECR + uses: aws-actions/amazon-ecr-login@v1 + with: + registry-type: public + - name: Login to Docker Hub uses: docker/login-action@v2 with: @@ -125,6 +157,16 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push NGINX mainline perl Debian image to Amazon ECR + uses: docker/build-push-action@v3 + with: + platforms: linux/amd64, linux/arm/v5, linux/arm/v7, linux/arm64, linux/386, linux/mips64le, linux/ppc64le, linux/s390x + context: "{{ defaultContext }}:mainline/debian-perl" + tags: public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}.${{ needs.version.outputs.patch }}-perl, public.ecr.aws/nginx/nginx-unprivileged:mainline-perl, public.ecr.aws/nginx/nginx-unprivileged:1-perl, public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}-perl, public.ecr.aws/nginx/nginx-unprivileged:perl + push: true + cache-from: type=gha,scope=debian-perl + cache-to: type=gha,mode=max,scope=debian-perl + - name: Build and push NGINX mainline perl Debian image to Docker Hub id: build uses: docker/build-push-action@v3 diff --git a/.github/workflows/debian-stable.yml b/.github/workflows/debian-stable.yml index f050e340..fdd0b455 100644 --- a/.github/workflows/debian-stable.yml +++ b/.github/workflows/debian-stable.yml @@ -39,6 +39,17 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + + - name: Login to Amazon ECR + uses: aws-actions/amazon-ecr-login@v1 + with: + registry-type: public + - name: Login to Docker Hub uses: docker/login-action@v2 with: @@ -52,6 +63,16 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push NGINX stable Debian image to Amazon ECR + uses: docker/build-push-action@v3 + with: + platforms: linux/amd64, linux/arm/v5, linux/arm/v7, linux/arm64, linux/mips64le, linux/ppc64le, linux/s390x + context: "{{ defaultContext }}:stable/debian" + tags: public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}.${{ needs.version.outputs.patch }}, public.ecr.aws/nginx/nginx-unprivileged:stable, public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }} + push: true + cache-from: type=gha,scope=stable-debian + cache-to: type=gha,mode=max,scope=stable-debian + - name: Build and push NGINX stable Debian image to Docker Hub id: build uses: docker/build-push-action@v3 @@ -110,6 +131,17 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + + - name: Login to Amazon ECR + uses: aws-actions/amazon-ecr-login@v1 + with: + registry-type: public + - name: Login to Docker Hub uses: docker/login-action@v2 with: @@ -123,6 +155,16 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push NGINX stable perl Debian image to Amazon ECR + uses: docker/build-push-action@v3 + with: + platforms: linux/amd64, linux/arm/v5, linux/arm/v7, linux/arm64, linux/386, linux/mips64le, linux/ppc64le, linux/s390x + context: "{{ defaultContext }}:mainline/debian-perl" + tags: public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}.${{ needs.version.outputs.patch }}-perl, public.ecr.aws/nginx/nginx-unprivileged:stable-perl, public.ecr.aws/nginx/nginx-unprivileged:${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}-perl + push: true + cache-from: type=gha,scope=stable-debian-perl + cache-to: type=gha,mode=max,scope=stable-debian-perl + - name: Build and push NGINX stable perl Debian image to Docker Hub id: build uses: docker/build-push-action@v3 From 66a468fefc2f60b6b4348f493228c041a3dee7df Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Mon, 19 Dec 2022 14:25:15 +0100 Subject: [PATCH 2/3] Add AWS region --- .github/workflows/alpine-mainline.yml | 3 +++ .github/workflows/alpine-stable.yml | 3 +++ .github/workflows/debian-mainline.yml | 2 ++ .github/workflows/debian-stable.yml | 2 ++ 4 files changed, 10 insertions(+) diff --git a/.github/workflows/alpine-mainline.yml b/.github/workflows/alpine-mainline.yml index 6a235734..8ab0b6b8 100644 --- a/.github/workflows/alpine-mainline.yml +++ b/.github/workflows/alpine-mainline.yml @@ -42,6 +42,7 @@ jobs: - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: + aws-region: ${{ secrets.AWS_REGION }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -136,6 +137,7 @@ jobs: - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: + aws-region: ${{ secrets.AWS_REGION }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -230,6 +232,7 @@ jobs: - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: + aws-region: ${{ secrets.AWS_REGION }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/alpine-stable.yml b/.github/workflows/alpine-stable.yml index 12ca928d..fb57b637 100644 --- a/.github/workflows/alpine-stable.yml +++ b/.github/workflows/alpine-stable.yml @@ -42,6 +42,7 @@ jobs: - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: + aws-region: ${{ secrets.AWS_REGION }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -134,6 +135,7 @@ jobs: - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: + aws-region: ${{ secrets.AWS_REGION }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -226,6 +228,7 @@ jobs: - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: + aws-region: ${{ secrets.AWS_REGION }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/debian-mainline.yml b/.github/workflows/debian-mainline.yml index c99726f1..9e7a7877 100644 --- a/.github/workflows/debian-mainline.yml +++ b/.github/workflows/debian-mainline.yml @@ -42,6 +42,7 @@ jobs: - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: + aws-region: ${{ secrets.AWS_REGION }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -136,6 +137,7 @@ jobs: - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: + aws-region: ${{ secrets.AWS_REGION }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/debian-stable.yml b/.github/workflows/debian-stable.yml index fdd0b455..9c34b3c6 100644 --- a/.github/workflows/debian-stable.yml +++ b/.github/workflows/debian-stable.yml @@ -42,6 +42,7 @@ jobs: - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: + aws-region: ${{ secrets.AWS_REGION }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -134,6 +135,7 @@ jobs: - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: + aws-region: ${{ secrets.AWS_REGION }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} From 653338363a03910d41be74aa338b07e2ae2c910f Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Mon, 19 Dec 2022 22:27:01 +0100 Subject: [PATCH 3/3] Update README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dacbd91a..b9b3fcda 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,9 @@ Check out the [docs](https://hub.docker.com/_/nginx) for the upstream Docker NGI You can find built images in the following registries: -* GitHub Container Registry - +* Amazon ECR - * Docker Hub - +* GitHub Container Registry - ### Platforms