Docker Setup
Run Jarvis in Docker containers for isolation and easy deployment.
Quick Start
Build the image:
docker build -t jarvis .Run the container:
docker run -p 18789:18789 -v ~/.jarvis:/root/.jarvis jarvisDocker Compose
docker-compose.yml:
version: '3.8'
services:
jarvis:
build: .
ports:
- "18789:18789"
volumes:
- ~/.jarvis:/root/.jarvis
- ~/.ollama:/root/.ollama
environment:
- OLLAMA_HOST=host.docker.internal:11434
restart: unless-stoppedStart with:
docker-compose up -dEnvironment Variables
JARVIS_CONFIG_DIRConfig directory (default: ~/.jarvis)
OLLAMA_HOSTOllama server address (default: 127.0.0.1:11434)
JARVIS_GIT_DIRSource code location (default: ~/jarvis)
Volume Mounts
Mount these directories to persist data:
~/.jarvis:/root/.jarvisConfiguration and state
~/.ollama:/root/.ollamaOllama models (optional)
~/jarvis:/root/jarvisSource code (if building from source)
Networking
Port Mapping
Expose the gateway port:
-p 18789:18789Connecting to Host Ollama
If Ollama runs on the host machine:
-e OLLAMA_HOST=host.docker.internal:11434Production Tips
- •Use
restart: unless-stoppedfor automatic recovery - •Set resource limits with
--memoryand--cpus - •Use Docker secrets for API keys instead of environment variables
- •Enable logging with
--log-driver - •Consider using a reverse proxy (nginx, Caddy) for HTTPS