This repository provides a ready-to-use Docker setup for Aider, an AI coding assistant that works directly in your terminal.
- Run Aider via OpenRouter (Claude, GPT, Mistral, etc.)
- Run Aider locally with Ollama (LLaMA 3, Mistral, CodeLlama, etc.)
- Docker + Docker Compose setup
- Easy
.aider.conf.ymlfor defaults
git clone https://github.com/YOURNAME/aider-docker.git
cd aider-dockerdocker build -t aider .- Copy
.env.exampleto.envand add your key. - Run:
docker-compose run --rm aider-openrouter- Install Ollama:
curl -fsSL https://ollama.com/install.sh | sh - Pull a model:
ollama run llama3
- Run:
docker-compose run --rm aider-ollama
Default settings live in .aider.conf.yml.
Edit it to choose your favorite model/editor.
Examples:
# OpenRouter example
model: openrouter/anthropic/claude-3.5-sonnet
editor: nano# Ollama example
model: ollama/llama3
api_base: http://host.docker.internal:11434/v1
editor: nanoRebuild the image for the latest version:
docker build --no-cache -t aider .- On Linux, replace
host.docker.internalwith your host IP (often172.17.0.1). - Keep
.envsecret and never commit your API keys. - Check available models:
- OpenRouter: https://openrouter.ai/models
- Ollama: https://ollama.com/library
See more on my website