From 5685eada113ac046946c245833b01c8061bfc016 Mon Sep 17 00:00:00 2001 From: Muhamad Aditya Prima Date: Mon, 16 Dec 2024 03:50:06 +0700 Subject: [PATCH] Changed registry to quay.io --- .gitea/workflows/alpine.yaml | 34 ++++++++++------------------------ Dockerfile | 3 +-- 2 files changed, 11 insertions(+), 26 deletions(-) diff --git a/.gitea/workflows/alpine.yaml b/.gitea/workflows/alpine.yaml index 7d5f426..7b24ae8 100644 --- a/.gitea/workflows/alpine.yaml +++ b/.gitea/workflows/alpine.yaml @@ -6,22 +6,6 @@ on: - master jobs: - # prepare: - # name: Get build meta - # runs-on: ubuntu-latest - # container: - # image: ghcr.io/catthehacker/ubuntu:act-latest - # steps: - # - name: Check out repository code - # uses: actions/checkout@v4 - # - name: Get build-meta.json content - # id: get-build-meta - # uses: ActionsTools/read-json-action@main - # with: - # file_path: "build-meta.json" - # outputs: - # versions: ${{ steps.get-build-meta.outputs.versions }} - build: name: Build alpine linux container images container: @@ -57,8 +41,9 @@ jobs: - name: Login to docker.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 @@ -72,11 +57,11 @@ jobs: build-args: | ALPINE_VERSION=${{ matrix.version }} tags: | - ${{ vars.DOCKERHUB_USERNAME }}/alpine:${{ matrix.version }} + quay.io/sindigilive/alpine:${{ matrix.version }} - name: Scan container image with Trivy uses: aquasecurity/trivy-action@0.20.0 with: - image-ref: '${{ vars.DOCKERHUB_USERNAME }}/alpine:${{ matrix.version }}' + image-ref: 'quay.io/sindigilive/alpine:${{ matrix.version }}' format: 'sarif' output: 'trivy-results.sarif' @@ -94,8 +79,9 @@ jobs: - name: Login to docker.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 @@ -107,10 +93,10 @@ jobs: push: true context: . tags: | - ${{ vars.DOCKERHUB_USERNAME }}/alpine:latest + quay.io/sindigilive/alpine:latest - name: Scan container image with Trivy uses: aquasecurity/trivy-action@0.20.0 with: - image-ref: '${{ vars.DOCKERHUB_USERNAME }}/alpine:latest' + image-ref: 'quay.io/sindigilive/alpine:latest' format: 'sarif' output: 'trivy-results.sarif' diff --git a/Dockerfile b/Dockerfile index 5e0e771..5c1ae56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,7 @@ ARG TZ=Asia/Jakarta USER root # Install base dependencies, set timezone to designated timezone -RUN --mount=type=cache,target=/var/cache/apk \ - /sbin/apk update --no-cache; \ +RUN /sbin/apk update --no-cache; \ /sbin/apk upgrade --no-cache; \ /sbin/apk add --update --no-cache \ tzdata; \