On Tue, 14 Apr 2020 at 12:58, Philippe Mathieu-Daudé <phi...@redhat.com> wrote: > On 3/19/20 8:33 PM, Peter Maydell wrote: > > + # TODO: This re-downloads the tools every time, rather than > > + # caching and reusing the image produced with the downloaded tools. > > + # Not sure why. > > I remember something similar when using -f and COPY. > > My guess is using -f somefile instead of a directory, then COPY from > outside of the directory, the cache is invalidated (or not used). If the > file copied and the Dockerfile are in the same directory, it works (for me).
The comment turns out to be not entirely accurate -- at least some of the time it successfully skips re-doing the tools download; but sometimes it doesn't and I'm not sure what triggers that. > > + # TODO: how do you get 'docker build' to print the output of the > > + # commands it is running to its stdout? This would be useful for debug. > > Maybe '--progress plain'? Good find, I'll have to try that. thanks -- PMM