diff --git a/.gitea/workflows/56-ubuntu.yaml b/.gitea/workflows/56-ubuntu.yaml deleted file mode 100644 index a1205b3..0000000 --- a/.gitea/workflows/56-ubuntu.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build and Push Ubuntu PHP 5.6 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: | - UBUNTU_VERSION=latest - PHP_VERSION=5.6 - push: true - tags: | - git.winteraccess.id/${{ gitea.repository }}:5.6-ubuntu - git.winteraccess.id/${{ gitea.repository }}:5.6 \ No newline at end of file diff --git a/.gitea/workflows/72-ubuntu.yaml b/.gitea/workflows/72-ubuntu.yaml deleted file mode 100644 index 01b6340..0000000 --- a/.gitea/workflows/72-ubuntu.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build and Push Ubuntu PHP 7.2 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: | - UBUNTU_VERSION=latest - PHP_VERSION=7.2 - push: true - tags: | - git.winteraccess.id/${{ gitea.repository }}:7.2-ubuntu - git.winteraccess.id/${{ gitea.repository }}:7.2 \ No newline at end of file diff --git a/.gitea/workflows/73-ubuntu.yaml b/.gitea/workflows/73-ubuntu.yaml deleted file mode 100644 index e2e195d..0000000 --- a/.gitea/workflows/73-ubuntu.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build and Push Ubuntu PHP 7.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: | - UBUNTU_VERSION=latest - PHP_VERSION=7.3 - push: true - tags: | - git.winteraccess.id/${{ gitea.repository }}:7.3-ubuntu - git.winteraccess.id/${{ gitea.repository }}:7.3 \ No newline at end of file diff --git a/.gitea/workflows/74-ubuntu.yaml b/.gitea/workflows/74-ubuntu.yaml deleted file mode 100644 index 5335944..0000000 --- a/.gitea/workflows/74-ubuntu.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build and Push Ubuntu PHP 7.4 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: | - UBUNTU_VERSION=latest - PHP_VERSION=7.4 - push: true - tags: | - git.winteraccess.id/${{ gitea.repository }}:7.4-ubuntu - git.winteraccess.id/${{ gitea.repository }}:7.4 \ No newline at end of file diff --git a/.gitea/workflows/80-ubuntu.yaml b/.gitea/workflows/80-ubuntu.yaml deleted file mode 100644 index c2c29d9..0000000 --- a/.gitea/workflows/80-ubuntu.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build and Push Ubuntu PHP 8.0 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: | - UBUNTU_VERSION=latest - PHP_VERSION=8.0 - push: true - tags: | - git.winteraccess.id/${{ gitea.repository }}:8.0-ubuntu - git.winteraccess.id/${{ gitea.repository }}:8.0 \ No newline at end of file diff --git a/.gitea/workflows/81-ubuntu.yaml b/.gitea/workflows/81-ubuntu.yaml deleted file mode 100644 index b25e483..0000000 --- a/.gitea/workflows/81-ubuntu.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build and Push Ubuntu PHP 8.1 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: | - UBUNTU_VERSION=latest - PHP_VERSION=8.1 - push: true - tags: | - git.winteraccess.id/${{ gitea.repository }}:8.1-ubuntu - git.winteraccess.id/${{ gitea.repository }}:8.1 \ No newline at end of file diff --git a/.gitea/workflows/82-ubuntu.yaml b/.gitea/workflows/82-ubuntu.yaml deleted file mode 100644 index 50570f7..0000000 --- a/.gitea/workflows/82-ubuntu.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build and Push Ubuntu PHP 8.2 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: | - UBUNTU_VERSION=latest - PHP_VERSION=8.2 - push: true - tags: | - git.winteraccess.id/${{ gitea.repository }}:8.2-ubuntu - git.winteraccess.id/${{ gitea.repository }}:8.2 \ No newline at end of file diff --git a/.gitea/workflows/83-alpine.yaml b/.gitea/workflows/83-alpine.yaml deleted file mode 100644 index 0dfb7dc..0000000 --- a/.gitea/workflows/83-alpine.yaml +++ /dev/null @@ -1,33 +0,0 @@ -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.alpine - 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/.gitea/workflows/83-ubuntu.yaml b/.gitea/workflows/83-ubuntu.yaml deleted file mode 100644 index d7318d8..0000000 --- a/.gitea/workflows/83-ubuntu.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: Build and Push Ubuntu 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: | - UBUNTU_VERSION=latest - PHP_VERSION=8.3 - push: true - tags: | - git.winteraccess.id/${{ gitea.repository }}:latest - git.winteraccess.id/${{ gitea.repository }}:latest-ubuntu - git.winteraccess.id/${{ gitea.repository }}:8.3-ubuntu - git.winteraccess.id/${{ gitea.repository }}:8.3 \ No newline at end of file diff --git a/.gitea/workflows/alpine.yaml b/.gitea/workflows/alpine.yaml new file mode 100644 index 0000000..09f7064 --- /dev/null +++ b/.gitea/workflows/alpine.yaml @@ -0,0 +1,110 @@ +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 5.6 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.alpine + build-args: | + ALPINE_VERSION=3.5 + PHP_VERSION=5 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:5.6-alpine + - name: Build and push 7.2 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.alpine + build-args: | + ALPINE_VERSION=3.9 + PHP_VERSION=7 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:7.2-alpine + - name: Build and push 7.3 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.alpine + build-args: | + ALPINE_VERSION=3.10 + PHP_VERSION=7 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:7.3-alpine + - name: Build and push 7.4 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.alpine + build-args: | + ALPINE_VERSION=3.13 + PHP_VERSION=7 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:7.4-alpine + - name: Build and push 8.0 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.alpine + build-args: | + ALPINE_VERSION=3.16 + PHP_VERSION=8 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:8.0-alpine + - name: Build and push 8.1 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.alpine + build-args: | + ALPINE_VERSION=3.18 + PHP_VERSION=81 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:8.1-alpine + - name: Build and push 8.2 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.alpine + build-args: | + ALPINE_VERSION=3.18 + PHP_VERSION=82 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:8.2-alpine + - name: Build and push 8.3 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.alpine + build-args: | + ALPINE_VERSION=3.19 + PHP_VERSION=83 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:8.3-alpine + git.winteraccess.id/${{ gitea.repository }}:latest-alpine \ No newline at end of file diff --git a/.gitea/workflows/ubuntu.yaml b/.gitea/workflows/ubuntu.yaml new file mode 100644 index 0000000..cd3cb9c --- /dev/null +++ b/.gitea/workflows/ubuntu.yaml @@ -0,0 +1,108 @@ +name: Build and Push Ubuntu 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 5.6 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + UBUNTU_VERSION=jammy + PHP_VERSION=5.6 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:5.6-ubuntu + git.winteraccess.id/${{ gitea.repository }}:5.6 + - name: Build and push 7.2 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + UBUNTU_VERSION=jammy + PHP_VERSION=7.2 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:7.2-ubuntu + git.winteraccess.id/${{ gitea.repository }}:7.2 + - name: Build and push 7.4 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + UBUNTU_VERSION=jammy + PHP_VERSION=7.4 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:7.4-ubuntu + git.winteraccess.id/${{ gitea.repository }}:7.4 + - name: Build and push 8.0 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + UBUNTU_VERSION=jammy + PHP_VERSION=8.0 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:8.0-ubuntu + git.winteraccess.id/${{ gitea.repository }}:8.0 + - name: Build and push 8.1 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + UBUNTU_VERSION=jammy + PHP_VERSION=8.1 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:8.1-ubuntu + git.winteraccess.id/${{ gitea.repository }}:8.1 + - name: Build and push 8.2 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + UBUNTU_VERSION=jammy + PHP_VERSION=8.2 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:8.2-ubuntu + git.winteraccess.id/${{ gitea.repository }}:8.2 + - name: Build and push 8.3 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + UBUNTU_VERSION=jammy + PHP_VERSION=8.3 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:8.3-ubuntu + git.winteraccess.id/${{ gitea.repository }}:8.3 + git.winteraccess.id/${{ gitea.repository }}:latest-ubuntu + git.winteraccess.id/${{ gitea.repository }}:latest + \ No newline at end of file diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 7112fa1..b58ddd8 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -5,7 +5,8 @@ # PHP 8 == 3.16 # PHP 8.1 == 3.18 # PHP 8.2 == 3.18 -ARG REGISTRY_URL=aprimediet +# PHP 8.3 == 3.19 +ARG BASE_REPO=aprimediet ARG ALPINE_VERSION=3.19 FROM ${REGISTRY_URL}/alpine:${ALPINE_VERSION} @@ -17,17 +18,11 @@ ENV PHP_VERSION=${PHP_VERSION} WORKDIR /root # INSTALL PHP APP -RUN apk add --update php${PHP_VERSION} php${PHP_VERSION}-common +RUN --mount=type=cache,target=/var/cache/apk \ + 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/* diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index b4d52cb..964c75d 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -1,6 +1,7 @@ -ARG UBUNTU_VERSION=latest +ARG UBUNTU_VERSION=jammy +ARG BASE_REPO=git.winteraccess.id/docker -FROM aprimediet/ubuntu:${UBUNTU_VERSION} +FROM ${BASE_REPO}/ubuntu:${UBUNTU_VERSION} LABEL maintainer=" aprimediet@gmail.com" ARG PHP_VERSION=8.3 @@ -10,14 +11,16 @@ ENV PHP_VERSION=${PHP_VERSION} # Set workdir at root WORKDIR /root -RUN apt -y update && apt -y upgrade && apt -y install \ +RUN --mount=type=cache,target=/var/cache/apt/archives \ + apt -y update && apt -y upgrade && apt -y install \ software-properties-common # ADD PPA TO INSTALL MULTIPLE PHP VERSIONS RUN add-apt-repository ppa:ondrej/php && apt -y update # INSTALL BASE DEPENDENCIES -RUN apt -y install \ +RUN --mount=type=cache,target=/var/cache/apt/archives \ + apt -y install \ php${PHP_VERSION}-cli php${PHP_VERSION}-common # CREATE SYMLINKS TO /usr/bin/php IN CASE IT IS NOT EXISTS