[GH-ISSUE #9065] how to restart ollama serve in docker #5903

Closed
opened 2026-04-12 17:14:19 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @A3shTnT on GitHub (Feb 13, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9065

i use ollama/ollama docker,and want to restart ollama to add some env variables, but i cannot kill -9 1 to kill ollama, and there is no systemctl in docker.

Originally created by @A3shTnT on GitHub (Feb 13, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9065 i use ollama/ollama docker,and want to restart ollama to add some env variables, but i cannot kill -9 1 to kill ollama, and there is no systemctl in docker.
Author
Owner

@A3shTnT commented on GitHub (Feb 13, 2025):

i use ollama/ollama docker,and want to restart ollama to add some env variables, but i cannot kill -9 1 to kill ollama, and there is no systemctl in docker.

maybe i could add env when docker run? docker run -e OLLAMA_LOAD_TIMEOUT=90m, for example?

<!-- gh-comment-id:2655716472 --> @A3shTnT commented on GitHub (Feb 13, 2025): > i use ollama/ollama docker,and want to restart ollama to add some env variables, but i cannot kill -9 1 to kill ollama, and there is no systemctl in docker. maybe i could add env when docker run? docker run -e OLLAMA_LOAD_TIMEOUT=90m, for example?
Author
Owner

@rick-github commented on GitHub (Feb 13, 2025):

docker restart ollama
<!-- gh-comment-id:2655730496 --> @rick-github commented on GitHub (Feb 13, 2025): ``` docker restart ollama ```
Author
Owner

@unicorn667 commented on GitHub (Feb 13, 2025):

use a docker compose file, the handling is much more easier than with docker cli commands.

<!-- gh-comment-id:2656434306 --> @unicorn667 commented on GitHub (Feb 13, 2025): use a docker compose file, the handling is much more easier than with docker cli commands.
Author
Owner

@A3shTnT commented on GitHub (Feb 13, 2025):

use a docker compose file, the handling is much more easier than with docker cli commands.

ok,i have tried it and works well, thank you.

<!-- gh-comment-id:2656577707 --> @A3shTnT commented on GitHub (Feb 13, 2025): > use a docker compose file, the handling is much more easier than with docker cli commands. > > ok,i have tried it and works well, thank you.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#5903