From 69bf1211d0fdc4781898b6d2d471411f94affe34 Mon Sep 17 00:00:00 2001 From: y0nei Date: Wed, 17 May 2023 15:02:54 +0200 Subject: [PATCH] refactor(docker): Change python image + gcc The previous python-alpine image was causing verry long build times for the gcc compiler (which will be needed later) ref: https://github.com/sass/libsass-python/issues/285 https://github.com/sass/libsass-python/issues/282 --- Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index f486b90..bffd0e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,22 @@ -FROM python:3.11-alpine AS build +FROM python:3.11-slim AS build RUN pip install --no-cache-dir -U poetry COPY pyproject.toml poetry.lock ./ RUN poetry export --with dev -f requirements.txt --output requirements.txt -FROM python:3.11-alpine +FROM python:3.11-slim ENV PATH=$PATH:/home/docker/.local/bin \ PYTHONUNBUFFERED=1 WORKDIR /project -RUN adduser -D -g "docker" docker +RUN adduser --gecos "docker" docker RUN chown -R docker:docker /project +RUN apt update +RUN apt install -y gcc + USER docker COPY --from=build ./requirements.txt .