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

Redundant binaries #94

Closed
head1328 opened this issue Oct 27, 2020 · 3 comments
Closed

Redundant binaries #94

head1328 opened this issue Oct 27, 2020 · 3 comments

Comments

@head1328
Copy link

At least perl:5.30-slim has 2 different perl binaries: /usr/bin/perl and /usr/local/bin/perl

docker run -it --rm --entrypoint=/bin/bash perl:5.30-slim

root@7f3c95a9be0d:/# ls -la /usr/bin/perl
5578215 3128 -rwxr-xr-x 2 root root 3201864 Jul 21 19:27 /usr/bin/perl

root@7f3c95a9be0d:/# ls -la $(which perl)
5582328 20 -rwxr-xr-x 2 root root 17520 Oct 13 15:12 /usr/local/bin/perl

This is quite confusing. /usr/bin/perl should be deleted or symlinked to /usr/local/bin/perl to reduce the image size as well.

@zakame
Copy link
Member

zakame commented Oct 27, 2020

Hi @head1328 , thanks for the report!

As you note, there is a /usr/bin/perl, that is provided by the base image that docker-perl is uses (buildpack-deps for the regular variant, debian:slim for :slim.) This is needed for things like apt to work properly, and we cannot use the /usr/local/bin/perl that we provide here for this case (as they have totally different properties, like a different @INC and even compilation options,) hence we retain /usr/bin/perl.

See also #26 and #92.

@head1328
Copy link
Author

Ok, makes sense. Perhaps this should be mentioned in the readme?

@zakame
Copy link
Member

zakame commented Oct 27, 2020

Yes, I'm taking care of it in #93 (due this week.) 💪 Not only here but also in https://github.com/docker-library/docs/tree/master/perl as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants