[GH-ISSUE #3227] ollama/ollama Docker image: committed modifications aren't saved #1989

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

Originally created by @nicolasduminil on GitHub (Mar 18, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3227

What is the issue?

I'm using the Docker image ollama/ollama:latest. I'm running the image and, in the new created container, I'm pulling llama2. Once the pull operation finished, I'm checking its success using the ollama list command.
Now, I commit the modification, I tag the new modified image and I push it on DockerHub.
Pulling it again, running it and checking the presence of llama2 fails as the result of the ollama list command is empty this time.

What did you expect to see?

I expect that the new augmented image contains llama2

Steps to reproduce

$ docker pull ollama/ollama:latest
$ docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
$ docker exec -ti ollama ollama pull llama2
   ... waiting 10 minutes ...
$ docker exec -ti ollama ollama list
NAME            ID              SIZE    MODIFIED           
llama2:latest   78e26419b446    3.8 GB  About a minute ago
$ docker commit ollama
$ docker tag <image_id> nicolasduminil/ollama:llama2
$ docker push nicolasduminil/ollama:llama2
$ docker pull nicolasduminil/ollama:llama2
$ docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama nicolasduminil/ollama:llama2
$ docker exec -ti ollama ollama list
NAME            ID              SIZE    MODIFIED           

Are there any recent changes that introduced the issue?

Negative

OS

Linux

Architecture

x86

Platform

No response

Ollama version

No response

GPU

No response

GPU info

No response

CPU

Intel

Other software

None

Originally created by @nicolasduminil on GitHub (Mar 18, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3227 ### What is the issue? I'm using the Docker image `ollama/ollama:latest`. I'm running the image and, in the new created container, I'm pulling `llama2`. Once the pull operation finished, I'm checking its success using the `ollama list` command. Now, I commit the modification, I tag the new modified image and I push it on DockerHub. Pulling it again, running it and checking the presence of `llama2` fails as the result of the `ollama list` command is empty this time. ### What did you expect to see? I expect that the new augmented image contains `llama2` ### Steps to reproduce $ docker pull ollama/ollama:latest $ docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama $ docker exec -ti ollama ollama pull llama2 ... waiting 10 minutes ... $ docker exec -ti ollama ollama list NAME ID SIZE MODIFIED llama2:latest 78e26419b446 3.8 GB About a minute ago $ docker commit ollama $ docker tag <image_id> nicolasduminil/ollama:llama2 $ docker push nicolasduminil/ollama:llama2 $ docker pull nicolasduminil/ollama:llama2 $ docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama nicolasduminil/ollama:llama2 $ docker exec -ti ollama ollama list NAME ID SIZE MODIFIED ### Are there any recent changes that introduced the issue? Negative ### OS Linux ### Architecture x86 ### Platform _No response_ ### Ollama version _No response_ ### GPU _No response_ ### GPU info _No response_ ### CPU Intel ### Other software None
GiteaMirror added the bug label 2026-04-12 12:11:04 -05:00
Author
Owner

@mxyng commented on GitHub (Mar 19, 2024):

$ docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama

This command starts the container and binds the ollama home directory to a docker volume. This volume is not part of the container image but the docker host so this is the expected behaviour. The behaviour you want requires removing the -v

<!-- gh-comment-id:2006352759 --> @mxyng commented on GitHub (Mar 19, 2024): > $ docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama This command starts the container and binds the ollama home directory to a docker volume. This volume is not part of the container image but the docker host so this is the expected behaviour. The behaviour you want requires removing the `-v`
Author
Owner

@nicolasduminil commented on GitHub (Mar 19, 2024):

Got it, thanks.

<!-- gh-comment-id:2007224064 --> @nicolasduminil commented on GitHub (Mar 19, 2024): Got it, thanks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#1989