Search code examples
dockerdowngrade

How can I retrieve an older image for Docker instead of latest?


What command(s) do I have to run to retrieve an older image of a software offered in Docker?

I have problems with the latest image of localstack so I though I could try older versions to see what happens. However, I saw a comment in an issue mentioning editing the YAML file this way:

image: localstack/localstack:0.9

but no other info... (it was not the point of the issue, so it's understandable).

I've been looking around and saw many posts about getting the latest image (i.e. docker update ...), but nothing that would allow me to go back in time except for images that I would happen to already have.

Just the change above had absolutely no effect. I'm wondering how can I get Docker to download an older image so I can run that older one instead of the latest? I'm also wondering about how to find a list of available tags for a given docker to make sure I use a version that actually exists.


Solution

  • You should look for existing tags at desired repo's hub.

    If you are using docker-compose the correct way to do it is:

    image: <image>:<tag>
    

    If no tag was found then it is not available or does not exist.

    Here are tags available at localstack hub