question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

--cache-from CLI flag not actually doing anything?

See original GitHub issue

Bug 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:open
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sgibson91commented, Apr 16, 2020

I’ve put this on my to-do list so will try to get a PR together soon 🌺

1reaction
betatimcommented, Apr 15, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cacheFrom option doesn't work · Issue #936 - GitHub
cacheFrom is a docker CLI flag specifically for artifacts built by docker, and is used by docker to determine images to consider as...
Read more >
Image rebase and improved remote cache support in new ...
Before we get into the details of what this new flag does, let's go over how the Dockerfile commands work at the moment....
Read more >
How to force Docker for a clean build of an image
$ docker build -t u12_core -f u12_core . When I am trying to rebuild it with the same command, it's using the build...
Read more >
podman-build
External containers can be removed with the podman rm --storage command. podman buildx build command is an alias of podman build . Not...
Read more >
Configuration cache - Gradle User Manual
The configuration cache does not support all core Gradle plugins and and features. ... if something goes wrong and use the configuration cache...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found