From 9064802962588553cfbf44b4c0605363dfb6b3a2 Mon Sep 17 00:00:00 2001 From: Philipp Traber Date: Thu, 5 Dec 2024 13:02:11 +0100 Subject: [PATCH] change base image to reduce image size Signed-off-by: Philipp Traber --- .gitignore | 3 ++- Dockerfile | 7 +++---- README.md | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index b694934..0e5ac79 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.venv \ No newline at end of file +.venv +__pycache__ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 8897cf5..375807f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,6 @@ -FROM python:3.12 +FROM python:3.12-alpine WORKDIR /app -COPY requirements.txt ./ -RUN pip install --no-cache-dir -r requirements.txt - +COPY requirements.txt . +RUN pip install -r requirements.txt --no-cache-dir COPY src/ . CMD [ "fastapi", "run", "api.py" ] \ No newline at end of file diff --git a/README.md b/README.md index 6cc5777..7862322 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ Using the allergen information on the mensa website we can check if the spätzle This project serves a simple [website](spaetzle.traberph.de) that checks the spätzle for you. ## How to run -Simply run it with docker-compose +Simply run it with docker compose ``` -docker-compose up -``` \ No newline at end of file +docker compose up +```