diff --git a/.gitea/workflows/83-ubuntu.yaml b/.gitea/workflows/83-ubuntu.yaml new file mode 100644 index 0000000..d99b901 --- /dev/null +++ b/.gitea/workflows/83-ubuntu.yaml @@ -0,0 +1,34 @@ +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 \ No newline at end of file diff --git a/Dockerfile.alpine b/Dockerfile.alpine new file mode 100644 index 0000000..e69de29 diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu new file mode 100644 index 0000000..3100da3 --- /dev/null +++ b/Dockerfile.ubuntu @@ -0,0 +1,33 @@ +ARG UBUNTU_VERSION=latest + +FROM aprimediet/ubuntu:${UBUNTU_VERSION} +LABEL maintainer=" aprimediet@gmail.com" + +ARG PHP_VERSION=8.3 + +ENV PHP_VERSION=${PHP_VERSION} + +# Set workdir at root +WORKDIR /root + +# Use root user to install all dependencies +USER ROOT + +RUN 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 \ + php${PHP_VERSION}-cli 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 + +# CLEAN APT CACHES +RUN apt -y clean + +# CREATE PHP RUN DIRECTORY +RUN mkdir -p /var/run/php && mkdir -p /var/lib/php/session