How to use the image resulting from docker_builder
in another tasks without an external registry?
#981
Unanswered
abravalheri
asked this question in
Q&A
Replies: 1 comment
-
I thinks Dockerfile as CI environment is what you are looking for. It should work with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I was wondering if anyone has some tips for the challenge I am currently facing. I tried to summarise it bellow:
I am trying to create a
.cirrus.yml
template that I can use across several projects.One of the challenges that I have is to install packages on Windows and cache them, so the next time the CI runs, they don't have to be installed again. My previous attempts showed that simply using regular cache/fingerprint/etc makes the configuration very complex, so in order to avoid that I tried to use the
dockerfile
directive to build a container image that can be cached.This is more or less a simplified version of my attempt:
However this results in an error:
Since my intention here is that I can re-use this file in other projects, it should be standalone and to not depend on additional files (which includes a separated
Dockerfile
). Using an external registry is also something I would like to avoid for 2 reasons: a) there is a lot of hassle in using an external registry (subscription, secret management, etc) and b) being able to add tools to this container without having to re-build it and upload to a registry first is very handy.I was hopping that by using a cache here I could share the file created in the auxiliary task to the point it could be used by the
dockerfile
directive... But apparently that is not possible.Since Cirrus uses a Docker Builder task under the hood to process the
dockerfile
directive, I wonder if there is a way of achieving that usingdocker_builder
. I had a look on the docs, but what is not clear to me is how to use the container that is being built in one task in another task without having to use an external registry (only relying on the internal cirrus cache)...Beta Was this translation helpful? Give feedback.
All reactions