-
Notifications
You must be signed in to change notification settings - Fork 32
Removed python
build-essential
git
and pkg-config
from slim
#10
Conversation
Thanks @wblankenship, lgtm 👍 Btw even |
Alternatively, if we want to drop support for binary modules, but still support npm, then maybe |
I think it is safe to leave |
Agree with all your points, after some thinking reached the same conclusion myself. |
What would everyone's thoughts of doing the following be:
Then we could remove |
I think the autoremove might get you into trouble (maybe @tianon remembers why). We are trying to move to the following pattern: RUN apt-get update \
&& apt-get install -y --no-install-recommends bison ruby \
# install stuff
&& apt-get purge -y --auto-remove bison ruby \
... Memcached has a nice one: https://github.com/docker-library/memcached/blob/master/Dockerfile#L11. I have seen that sometimes when installed with recommends, apt likes to leave things behind after remove/purge. |
It's bit extreme, but should save about 14 MB (with @yosifkit's pattern), so 👍 |
I think it was just build-essential -- when you install that one and try to As for manually calling autoremove separately, I usually prefer to do |
Interesting:
yields
|
Same thing occurs with FROM debian:jessie
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates curl \
&& apt-get purge -y --auto-remove \
ca-certificates curl libffi6 libgmp10 libgnutls-deb0-28 libhogweed2 libldap-2.4-2 libnettle4 libp11-kit0 libsasl2-2 libsasl2-modules-db libtasn1-6 \
&& rm -rf /var/lib/apt/lists/* But I wouldn't advocate using it, as it is too fragile, and the savings are negligible. Your version is good enough. |
I did toss around the idea of explicitly removing the dependencies that are installed, but that makes the assumption that the dependency tree is static, which isn't a safe assumption. |
I see that the buildpack-deps image has become more modular now - |
Closed in favor of #19 |
what's pkg-config used for in the non-slim version btw? |
Not sure. Might have been necessary for some binary module some time in the past. In any case, it's already included in the full |
Example changes recommended from #9