[GH-ISSUE #4555] update Ollama in a Docker container #2855

Closed
opened 2026-04-12 13:12:11 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @szRyu666 on GitHub (May 21, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/4555

Originally assigned to: @dhiltgen on GitHub.

When I use Docker to run, it has already pulled the main branch and updated to the latest files. However, when I run ollama -v inside, it still shows version 0.1.33. On the other hand, using local installation and updating via curl successfully updates to version 0.1.38. How can I update Ollama running in a Docker container? I don’t want to delete the container every time and perform a complete pull operation again. Is there a way around this?

Originally created by @szRyu666 on GitHub (May 21, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/4555 Originally assigned to: @dhiltgen on GitHub. When I use Docker to run, it has already pulled the main branch and updated to the latest files. However, when I run ollama -v inside, it still shows version 0.1.33. On the other hand, using local installation and updating via curl successfully updates to version 0.1.38. How can I update Ollama running in a Docker container? I don’t want to delete the container every time and perform a complete pull operation again. Is there a way around this?
GiteaMirror added the feature request label 2026-04-12 13:12:11 -05:00
Author
Owner

@dhiltgen commented on GitHub (May 21, 2024):

We generate "latest" tags as well as version specific tags. https://hub.docker.com/r/ollama/ollama/tags

With Docker, if you run ollama/ollama (implying "latest") it will only pull once, and subsequent run commands will re-use that image, even if the "latest" tag has been replaced with a new version. To explicitly get the "latest", use docker pull ollama/ollama which will always check and refresh if there's a new "latest" tag, or you can pin to a specific version (e.g. ollama/ollama:0.1.38) This behavior is specific to Docker. For example, Kubernetes will always refresh the "latest" tag.

<!-- gh-comment-id:2123231646 --> @dhiltgen commented on GitHub (May 21, 2024): We generate "latest" tags as well as version specific tags. https://hub.docker.com/r/ollama/ollama/tags With Docker, if you run `ollama/ollama` (implying "latest") it will only pull once, and subsequent `run` commands will re-use that image, even if the "latest" tag has been replaced with a new version. To explicitly get the "latest", use `docker pull ollama/ollama` which will always check and refresh if there's a new "latest" tag, or you can pin to a specific version (e.g. `ollama/ollama:0.1.38`) This behavior is specific to Docker. For example, Kubernetes will always refresh the "latest" tag.
Author
Owner

@ArchiMickey commented on GitHub (May 22, 2024):

With Docker, if you run ollama/ollama (implying "latest") it will only pull once, and subsequent run commands will re-use that image, even if the "latest" tag has been replaced with a new version. To explicitly get the "latest", use docker pull ollama/ollama which will always check and refresh if there's a new "latest" tag, or you can pin to a specific version (e.g. ollama/ollama:0.1.38) This behavior is specific to Docker. For example, Kubernetes will always refresh the "latest" tag.

We need to create a new container for a newer image of ollama. In this case are we gonna download all the modelfiles and checkpoints again?

<!-- gh-comment-id:2124510031 --> @ArchiMickey commented on GitHub (May 22, 2024): > With Docker, if you run `ollama/ollama` (implying "latest") it will only pull once, and subsequent `run` commands will re-use that image, even if the "latest" tag has been replaced with a new version. To explicitly get the "latest", use `docker pull ollama/ollama` which will always check and refresh if there's a new "latest" tag, or you can pin to a specific version (e.g. `ollama/ollama:0.1.38`) This behavior is specific to Docker. For example, Kubernetes will always refresh the "latest" tag. We need to create a new container for a newer image of ollama. In this case are we gonna download all the modelfiles and checkpoints again?
Author
Owner

@dhiltgen commented on GitHub (May 23, 2024):

We need to create a new container for a newer image of ollama. In this case are we gonna download all the modelfiles and checkpoints again?

If you follow our recommend Docker run command, the model directory is mounted from the host with -v ollama:/root/.ollama and will be preserved. If you're using a different orchestrator like Kubernetes, you'll want to set up a PVC or equivalent persistent volume strategy to ensure the model dir is preserved across container instances to avoid re-pulling the models.

<!-- gh-comment-id:2127605650 --> @dhiltgen commented on GitHub (May 23, 2024): > We need to create a new container for a newer image of ollama. In this case are we gonna download all the modelfiles and checkpoints again? If you follow our [recommend Docker run command](https://github.com/ollama/ollama/blob/main/docs/docker.md), the model directory is mounted from the host with `-v ollama:/root/.ollama` and will be preserved. If you're using a different orchestrator like Kubernetes, you'll want to set up a PVC or equivalent persistent volume strategy to ensure the model dir is preserved across container instances to avoid re-pulling the models.
Author
Owner

@rushasdev commented on GitHub (Apr 7, 2026):

We need to create a new container for a newer image of ollama. In this case are we gonna download all the modelfiles and checkpoints again?

If you follow our recommend Docker run command, the model directory is mounted from the host with -v ollama:/root/.ollama and will be preserved. If you're using a different orchestrator like Kubernetes, you'll want to set up a PVC or equivalent persistent volume strategy to ensure the model dir is preserved across container instances to avoid re-pulling the models.

Hi, could you update the link for the recommend Docker run command please

<!-- gh-comment-id:4200589596 --> @rushasdev commented on GitHub (Apr 7, 2026): > > We need to create a new container for a newer image of ollama. In this case are we gonna download all the modelfiles and checkpoints again? > > If you follow our [recommend Docker run command](https://github.com/ollama/ollama/blob/main/docs/docker.md), the model directory is mounted from the host with `-v ollama:/root/.ollama` and will be preserved. If you're using a different orchestrator like Kubernetes, you'll want to set up a PVC or equivalent persistent volume strategy to ensure the model dir is preserved across container instances to avoid re-pulling the models. Hi, could you update the link for the `recommend Docker run command` please
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#2855