Dockerfile without publishing to registry

My repo has a Dockerfile that we use for development. Is there a way to just reference that file in config.yml, or is it necessary to publish the image to the docker public registry?

You can build it in config.yml, if that’s what you mean. In what way do you want to reference it?

Oh neat, thanks.

In what way do you want to reference it?

No explicit need. I was wondering if there’s a way to replace image: circleci/python:3.6.1 with something like dockerfile:~/repo/Dockerfile to cut out the middle man.

Oh right, no - you can’t do that. You’d have a circular dependency.

The image name you refer to is for a build container. In order to build a new image (e.g. to be used for a build container) you would need to start a build container. But once a container is running, of course it cannot be swapped out for another one.

So, for this use case you would need a registry. If your real problem is that you want to avoid public registries, you can use private ones too. GitLab offers a pretty good one, and it is available on their free tier.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.