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 apk cache #229

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions 2.3/alpine3.7/Dockerfile
Expand Up @@ -81,15 +81,15 @@ RUN set -ex \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)" \
&& apk add --virtual .ruby-rundeps $runDeps \
&& apk add --no-cache --virtual .ruby-rundeps $runDeps \
bzip2 \
ca-certificates \
libffi-dev \
libressl-dev \
procps \
yaml-dev \
zlib-dev \
&& apk del .ruby-builddeps \
&& apk del --no-cache .ruby-builddeps \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From docker-library/python#330 (comment):

This is actually a (recent) bug, and they're planning to fix it: https://bugs.alpinelinux.org/issues/9063

(https://git.alpinelinux.org/cgit/apk-tools/commit/?id=e1a05c74cb8ae6ab41ee960343cc64a0a9af95a5)

https://git.alpinelinux.org/cgit/apk-tools/commit/?id=8a28c6d0d4f81406c67e76b2bcdbe491aa734717 appears to be the commit which introduced this "autoupdate" behavior.

On the other hand, it does affect alpine 3.7 based images (and current 3.8) since the Alpine bug is only being updated in 3.8. 😢

Now every apk add|del will need to download the cache and delete it, even if it could've been done without hitting the network (and --no-network doesn't help).

So, I guess LGTM cc @tianon.

&& cd / \
&& rm -r /usr/src/ruby \
\
Expand Down
4 changes: 2 additions & 2 deletions 2.4/alpine3.6/Dockerfile
Expand Up @@ -81,15 +81,15 @@ RUN set -ex \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)" \
&& apk add --virtual .ruby-rundeps $runDeps \
&& apk add --no-cache --virtual .ruby-rundeps $runDeps \
bzip2 \
ca-certificates \
libffi-dev \
libressl-dev \
procps \
yaml-dev \
zlib-dev \
&& apk del .ruby-builddeps \
&& apk del --no-cache .ruby-builddeps \
&& cd / \
&& rm -r /usr/src/ruby \
\
Expand Down
4 changes: 2 additions & 2 deletions 2.4/alpine3.7/Dockerfile
Expand Up @@ -81,15 +81,15 @@ RUN set -ex \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)" \
&& apk add --virtual .ruby-rundeps $runDeps \
&& apk add --no-cache --virtual .ruby-rundeps $runDeps \
bzip2 \
ca-certificates \
libffi-dev \
libressl-dev \
procps \
yaml-dev \
zlib-dev \
&& apk del .ruby-builddeps \
&& apk del --no-cache .ruby-builddeps \
&& cd / \
&& rm -r /usr/src/ruby \
\
Expand Down
4 changes: 2 additions & 2 deletions 2.5/alpine3.7/Dockerfile
Expand Up @@ -81,15 +81,15 @@ RUN set -ex \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)" \
&& apk add --virtual .ruby-rundeps $runDeps \
&& apk add --no-cache --virtual .ruby-rundeps $runDeps \
bzip2 \
ca-certificates \
libffi-dev \
libressl-dev \
procps \
yaml-dev \
zlib-dev \
&& apk del .ruby-builddeps \
&& apk del --no-cache .ruby-builddeps \
&& cd / \
&& rm -r /usr/src/ruby \
\
Expand Down
4 changes: 2 additions & 2 deletions 2.6-rc/alpine3.7/Dockerfile
Expand Up @@ -81,15 +81,15 @@ RUN set -ex \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)" \
&& apk add --virtual .ruby-rundeps $runDeps \
&& apk add --no-cache --virtual .ruby-rundeps $runDeps \
bzip2 \
ca-certificates \
libffi-dev \
libressl-dev \
procps \
yaml-dev \
zlib-dev \
&& apk del .ruby-builddeps \
&& apk del --no-cache .ruby-builddeps \
&& cd / \
&& rm -r /usr/src/ruby \
\
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-alpine.template
Expand Up @@ -81,15 +81,15 @@ RUN set -ex \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)" \
&& apk add --virtual .ruby-rundeps $runDeps \
&& apk add --no-cache --virtual .ruby-rundeps $runDeps \
bzip2 \
ca-certificates \
libffi-dev \
libressl-dev \
procps \
yaml-dev \
zlib-dev \
&& apk del .ruby-builddeps \
&& apk del --no-cache .ruby-builddeps \
&& cd / \
&& rm -r /usr/src/ruby \
\
Expand Down