From b945623a336eae6c0d46bb6fcc4cc9281f6988f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sun, 17 Mar 2024 07:32:37 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Remove=20Alpine=20support=20(#34?= =?UTF-8?q?5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 2 -- .github/workflows/test.yml | 2 -- README.md | 14 +++------ docker-images/entrypoint.sh | 7 ----- docker-images/python3.8-alpine.dockerfile | 37 ----------------------- pyproject.toml | 2 +- scripts/process_all.py | 1 - 7 files changed, 6 insertions(+), 59 deletions(-) delete mode 100644 docker-images/python3.8-alpine.dockerfile diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6ee81072..7f4586f8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -25,8 +25,6 @@ jobs: python_version: "3.8" - name: python3.7 python_version: "3.7" - - name: python3.8-alpine - python_version: "3.8" fail-fast: true runs-on: ubuntu-latest steps: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d5de8480..f5c440d7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,8 +29,6 @@ jobs: python_version: "3.8" - name: python3.7 python_version: "3.7" - - name: python3.8-alpine - python_version: "3.8" fail-fast: true runs-on: ubuntu-latest steps: diff --git a/README.md b/README.md index 4caa215c..896f5c14 100644 --- a/README.md +++ b/README.md @@ -8,21 +8,17 @@ * [`python3.8`, _(Dockerfile)_](https://github.com/tiangolo/uwsgi-nginx-flask-docker/blob/master/docker-images/python3.8.dockerfile) * [`python3.7`, _(Dockerfile)_](https://github.com/tiangolo/uwsgi-nginx-flask-docker/blob/master/docker-images/python3.7.dockerfile) -## Discouraged tags - -* [`python3.8-alpine` _(Dockerfile)_](https://github.com/tiangolo/uwsgi-nginx-flask-docker/blob/master/docker-images/python3.8-alpine.dockerfile) - -To learn more about why Alpine images are discouraged for Python read the note at the end: [🚨 Alpine Python Warning](#-alpine-python-warning). - ## Deprecated tags -🚨 These tags are no longer supported or maintained, they are removed from the GitHub repository, but the last version pushed is still available in Docker Hub. +🚨 These tags are no longer supported or maintained, they are removed from the GitHub repository, but the last versions pushed might still be available in Docker Hub if anyone has been pulling them: +* `python3.8-alpine` * `python3.6` * `python2.7` -The last date tags for deprecated Python versions are: +The last date tags for these versions are: +* `python3.8-alpine-2024-03-11` * `python3.6-2022-11-25` * `python2.7-2022-11-25` @@ -32,7 +28,7 @@ The last date tags for deprecated Python versions are: # uwsgi-nginx-flask -**Docker** image with **uWSGI** and **Nginx** for **Flask** web applications in **Python** running in a single container. Optionally using Alpine Linux. +**Docker** image with **uWSGI** and **Nginx** for **Flask** web applications in **Python** running in a single container. ## Description diff --git a/docker-images/entrypoint.sh b/docker-images/entrypoint.sh index 3dddb4b1..3d0372b5 100644 --- a/docker-images/entrypoint.sh +++ b/docker-images/entrypoint.sh @@ -36,11 +36,4 @@ else printf "$content_server" > /etc/nginx/conf.d/nginx.conf fi -# For Alpine: -# Explicitly add installed Python packages and uWSGI Python packages to PYTHONPATH -# Otherwise uWSGI can't import Flask -if [ -n "$ALPINEPYTHON" ] ; then - export PYTHONPATH=$PYTHONPATH:/usr/local/lib/$ALPINEPYTHON/site-packages:/usr/lib/$ALPINEPYTHON/site-packages -fi - exec "$@" diff --git a/docker-images/python3.8-alpine.dockerfile b/docker-images/python3.8-alpine.dockerfile deleted file mode 100644 index 82a7cdf9..00000000 --- a/docker-images/python3.8-alpine.dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -FROM tiangolo/uwsgi-nginx:python3.8-alpine - -LABEL maintainer="Sebastian Ramirez " - -# Install requirements -COPY requirements.txt /tmp/requirements.txt -RUN pip install --no-cache-dir -r /tmp/requirements.txt - -# URL under which static (not modified by Python) files will be requested -# They will be served by Nginx directly, without being handled by uWSGI -ENV STATIC_URL /static -# Absolute path in where the static files wil be -ENV STATIC_PATH /app/static - -# If STATIC_INDEX is 1, serve / with /static/index.html directly (or the static URL configured) -# ENV STATIC_INDEX 1 -ENV STATIC_INDEX 0 - -# Add demo app -COPY ./app /app -WORKDIR /app - -# Make /app/* available to be imported by Python globally to better support several use cases like Alembic migrations. -ENV PYTHONPATH=/app - -# Move the base entrypoint to reuse it -RUN mv /entrypoint.sh /uwsgi-nginx-entrypoint.sh -# Copy the entrypoint that will generate Nginx additional configs -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - -ENTRYPOINT ["/entrypoint.sh"] - -# Run the start script provided by the parent image tiangolo/uwsgi-nginx. -# It will check for an /app/prestart.sh script (e.g. for migrations) -# And then will start Supervisor, which in turn will start Nginx and uWSGI -CMD ["/start.sh"] diff --git a/pyproject.toml b/pyproject.toml index a87fddbc..314e8591 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "uwsgi-nginx-flask-docker" version = "0.1.0" -description = "Docker image with uWSGI and Nginx for Flask applications in Python running in a single container. Optionally with Alpine Linux." +description = "Docker image with uWSGI and Nginx for Flask applications in Python running in a single container." authors = ["Sebastián Ramírez "] license = "MIT" diff --git a/scripts/process_all.py b/scripts/process_all.py index 2ee75a91..eb4782a9 100644 --- a/scripts/process_all.py +++ b/scripts/process_all.py @@ -9,7 +9,6 @@ {"NAME": "python3.9", "PYTHON_VERSION": "3.9"}, {"NAME": "python3.8", "PYTHON_VERSION": "3.8"}, {"NAME": "python3.7", "PYTHON_VERSION": "3.7"}, - {"NAME": "python3.8-alpine", "PYTHON_VERSION": "3.8"}, ] start_with = os.environ.get("START_WITH")