From f7ae7dd8c1459d95e82d03bf51ee8e11e48cd4ea Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Fri, 3 Jan 2025 19:43:04 +0100 Subject: [PATCH] initial commit --- .gitea/workflows/docker.yml | 41 +++++++++++++++++++++++++++++++++++++ Dockerfile | 20 ++++++++++++++++++ README.md | 14 +++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 .gitea/workflows/docker.yml create mode 100644 Dockerfile create mode 100644 README.md diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml new file mode 100644 index 0000000..aecf200 --- /dev/null +++ b/.gitea/workflows/docker.yml @@ -0,0 +1,41 @@ +--- +name: docker + +on: + push: + branches: + - "main" + +jobs: + docker: + #runs-on: ubuntu-latest + container: + image: debian:stable-slim + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3.8.0 + + - name: Login to Docker registry + uses: docker/login-action@v3.3.0 + with: + registry: git.bbee.fr + username: ${{ var.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_API_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6.10.0 + env: + ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119 + with: + context: . + file: ./Dockerfile + platforms: | + linux/amd64 + linux/arm64 + push: true + tags: git.bbee.fr/${{ github.repository }}:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..56eca8a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM debian:stable-slim + +# base +RUN apt update + +# prepary sury repo +RUN apt install -y curl +RUN apt install -y lsb-release +RUN apt install -y ca-certificates +RUN curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb +RUN dpkg -i /tmp/debsuryorg-archive-keyring.deb +RUN sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' +RUN apt update + +# install PHP 8.3 +RUN apt install -y php8.3-cli php8.3-common php8.3-curl php8.3-imagick php8.3-intl php8.3-mbstring php8.3-opcache php8.3-readline php8.3-xml php8.3-zip + +# get composer +RUN mkdir -p /app/bin +RUN curl -s http://getcomposer.org/installer | /usr/bin/php8.3 -d date.timezone="Europe/Paris" -- --install-dir=/app/bin/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..5b03572 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +Debian PHP 8.3 +============== + +Custom Docker image based on Debian stable slim, with PHP Sury apt repo, and the following PHP 8.3 packages: + - php8.3-cli + - php8.3-common + - php8.3-curl + - php8.3-imagick + - php8.3-intl + - php8.3-mbstring + - php8.3-opcache + - php8.3-readline + - php8.3-xml + - php8.3-zip