From 2fb0947d8d32badaac22d210c29fad3c9f12be29 Mon Sep 17 00:00:00 2001 From: Muhamad Aditya Prima Date: Mon, 16 Dec 2024 15:18:25 +0700 Subject: [PATCH] Changed registry to quay.io --- .gitea/workflows/almalinux.yaml | 30 ++++++++++++++++-------------- .gitea/workflows/alpine.yaml | 22 ++++++++++++---------- Dockerfile.almalinux | 6 +++--- Dockerfile.alpine | 6 +++--- scripts/entrypoint.sh | 4 ++-- 5 files changed, 36 insertions(+), 32 deletions(-) diff --git a/.gitea/workflows/almalinux.yaml b/.gitea/workflows/almalinux.yaml index 48a97ec..01c9bee 100644 --- a/.gitea/workflows/almalinux.yaml +++ b/.gitea/workflows/almalinux.yaml @@ -17,11 +17,12 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v4 - - name: Login to docker.io + - name: Login to quay.io uses: docker/login-action@v3 with: - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: quay.io + username: ${{ vars.QUAY_USERNAME }} + password: ${{ secrets.QUAY_SECRET }} # - name: Set up QEMU # uses: docker/setup-qemu-action@v3 - name: Setup Docker buildx @@ -36,13 +37,13 @@ jobs: build-args: | NGINX_VERSION=${{ matrix.version }} tags: | - ${{ vars.DOCKERHUB_USERNAME }}/nginx:${{ matrix.version }}-almalinux - - name: Scan container image with Trivy - uses: aquasecurity/trivy-action@0.20.0 - with: - image-ref: '${{ vars.DOCKERHUB_USERNAME }}/nginx:${{ matrix.version }}-almalinux' - format: 'sarif' - output: 'trivy-results.sarif' + quay.io/sindigilive/nginx:${{ matrix.version }}-almalinux + # - name: Scan container image with Trivy + # uses: aquasecurity/trivy-action@0.20.0 + # with: + # image-ref: 'quay.io/sindigilive/nginx:${{ matrix.version }}-almalinux' + # format: 'sarif' + # output: 'trivy-results.sarif' build-latest: name: Build latest nginx almalinux based container images runs-on: ubuntu-latest @@ -53,11 +54,12 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v4 - - name: Login to docker.io + - name: Login to quay.io uses: docker/login-action@v3 with: - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: quay.io + username: ${{ vars.QUAY_USERNAME }} + password: ${{ secrets.QUAY_SECRET }} # - name: Set up QEMU # uses: docker/setup-qemu-action@v3 - name: Setup Docker buildx @@ -70,4 +72,4 @@ jobs: context: . file: Dockerfile.almalinux tags: | - ${{ vars.DOCKERHUB_USERNAME }}/nginx:almalinux + quay.io/sindigilive/nginx:almalinux diff --git a/.gitea/workflows/alpine.yaml b/.gitea/workflows/alpine.yaml index 5809127..782a38e 100644 --- a/.gitea/workflows/alpine.yaml +++ b/.gitea/workflows/alpine.yaml @@ -23,11 +23,12 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v4 - - name: Login to docker.io + - name: Login to quay.io uses: docker/login-action@v3 with: - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: quay.io + username: ${{ vars.QUAY_USERNAME }} + password: ${{ secrets.QUAY_SECRET }} # - name: Set up QEMU # uses: docker/setup-qemu-action@v3 - name: Setup Docker buildx @@ -43,11 +44,11 @@ jobs: ALPINE_VERSION=${{ matrix.version.alpine }} NGINX_VERSION=${{ matrix.version.nginx }} tags: | - ${{ vars.DOCKERHUB_USERNAME }}/nginx:${{ matrix.version.nginx }}-alpine + quay.io/sindigilive/nginx:${{ matrix.version.nginx }}-alpine - name: Scan container image with Trivy uses: aquasecurity/trivy-action@0.20.0 with: - image-ref: '${{ vars.DOCKERHUB_USERNAME }}/nginx:${{ matrix.version.nginx }}-alpine' + image-ref: 'quay.io/sindigilive/nginx:${{ matrix.version.nginx }}-alpine' format: 'sarif' output: 'trivy-results.sarif' build-latest: @@ -60,11 +61,12 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v4 - - name: Login to docker.io + - name: Login to quay.io uses: docker/login-action@v3 with: - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: quay.io + username: ${{ vars.QUAY_USERNAME }} + password: ${{ secrets.QUAY_SECRET }} # - name: Set up QEMU # uses: docker/setup-qemu-action@v3 - name: Setup Docker buildx @@ -77,5 +79,5 @@ jobs: context: . file: Dockerfile.alpine tags: | - ${{ vars.DOCKERHUB_USERNAME }}/nginx:alpine - ${{ vars.DOCKERHUB_USERNAME }}/nginx:latest + quay.io/sindigilive/nginx:alpine + quay.io/sindigilive/nginx:latest diff --git a/Dockerfile.almalinux b/Dockerfile.almalinux index bb6ac16..fd5b256 100644 --- a/Dockerfile.almalinux +++ b/Dockerfile.almalinux @@ -1,6 +1,6 @@ ARG ALMALINUX_VERSION=9.5 -FROM aprimediet/almalinux:${ALMALINUX_VERSION} AS builder +FROM quay.io/sindigilive/almalinux:${ALMALINUX_VERSION} AS builder ARG NGINX_VERSION=1.24 @@ -16,7 +16,7 @@ RUN mkdir -p /mnt/rootfs; \ --releasever 9 --setopt install_weak_deps=false --nodocs -y; \ dnf --installroot /mnt/rootfs clean all; -FROM aprimediet/almalinux:${ALMALINUX_VERSION}-micro AS stage2 +FROM quay.io/sindigilive/almalinux:${ALMALINUX_VERSION}-micro AS stage2 ENV DIR_DEPS="/var/run/nginx /var/log/nginx /var/lib/nginx/tmp /var/cache/nginx" @@ -50,7 +50,7 @@ FROM scratch ARG NGINX_VERSION=1.24 ENV NGINX_VERSION=${NGINX_VERSION} -LABEL maintainer="Muhamad Aditya Prima " +LABEL maintainer="Muhamad Aditya Prima " LABEL name="nginx" LABEL version="${NGINX_VERSION}" LABEL distribution-scope="public" diff --git a/Dockerfile.alpine b/Dockerfile.alpine index b7eb3d9..7800644 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -3,8 +3,8 @@ # 1.26.2 Alpine 3.21 ARG ALPINE_VERSION=3.21 -FROM docker.io/aprimediet/alpine:${ALPINE_VERSION} AS builder -LABEL maintainer=" aprimediet@gmail.com" +FROM quay.io/aprimediet/alpine:${ALPINE_VERSION} AS builder +LABEL maintainer=" map@sindigilive.com" USER root @@ -33,7 +33,7 @@ ARG NGINX_VERSION=1.26 ENV NGINX_VERSION=${NGINX_VERSION} -LABEL maintainer="Muhamad Aditya Prima " +LABEL maintainer="Muhamad Aditya Prima " LABEL name="nginx" LABEL version="${NGINX_VERSION}" LABEL distribution-scope="public" diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index 033f8d4..fc3e821 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -1,7 +1,7 @@ #!/bin/sh /bin/echo "### Nginx version :$NGINX_VERSION ###"; -/bin/echo "### Maintainer: aprimediet@gmail.com ###"; +/bin/echo "### Maintainer: map@sindigilive.com ###"; /bin/echo ""; # /bin/echo "### Configuring nginx ###"; @@ -19,7 +19,7 @@ # /bin/sed -i "s|#NGINX_ENABLE_STUB#||" /app/conf/nginx.conf; # fi -/bin/echo ""; +# /bin/echo ""; /bin/echo "### Starting Nginx $NGINX_VERSION ###"; /bin/echo "";