Changed registry to quay.io
Build and push Nginx on almalinux based container images / Build nginx container images (1.22) (push) Successful in 3m14s Details
Build and push Nginx on almalinux based container images / Build nginx container images (1.24) (push) Successful in 2m56s Details
Build and push Nginx on alpine based container images / Build nginx container images (map[alpine:3.17 nginx:1.22]) (push) Failing after 27s Details
Build and push Nginx on almalinux based container images / Build latest nginx almalinux based container images (push) Successful in 3m7s Details
Build and push Nginx on alpine based container images / Build nginx container images (map[alpine:3.19 nginx:1.24]) (push) Failing after 28s Details
Build and push Nginx on alpine based container images / Build nginx container images (map[alpine:3.21 nginx:1.26]) (push) Failing after 26s Details
Build and push Nginx on alpine based container images / Build latest nginx alpine based container images (push) Has been skipped Details

This commit is contained in:
Muhamad Aditya Prima 2024-12-16 15:18:25 +07:00
parent 6642f684ea
commit 2fb0947d8d
5 changed files with 36 additions and 32 deletions

View File

@ -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

View File

@ -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

View File

@ -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 <aprimediet@gmail.com>"
LABEL maintainer="Muhamad Aditya Prima <map@sindigilive.com>"
LABEL name="nginx"
LABEL version="${NGINX_VERSION}"
LABEL distribution-scope="public"

View File

@ -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="<Muhamad Aditya Prima> aprimediet@gmail.com"
FROM quay.io/aprimediet/alpine:${ALPINE_VERSION} AS builder
LABEL maintainer="<Muhamad Aditya Prima> map@sindigilive.com"
USER root
@ -33,7 +33,7 @@ ARG NGINX_VERSION=1.26
ENV NGINX_VERSION=${NGINX_VERSION}
LABEL maintainer="Muhamad Aditya Prima <aprimediet@gmail.com>"
LABEL maintainer="Muhamad Aditya Prima <map@sindigilive.com>"
LABEL name="nginx"
LABEL version="${NGINX_VERSION}"
LABEL distribution-scope="public"

View File

@ -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 "";