-
Notifications
You must be signed in to change notification settings - Fork 329
feat(plugins/docker): add docker-ref
plugin
#3912
feat(plugins/docker): add docker-ref
plugin
#3912
Conversation
The `docker-pull` plugin really pulls the image in the case of On Demand Runners. Since we do require there a `docker.AccessInfo`, we can't avoid pulling the image (because HasRegistry automatically becomes true, and not providing a registry causes an error). To avoid patching `docker-pull` further, a `docker-ref` is created. This is only used in the very specific case where a `docker-pull` can't be used because all of the following conditions are met: - Access to the registry is not available - On-Demand Runner (ODR) is being used As a solution, this plugin allows you to be a sort of "noop" that adds a reference to a pre-built Docker image (e.g: in an external CI) in the `build` stage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking awesome! The website docs should definitely include the documentation for this plugin as well. 😄
I just tried this out locally with Docker and it worked great! Giving it a shot with ODRs next.
This plugin also works with ODRs! 🎉
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@denysvitali I think the last thing we need to do here is get the documentation generated! As mentioned elsewhere, make gen/website-mdx
will take care of this for you. I should also add that since this is a new plugin, you won't see the files in the diff, and you'll need to git add
each of the .mdx
files generated in website/content/partials/components
for docker-ref
.
Once they're added to the repo, the other required change to get the documentation to appear on the website is in website/content/plugins/docker.mdx
. There, you should add @include "components/builder-docker-ref.mdx"
, so the content will be displayed for the builder plugin!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@denysvitali thanks for adding the docs, this is a great plugin! 😄 🐋 💰
The
docker-pull
plugin really pulls the image in the case of On Demand Runners. Since we do require there adocker.AccessInfo
, we can't avoid pulling the image (because HasRegistry automatically becomes true, and not providing a registry causes an error).To avoid patching
docker-pull
further, adocker-ref
is created. This is only used in the very specific case where adocker-pull
can't be used because all of the following conditions are met:As a solution, this plugin allows you to be a sort of "noop" that adds a reference to a pre-built
Docker image (e.g: in an external CI) in the
build
stage.Example usage: