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

Remove PHPIZE_DEPS on stretch, similarly to Alpine #513

Closed
amq opened this issue Oct 29, 2017 · 3 comments
Closed

Remove PHPIZE_DEPS on stretch, similarly to Alpine #513

amq opened this issue Oct 29, 2017 · 3 comments

Comments

@amq
Copy link

amq commented Oct 29, 2017

Introducing stretch is a unique opportunity for such a change.

APT doesn't have a functionality similar to APK's virtual, but looks this could be enough:

apt-get purge --auto-remove -o APT::AutoRemove::RecommendsImportant=false $PHPIZE_DEPS

Certainly, docker-php-ext-install would need to be also modified to re-install $PHPIZE_DEPS.

@tianon
Copy link
Member

tianon commented Oct 30, 2017

One of the main hurdles to doing this is precisely that APT doesn't have something like APK's --virtual. With APK, when we do apk add --virtual .xyz foo bar baz, and then later do apk del .xyz, it will only remove those packages which were not already installed or required by something else. With APT, doing apt-get purge on packages the user installed will simply remove them, and in some cases error out completely if they're dependencies of something else, so while this would be feasible to implement in a single script (where we could, for example, track the output of apt-mark showmanual and/or dpkg-query to determine what was already installed to some extent), it's a lot less feasible across multiple scripts (as we require, given the nature of the relationship between configure and install). Additionally, the logic to duplicate some of that virtual functionality is non-trivial, and likely to simply be an additional source of bug reports from our users.

As a final thought, the primary reason we were willing to do this for Alpine/APK wasn't actually because of the --virtual functionality (which simply came in extremely handy for actually implementing this behavior in a sane way that's not likely to break users), but was instead because APK is so much faster at installing dependencies than APT is, and one of the explicit goals of the Alpine-based images is to be as small/minimal as possible.

@tianon
Copy link
Member

tianon commented Dec 23, 2017

See also the discussion on #438.

@tianon
Copy link
Member

tianon commented Dec 23, 2017

Closing this one in favor of that one, since it has more discussion. Thanks!

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