Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
refactor(docker): Change python image + gcc
Browse files Browse the repository at this point in the history
The previous python-alpine image was causing verry long build times
for the gcc compiler (which will be needed later)

ref:
sass/libsass-python#285
sass/libsass-python#282
  • Loading branch information
y0nei committed May 17, 2023
1 parent 171f90b commit 69bf121
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 .
Expand Down

0 comments on commit 69bf121

Please sign in to comment.