From 752637a4abd82ab63c952542ed626d5fa87d0a3d Mon Sep 17 00:00:00 2001 From: Aditya Prima Date: Sat, 23 Mar 2024 18:50:39 +0700 Subject: [PATCH] Added Alpine 8.3 --- .gitea/workflows/83-alpine.yaml | 33 +++++++++++++++++++++++++++++++++ Dockerfile.alpine | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 .gitea/workflows/83-alpine.yaml diff --git a/.gitea/workflows/83-alpine.yaml b/.gitea/workflows/83-alpine.yaml new file mode 100644 index 0000000..4d75952 --- /dev/null +++ b/.gitea/workflows/83-alpine.yaml @@ -0,0 +1,33 @@ +name: Build and Push Alpine PHP 8.3 Image +on: + push: + branches: + - master + +jobs: + build: + name: Build and push 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 Winter Access Git Registry + uses: docker/login-action@v3 + with: + registry: git.winteraccess.id + username: aditya.prima + password: ${{ secrets.PATOKEN }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + ALPINE_VERSION=3.19 + PHP_VERSION=83 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:latest-alpine + git.winteraccess.id/${{ gitea.repository }}:8.3-alpine \ No newline at end of file diff --git a/Dockerfile.alpine b/Dockerfile.alpine index e69de29..7112fa1 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -0,0 +1,33 @@ +# PHP 5.6 == 3.5 +# PHP 7.2 == 3.9 +# PHP 7.3 == 3.10 +# PHP 7.4 == 3.13 +# PHP 8 == 3.16 +# PHP 8.1 == 3.18 +# PHP 8.2 == 3.18 +ARG REGISTRY_URL=aprimediet +ARG ALPINE_VERSION=3.19 + +FROM ${REGISTRY_URL}/alpine:${ALPINE_VERSION} +LABEL maintainer=" aprimediet@gmail.com" + +ARG PHP_VERSION=83 +ENV PHP_VERSION=${PHP_VERSION} + +WORKDIR /root + +# INSTALL PHP APP +RUN apk add --update php${PHP_VERSION} php${PHP_VERSION}-common + +# CREATE SYMLINKS TO /usr/bin/php IN CASE IT IS NOT EXISTS +RUN ln -ns /usr/bin/php${PHP_VERSION} /usr/bin/php; exit 0 + +# DOWNLOAD AND INSTALL COMPOSER +# ADD https://getcomposer.org/installer ./composer-setup.php +# RUN php composer-setup.php && mv composer.phar /usr/local/bin/composer && rm -f ./composer-setup.php + +# # CHANGE USER PERMISSION ON /etc/services.d +# RUN chmod -R +x /etc/services.d/php-fpm/* + +# CLEAN APK CACHES +RUN rm -vrf /var/cache/apk/*