From d5aa2a45722e22895a5fb37db7f2ede9471767e9 Mon Sep 17 00:00:00 2001 From: foorschtbar Date: Thu, 1 Feb 2024 16:32:06 +0100 Subject: [PATCH] Removed PHP 7.4 and fixed python installation --- .github/workflows/build.yml | 4 ++-- Dockerfile | 8 +++++--- README.md | 4 ---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0dbb711..86e153a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - php: ["7.4", "8.3"] + php: ["8.3"] python: ["python", "no-python"] include: - php: "8.3" @@ -134,7 +134,7 @@ jobs: steps: - name: git checkout uses: actions/checkout@v4 - + - name: push README to Dockerhub uses: christian-korneck/update-container-description-action@v1 env: diff --git a/Dockerfile b/Dockerfile index 7095fe4..26a7804 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG FROM_TAG +ARG FROM_TAG=8.3-apache FROM php:$FROM_TAG @@ -61,7 +61,7 @@ RUN if [ "$PYTHON" = "python" ]; then \ echo "Build image with python"; \ apt-get update && apt-get install -y \ # python - python3 python3-pip python3-dev build-essential \ + python3 python3-pip python3-dev python3-venv build-essential \ # cleanup && rm -r /var/lib/apt/lists/*; \ fi @@ -69,7 +69,9 @@ RUN if [ "$PYTHON" = "python" ]; then \ # install python modules RUN if [ "$PYTHON" = "python" ]; then \ set -eux; \ - pip3 install js2py pytz tzlocal cfscrape; \ + python3 -m venv /opt/venv; \ + . /opt/venv/bin/activate; \ + python3 -m pip install js2py pytz tzlocal cfscrape; \ fi # overwrite docker entrypoint diff --git a/README.md b/README.md index f459533..2de495e 100644 --- a/README.md +++ b/README.md @@ -35,10 +35,6 @@ This is an usefull extension of the official php:\*-apache Docker image. | `latest` | 8.3 | master | no | | `python` | 8.3 | master | yes | | `develop` | 8.3 | develop | no | -| `7.4` | 7.4 | master | no | -| `7.4-develop` | 7.4 | develop | no | -| `7.4-python` | 7.4 | master | yes | -| `7.4-python-develop` | 7.4 | develop | yes | | `8.3` | 8.3 | master | no | | `8.3-develop` | 8.3 | develop | no | | `8.3-python` | 8.3 | master | yes |