Skip to content

Commit

Permalink
🔥 Remove support for Alpine (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo authored Mar 17, 2024
1 parent 83ffa8f commit a9fa4d2
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 198 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,17 @@
* [`python3.8` _(Dockerfile)_](https://github.com/tiangolo/uwsgi-nginx-docker/blob/master/docker-images/python3.8.dockerfile)
* [`python3.7`, _(Dockerfile)_](https://github.com/tiangolo/uwsgi-nginx-docker/blob/master/docker-images/python3.7.dockerfile)

## Discouraged tags

* [`python3.8-alpine` _(Dockerfile)_](https://github.com/tiangolo/uwsgi-nginx-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`

Expand All @@ -32,16 +28,14 @@ The last date tags for deprecated Python versions are:

# uwsgi-nginx

**Docker** image with **uWSGI** and **Nginx** for web applications in **Python** (as **Flask**) in a single container. Optionally with Alpine Linux.
**Docker** image with **uWSGI** and **Nginx** for web applications in **Python** (as **Flask**) in a single container.

## Description

This [**Docker**](https://www.docker.com/) image allows you to create [**Python**](https://www.python.org/) web applications that run with [**uWSGI**](https://uwsgi-docs.readthedocs.org/en/latest/) and [**Nginx**](http://nginx.org/en/) in a single container.

The combination of uWSGI with Nginx is a [common way to deploy Python web applications like Flask and Django](http://flask.pocoo.org/docs/1.0/deploying/uwsgi/). It is widely used in the industry and would give you decent performance. (*)

There is also an Alpine version. If you want it, check the tags from above.

This image was created to be the base image for [**tiangolo/uwsgi-nginx-flask**](https://hub.docker.com/r/tiangolo/uwsgi-nginx-flask/) but could be used as the base image for any other (WSGI-based) Python web application, like Django.

### * Note on performance and features
Expand Down
9 changes: 0 additions & 9 deletions docker-images/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,6 @@ else

# Generate Nginx config for maximum upload file size
printf "client_max_body_size $USE_NGINX_MAX_UPLOAD;\n" > /etc/nginx/conf.d/upload.conf

# Remove default Nginx config from Alpine
printf "" > /etc/nginx/conf.d/default.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 "$@"
96 changes: 0 additions & 96 deletions docker-images/install-nginx-alpine.sh

This file was deleted.

76 changes: 0 additions & 76 deletions docker-images/python3.8-alpine.dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "uwsgi-nginx-docker"
version = "0.1.0"
description = "Docker image with uWSGI and Nginx for web applications in Python (as Flask) in a single container. Optionally with Alpine Linux."
description = "Docker image with uWSGI and Nginx for web applications in Python (as Flask) in a single container."
authors = ["Sebastián Ramírez <tiangolo@gmail.com>"]
license = "MIT"

Expand Down
1 change: 0 additions & 1 deletion scripts/process_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit a9fa4d2

Please sign in to comment.