Run Ollama in Docker (docker pull and docker run)
Last verified: 2026-09-06
- Install Docker Engine or Docker Desktop (Linux, macOS, or Windows with WSL2)
- Pull the image: docker pull ollama/ollama
- Start the container: docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
- GPU (NVIDIA): add --gpus=all to docker run when the NVIDIA Container Toolkit is installed
- Pull a model inside the container: docker exec -it ollama ollama pull llama3.2
- Test: docker exec -it ollama ollama run llama3.2
- Host API URL: http://localhost:11434 — use docker exec -it ollama ollama list to confirm models
Back to catalog