Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

it install python again when install python3-dev with image: 3.8.8-alpine3.13 #594

Closed
gainskills opened this issue Mar 28, 2021 · 1 comment
Labels
question Usability question, not directly related to an error with the image

Comments

@gainskills
Copy link

Docker build file

# Base Docker image
FROM python:3.8.8-alpine3.13
RUN apk update && apk upgrade && apk add --no-cache --virtual build-deps gcc python3-dev 

Docker builds log:

OK: 13884 distinct packages available
OK: 11 MiB in 35 packages
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
(1/54) Installing libgcc (10.2.1_pre1-r3)
(2/54) Installing libstdc++ (10.2.1_pre1-r3)
(3/54) Installing binutils (2.35.1-r1)
(4/54) Installing libgomp (10.2.1_pre1-r3)
(5/54) Installing libatomic (10.2.1_pre1-r3)
(6/54) Installing libgphobos (10.2.1_pre1-r3)
(7/54) Installing gmp (6.2.1-r0)
(8/54) Installing isl22 (0.22-r0)
(9/54) Installing mpfr4 (4.1.0-r0)
(10/54) Installing mpc1 (1.2.0-r0)
(11/54) Installing gcc (10.2.1_pre1-r3)
(12/54) Installing pkgconf (1.7.3-r0)
(13/54) Installing python3 (3.8.8-r0)
(14/54) Installing python3-dev (3.8.8-r0)

Does it cause by the system variable for the Python version?

Thanks,

@wglambert wglambert added the question Usability question, not directly related to an error with the image label Mar 29, 2021
@wglambert
Copy link

In the container Python is built from source, so yeah installing python3-dev has Python from the repo's as a dependency which gets you two Pythons
PHP has the same issue but for that image the Debian PHP packages are blocked docker-library/php#542

Although for Python: #571 (comment)

this is way too dangerous because there are so many system-level packages/tools that use Python that we can't reasonably block it (unlike PHP).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

3 participants