--cache-from CLI flag not actually doing anything?
See original GitHub issueBug description
Hi 👋 I think this is a technical bug, but it may also be unclear documentation.
I’m setting up repo2docker in my CI workflow, the built image gets published to a public Docker Hub org. In my CI config, I have the following line (truncated):
repo2docker --cache-from DOCKER_ORG/IMAGE_NAME .
The assumption I’m drawing from these docs is that repo2docker will pull the latest tag of my image from Docker Hub and use it as a cache during the build of what will become the updated latest tag (a more sophisticated tagging system is happening too, promise) and, hopefully 🤞, this will speed up my image build.
However, that doesn’t seem to be happening and in fact no caching seems to be happening in my CI build at all (versus local builds which are much faster because the image is available locally). Is this a bug or have I misunderstood the purpose of the --cache-from
flag?
Expected behaviour
r2d would pull the latest tag of my image from Docker Hub and use it as a cache during rebuilds
Actual behaviour
No caching happens at all (in CI)
How to reproduce
Your personal set up
- OS: [e.g. linux, OSX] local OSX, CI linux
- Docker version:
docker version
19.03.8 - repo2docker version
repo2docker --version
built from master branch
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
I’ve put this on my to-do list so will try to get a PR together soon 🌺
I think that trade-off is something we should add to the help string. Not sure there is much automatic stuff we can do. Both how long it would take to pull the image and how long it would take to build it are unknown 😕
A little off-topic: I could swear we had an issue/discussion somewhere about providing docker images that contain the first few layers (miniconda setup etc) that almost everyone needs. This would speed up a lot of (first) builds and is probably worth the download. Maybe we should make a new ticket about this idea.