I am having trouble getting Docker to use a specific commit hash of an image. I want to use the image with SHA1 hash 1e0561c5cb6eba1e379f4c91648a2df8297059cc, but when I run the command "docker compose –profile auto up –build", the latest version is used instead. The Docker Compose YAML file is included in the question.
I have tried specifying the image with the full hash in the Docker Compose file, but it still pulls the latest version. Is there a way to force Docker to use the specific commit hash I want? Any help would be appreciated.
For reference, the image in question is located on this GitHub repository: https://github.com/AUTOMATIC1111/stable-diffusion-webui
2
Answers
You can force Docker to use a specific image with following syntax:
If this doesnt work you should give us more information.
In order to pull a docker image with its own SHA you have to follow the below syntax
shell command
docker compose example
Example of official Nginx image where you can get the full sha here
Official Documentation here