Fossil SCM

Switched from a Dockerfile "ADD" command to wget for the BusyBox source tarball because, surprisingly, [https://github.com/moby/moby/issues/12361 | BuildKit pulls the URL unconditionally] under the logic that it can't know whether to cache the pulled data until it has a copy to compare against! This not only means you pull the BusyBox source tarball for each container build even though it's tagged and thus cannot possibly change, it puts a load on GitHub which then causes it to begin throttling each pull, making your local builds slower and slower when iterating on a change set, as in the prior set of commits. By pushing the URL down into a wget command, we cause BuildKit to see an unchanging shell script line (assuming $BBXURL keeps its default) so it *does* cache the pulled layer.

wyoung 2023-03-24 08:27 trunk
Commit ac95559482cbc4962aba73386a842175cc7bfb9b5169a6ff5d34d8074eee4513
1 file changed +1 -1
+1 -1
--- Dockerfile
+++ Dockerfile
@@ -25,12 +25,12 @@
2525
### changes only when we change BBXVER. That will force an update of
2626
### the layers below, but this is a rare occurrence.
2727
ARG BBXVER="1_35_0"
2828
ENV BBXURL "https://github.com/mirror/busybox/tarball/${BBXVER}"
2929
COPY containers/busybox-config /tmp/bbx/.config
30
-ADD $BBXURL /tmp/bbx/src.tar.gz
3130
RUN set -x \
31
+ && wget -O /tmp/bbx/src.tar.gz ${BBXURL} \
3232
&& tar --strip-components=1 -C bbx -xzf bbx/src.tar.gz \
3333
&& ( cd bbx && yes "" | make oldconfig && make -j11 )
3434
3535
### The changeable Fossil layer is the only one in the first stage that
3636
### changes often, so add it last, to make it independent of the others.
3737
--- Dockerfile
+++ Dockerfile
@@ -25,12 +25,12 @@
25 ### changes only when we change BBXVER. That will force an update of
26 ### the layers below, but this is a rare occurrence.
27 ARG BBXVER="1_35_0"
28 ENV BBXURL "https://github.com/mirror/busybox/tarball/${BBXVER}"
29 COPY containers/busybox-config /tmp/bbx/.config
30 ADD $BBXURL /tmp/bbx/src.tar.gz
31 RUN set -x \
 
32 && tar --strip-components=1 -C bbx -xzf bbx/src.tar.gz \
33 && ( cd bbx && yes "" | make oldconfig && make -j11 )
34
35 ### The changeable Fossil layer is the only one in the first stage that
36 ### changes often, so add it last, to make it independent of the others.
37
--- Dockerfile
+++ Dockerfile
@@ -25,12 +25,12 @@
25 ### changes only when we change BBXVER. That will force an update of
26 ### the layers below, but this is a rare occurrence.
27 ARG BBXVER="1_35_0"
28 ENV BBXURL "https://github.com/mirror/busybox/tarball/${BBXVER}"
29 COPY containers/busybox-config /tmp/bbx/.config
 
30 RUN set -x \
31 && wget -O /tmp/bbx/src.tar.gz ${BBXURL} \
32 && tar --strip-components=1 -C bbx -xzf bbx/src.tar.gz \
33 && ( cd bbx && yes "" | make oldconfig && make -j11 )
34
35 ### The changeable Fossil layer is the only one in the first stage that
36 ### changes often, so add it last, to make it independent of the others.
37

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button