From 5e7abedb55a527275284e6102c56253e681070e7 Mon Sep 17 00:00:00 2001 From: bral <54455457+bralbral@users.noreply.github.com> Date: Sun, 16 Jun 2024 15:24:45 +0300 Subject: [PATCH] Update Dockerfile --- Dockerfile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index b7b5899..ec3ebdf 100755 --- a/Dockerfile +++ b/Dockerfile @@ -29,28 +29,29 @@ FROM python:3.11-alpine ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 +WORKDIR /app # Copy the application source code to the container COPY ./requirements.txt /app/requirements.txt COPY ./src /app/src COPY alembic.ini alembic-upgrade.bash /app/ -WORKDIR /app # Install system dependencies, Python dependencies, and clean up RUN apk update && \ - apk add --no-cache \ - git \ - ffmpeg \ - sqlite \ - musl-dev \ + apk add --no-cache --virtual .build-deps \ gcc \ + musl-dev \ libffi-dev \ openssl-dev \ - && \ - pip install --no-cache-dir --upgrade pip && \ + && apk add --no-cache \ + git \ + ffmpeg \ + sqlite \ + && pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r requirements.txt && \ + apk del .build-deps && \ rm -rf ~/.cache/pip && \ rm -rf /var/cache/apk/* # Set the user to non-root -USER 1000 \ No newline at end of file +USER 1000