Reputation: 1180
I try to run a task in a docker image, which is not uploaded to docker hub, but instead installed locally (using docker build -t tagname/tagname
.) So it exists on the (only) worker.
image_resource:
type: docker-image
source: {repository: tagname/tagname}
However, that approach fails with the following error:
Is there an easy way to have concourse run a docker image without having to push it to docker hub nor to set up a local repository?
Upvotes: 3
Views: 3264
Reputation: 1180
From @Josh Zarrabi's answer, which I accept for its correctness I learned, not to do it. So the correct approach is to set up your own docker registry, which is very simple using the https://hub.docker.com/_/registry/ container.
Upvotes: 1
Reputation: 1064
This is possible with the rootfs_uri task parameter.
You will have to find out where exactly in the worker filesystem the rootfs created by docker build
is stored, and then reference it in the task with rootfs_uri: file://<your_rootfs>
.
As the documentation says this is not recommended as you are not taking advantage of any of the concourse image caching logic.
Upvotes: 2