I’ve made local changes to a docker image and used docker commit
to place it in the cache and then docker image save
to create a local copy, to ensure that it doesn’t get lost by an accidental overwrite. However, I cannot find syntax for specifying, in a docker-compose.yaml
file, that I want to use the local image. Is this possible?
2
Answers
I misunderstood the result of
docker image save
: it creates a tarball, not a full image. So it cannot be used directly -docker image load
/docker import
is needed to make it usable.So this is not possible AFAICT. It seems unlikely that this feature is going to be developed later, either.
In the docker-compose you can specify the image name. You can create a tag and use that in your docker-compose.