Skip to content

Commit

Permalink
Draft: explicit build-time packge dependencies
Browse files Browse the repository at this point in the history
Seen @ https://github.com/docker-library/python/blob/7899dbafd386ee264bd33574aafcd0f1369b2e21/3.11/slim-bullseye/Dockerfile#L33
Instead of installing all recommended packages, we explicitly mention what we need.
It reduces the download of 10's of build-time dependencies.

What I'm not sure of - are we missing features, that are not compiled as deps are not found?
(encryption comes to mind).

Signed-off-by: Yaniv Kaul <yaniv.kaul@scylladb>
  • Loading branch information
mykaul committed Dec 4, 2023
1 parent 426fa0e commit 6cd9291
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3.11-slim-bullseye AS compile-image

WORKDIR /usr/src/app
RUN apt-get update && apt-get -y install git gcc
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y install --no-install-recommends git gcc libc6-dev

COPY . .
RUN pip install --user .
Expand Down

0 comments on commit 6cd9291

Please sign in to comment.