From ef64147add7f35bc7aec683c752d8fa4d301edd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 27 Apr 2020 20:32:11 +0200 Subject: [PATCH 1/3] :sparkles: Add slim version --- docker-images/python3.8-slim.dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 docker-images/python3.8-slim.dockerfile diff --git a/docker-images/python3.8-slim.dockerfile b/docker-images/python3.8-slim.dockerfile new file mode 100644 index 0000000..88f9cc7 --- /dev/null +++ b/docker-images/python3.8-slim.dockerfile @@ -0,0 +1,7 @@ +FROM tiangolo/uvicorn-gunicorn:python3.8-slim + +LABEL maintainer="Sebastian Ramirez " + +RUN pip install --no-cache-dir fastapi + +COPY ./app /app From 7b03e01f82c633d5a075d5a165a03bcd723d0b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 27 Apr 2020 20:32:24 +0200 Subject: [PATCH 2/3] :white_check_mark: Test and deploy slim version --- .github/workflows/deploy.yml | 2 ++ .github/workflows/test.yml | 2 ++ scripts/process_all.py | 1 + 3 files changed, 5 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8ca6f68..66f4b8e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,6 +18,8 @@ jobs: python_version: "3.7" - name: python3.6 python_version: "3.6" + - name: python3.8-slim + python_version: "3.8" - name: python3.8-alpine3.10 python_version: "3.8" - name: python3.7-alpine3.8 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4d7923f..abfe7c0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,6 +18,8 @@ jobs: python_version: "3.7" - name: python3.6 python_version: "3.6" + - name: python3.8-slim + python_version: "3.8" - name: python3.8-alpine3.10 python_version: "3.8" - name: python3.7-alpine3.8 diff --git a/scripts/process_all.py b/scripts/process_all.py index 12b084d..a4a7214 100644 --- a/scripts/process_all.py +++ b/scripts/process_all.py @@ -7,6 +7,7 @@ {"NAME": "python3.8", "PYTHON_VERSION": "3.8"}, {"NAME": "python3.7", "PYTHON_VERSION": "3.7"}, {"NAME": "python3.6", "PYTHON_VERSION": "3.6"}, + {"NAME": "python3.8-slim", "PYTHON_VERSION": "3.8"}, {"NAME": "python3.8-alpine3.10", "PYTHON_VERSION": "3.8"}, {"NAME": "python3.7-alpine3.8", "PYTHON_VERSION": "3.7"}, {"NAME": "python3.6-alpine3.8", "PYTHON_VERSION": "3.6"}, From d999a1da5d2ea80cd5814c3df987cffe046d2fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 27 Apr 2020 20:32:38 +0200 Subject: [PATCH 3/3] :memo: Update docs with slim tag --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0f0eef2..0ac1527 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ * [`python3.8`, `latest` _(Dockerfile)_](https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker/blob/master/docker-images/python3.8.dockerfile) * [`python3.7`, _(Dockerfile)_](https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker/blob/master/docker-images/python3.7.dockerfile) * [`python3.6` _(Dockerfile)_](https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker/blob/master/docker-images/python3.6.dockerfile) +* [`python3.8-slim` _(Dockerfile)_](https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker/blob/master/docker-images/python3.8-slim.dockerfile) * [`python3.8-alpine3.10` _(Dockerfile)_](https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker/blob/master/docker-images/python3.8-alpine3.10.dockerfile) * [`python3.7-alpine3.8` _(Dockerfile)_](https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker/blob/master/docker-images/python3.7-alpine3.8.dockerfile) * [`python3.6-alpine3.8` _(Dockerfile)_](https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker/blob/master/docker-images/python3.6-alpine3.8.dockerfile) @@ -14,7 +15,7 @@ # uvicorn-gunicorn-fastapi -[**Docker**](https://www.docker.com/) image with [**Uvicorn**](https://www.uvicorn.org/) managed by [**Gunicorn**](https://gunicorn.org/) for high-performance [**FastAPI**](https://fastapi.tiangolo.com/) web applications in **[Python](https://www.python.org/) 3.6 and above** with performance auto-tuning. Optionally with Alpine Linux. +[**Docker**](https://www.docker.com/) image with [**Uvicorn**](https://www.uvicorn.org/) managed by [**Gunicorn**](https://gunicorn.org/) for high-performance [**FastAPI**](https://fastapi.tiangolo.com/) web applications in **[Python](https://www.python.org/) 3.6 and above** with performance auto-tuning. Optionally in a slim version or based on Alpine Linux. **GitHub repo**: [https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker](https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker) @@ -65,7 +66,7 @@ This image will set a sensible configuration based on the server it is running o It has sensible defaults, but you can configure it with environment variables or override the configuration files. -There is also an Alpine version. If you want it, use one of the Alpine tags from above. +There is also a slim version and another one based on Alpine Linux. If you want one of those, use one of the tags from above. ### `tiangolo/uvicorn-gunicorn`