ollama Docker compose
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
services:
ollama:
image: ollama/ollama:latest
container_name: ollama
restart: unless-stopped
volumes:
- ./ollama/ollama:/root/.ollama
environment:
- OLLAMA_KEEP_ALIVE=24h
ollama-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: ollama-webui
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- ./ollama/ollama-webui:/app/backend/data
environment:
- OLLAMA_BASE_URL=http://ollama:11434
- WEBUI_AUTH=False
depends_on:
- ollama
docker exec -it ollama ollama pull llama3.2
#####
1
docker exec -it ollama ollama pull qwen3:0.6b
Run it interactively:
1
docker exec -it ollama ollama run qwen3:0.6b
List installed models:
1
docker exec -it ollama ollama list
Exit the interactive chat:
1
/bye
And if you want to delete the heavier Llama model afterward:
1
docker exec -it ollama ollama rm llama3.2
Never miss a story from us, subscribe to our newsletter