commit 1dbc6f54d4624d7bb412d1cb65e474c319d61510 Author: Muhamad Aditya Prima Date: Wed Dec 11 17:31:49 2024 +0700 Initial Commit diff --git a/.gitea/workflows/dockerio.yaml b/.gitea/workflows/dockerio.yaml new file mode 100644 index 0000000..a4b2446 --- /dev/null +++ b/.gitea/workflows/dockerio.yaml @@ -0,0 +1,152 @@ +name: Build and Push Redhat UBI9 Image +on: + push: + branches: + - master + +jobs: + build-micro: + name: Build and push ubi9-micro image + runs-on: ubuntu-latest + container: + image: ghcr.io/catthehacker/ubuntu:act-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Login to Docker Registry + uses: docker/login-action@v3 + with: + registry: docker.io + username: aprimediet + password: ${{ secrets.DOCKER_TOKEN }} + - name: Build and push 9.3 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.micro + build-args: | + REGISTRY_URL=docker.io/aprimediet + UBI_VERSION=9.3 + push: true + tags: | + aprimediet/ubi9:9.3-micro + - name: Build and push 9.4 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.micro + build-args: | + REGISTRY_URL=docker.io/aprimediet + UBI_VERSION=9.4 + push: true + tags: | + aprimediet/ubi9:9.4-micro + - name: Build and push 9.5 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.micro + build-args: | + REGISTRY_URL=docker.io/aprimediet + UBI_VERSION=9.5 + push: true + tags: | + aprimediet/ubi9:9.5-micro + aprimediet/ubi9:9-micro + build-minimal: + name: Build and push ubi9-minimal image + runs-on: ubuntu-latest + container: + image: ghcr.io/catthehacker/ubuntu:act-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Login to Docker Registry + uses: docker/login-action@v3 + with: + registry: docker.io + username: aprimediet + password: ${{ secrets.DOCKER_TOKEN }} + - name: Build and push 9.3 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.minimal + build-args: | + REGISTRY_URL=docker.io/aprimediet + UBI_VERSION=9.3 + push: true + tags: | + aprimediet/ubi9:9.3-minimal + - name: Build and push 9.4 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.minimal + build-args: | + REGISTRY_URL=docker.io/aprimediet + UBI_VERSION=9.4 + push: true + tags: | + aprimediet/ubi9:9.4-minimal + - name: Build and push 9.5 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.minimal + build-args: | + REGISTRY_URL=docker.io/aprimediet + UBI_VERSION=9.5 + push: true + tags: | + aprimediet/ubi9:9.5-minimal + aprimediet/ubi9:9-minimal + build: + name: Build and push ubi9 image + runs-on: ubuntu-latest + container: + image: ghcr.io/catthehacker/ubuntu:act-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Login to Docker Registry + uses: docker/login-action@v3 + with: + registry: docker.io + username: aprimediet + password: ${{ secrets.DOCKER_TOKEN }} + - name: Build and push 9.3 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile + build-args: | + REGISTRY_URL=docker.io/aprimediet + UBI_VERSION=9.3 + push: true + tags: | + aprimediet/ubi9:9.3 + - name: Build and push 9.4 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile + build-args: | + REGISTRY_URL=docker.io/aprimediet + UBI_VERSION=9.4 + push: true + tags: | + aprimediet/ubi9:9.4 + - name: Build and push 9.5 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile + build-args: | + REGISTRY_URL=docker.io/aprimediet + UBI_VERSION=9.5 + push: true + tags: | + aprimediet/ubi9:9.5 + aprimediet/ubi9:9 + aprimediet/ubi9:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..08a16c1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +ARG REGISTRY_URL=docker.io/redhat +ARG UBI_VERSION=9.5 + +FROM ${REGISTRY_URL}/ubi9:${UBI_VERSION} +LABEL maintainer="Muhamad Aditya Prima " + +ARG TIMEZONE="Asia/Jakarta" + +# Change timezone to desired timezone +ENV TZ=${TIMEZONE} + +RUN dnf reinstall -y tzdata && \ + dnf -y update && \ + dnf -y autoremove && \ + dnf -y clean all diff --git a/Dockerfile.micro b/Dockerfile.micro new file mode 100644 index 0000000..14fcf28 --- /dev/null +++ b/Dockerfile.micro @@ -0,0 +1,5 @@ +ARG REGISTRY_URL=docker.io/redhat +ARG UBI_VERSION=9.5 + +FROM ${REGISTRY_URL}/ubi9-micro:${UBI_VERSION} +LABEL maintainer="Muhamad Aditya Prima " diff --git a/Dockerfile.minimal b/Dockerfile.minimal new file mode 100644 index 0000000..905c2d1 --- /dev/null +++ b/Dockerfile.minimal @@ -0,0 +1,13 @@ +ARG REGISTRY_URL=docker.io/redhat +ARG UBI_VERSION=9.5 + +FROM ${REGISTRY_URL}/ubi9-minimal:${UBI_VERSION} +LABEL maintainer="Muhamad Aditya Prima " + +ARG TIMEZONE="Asia/Jakarta" + +# Change timezone to desired timezone +ENV TZ=${TIMEZONE} + +RUN microdnf -y reinstall tzdata && \ + microdnf -y clean all