From d1afb495daac356f430bbfd8ff6a4fbcb4bc3443 Mon Sep 17 00:00:00 2001 From: Muhamad Aditya Prima Date: Fri, 13 Dec 2024 13:37:16 +0700 Subject: [PATCH] Added workflows for ubi9 base image --- .gitea/workflows/ubi9-dockerio.yaml | 159 ++++++++++++++++++++++++++++ Dockerfile.apache-alpine | 2 +- scripts/apache-entrypoint-alpine | 5 - scripts/entrypoint | 7 ++ 4 files changed, 167 insertions(+), 6 deletions(-) create mode 100644 .gitea/workflows/ubi9-dockerio.yaml delete mode 100644 scripts/apache-entrypoint-alpine create mode 100644 scripts/entrypoint diff --git a/.gitea/workflows/ubi9-dockerio.yaml b/.gitea/workflows/ubi9-dockerio.yaml new file mode 100644 index 0000000..8032233 --- /dev/null +++ b/.gitea/workflows/ubi9-dockerio.yaml @@ -0,0 +1,159 @@ +name: Build and Push ubi9 PHP Image +on: + push: + branches: + - master + +jobs: + 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 7.4 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubi9 + build-args: | + PHP_VERSION=7.4 + push: true + tags: | + aprimediet/php:7.4-ubi9 + - name: Build and push 8.0 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubi9 + build-args: | + PHP_VERSION=8.0 + push: true + tags: | + aprimediet/php:8.0-ubi9 + - name: Build and push 8.1 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubi9 + build-args: | + PHP_VERSION=8.1 + push: true + tags: | + aprimediet/php:8.1-ubi9 + - name: Build and push 8.2 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubi9 + build-args: | + PHP_VERSION=8.2 + push: true + tags: | + aprimediet/php:8.2-ubi9 + - name: Build and push 8.3 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubi9 + build-args: | + PHP_VERSION=8.3 + push: true + tags: | + aprimediet/php:8.3-ubi9 + - name: Build and push 8.4 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubi9 + build-args: | + PHP_VERSION=8.4 + push: true + tags: | + aprimediet/php:8.4-ubi9 + aprimediet/php:8-ubi9 + aprimediet/php:ubi9 + 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 7.4 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubi9-micro + build-args: | + PHP_VERSION=7.4 + push: true + tags: | + aprimediet/php:7.4-ubi9-micro + - name: Build and push 8.0 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubi9-micro + build-args: | + PHP_VERSION=8.0 + push: true + tags: | + aprimediet/php:8.0-ubi9-micro + - name: Build and push 8.1 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubi9-micro + build-args: | + PHP_VERSION=8.1 + push: true + tags: | + aprimediet/php:8.1-ubi9-micro + - name: Build and push 8.2 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubi9-micro + build-args: | + PHP_VERSION=8.2 + push: true + tags: | + aprimediet/php:8.2-ubi9-micro + - name: Build and push 8.3 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubi9-micro + build-args: | + PHP_VERSION=8.3 + push: true + tags: | + aprimediet/php:8.3-ubi9-micro + - name: Build and push 8.4 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubi9-micro + build-args: | + PHP_VERSION=8.4 + push: true + tags: | + aprimediet/php:8.4-ubi9-micro + aprimediet/php:8-ubi9-micro + aprimediet/php:ubi9-micro diff --git a/Dockerfile.apache-alpine b/Dockerfile.apache-alpine index c407eb3..856d724 100644 --- a/Dockerfile.apache-alpine +++ b/Dockerfile.apache-alpine @@ -47,7 +47,7 @@ RUN sed -i "s|ServerRoot /var/www|ServerRoot ${SERVER_ROOT}|" /etc/apache2/httpd sed -i "s|Require ip 127|Require all granted|" /etc/apache2/conf.d/info.conf # ADD INITIALIZATION SCRIPT -ADD ./scripts/apache-entrypoint-alpine /usr/local/bin/entrypoint +ADD ./scripts/entrypoint /usr/local/bin/entrypoint RUN chmod +x /usr/local/bin/entrypoint && \ cp -vR /var/www/localhost/htdocs/* ${APP_DIR}/ && \ diff --git a/scripts/apache-entrypoint-alpine b/scripts/apache-entrypoint-alpine deleted file mode 100644 index 4e5a26a..0000000 --- a/scripts/apache-entrypoint-alpine +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -echo "RUNNING APACHE2" - -httpd -D FOREGROUND \ No newline at end of file diff --git a/scripts/entrypoint b/scripts/entrypoint new file mode 100644 index 0000000..12a1444 --- /dev/null +++ b/scripts/entrypoint @@ -0,0 +1,7 @@ +#!/bin/sh + +echo "##########################" +echo "# Apache2 is starting up #" +echo "##########################" + +httpd -D FOREGROUND \ No newline at end of file