From ed58cc3ad705a5a121e202fde7d2943c83075480 Mon Sep 17 00:00:00 2001 From: Chris Hearnshaw Date: Thu, 16 Jan 2025 19:09:21 +0000 Subject: [PATCH] Add Docker setup for development environment --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/Aider-AI/aider?shareId=XXXX-XXXX-XXXX-XXXX). --- CONTRIBUTING.md | 19 ++++++++++++++++++- README.md | 19 ++++++++++++++++++- docker-compose.yml | 12 ++++++++++++ 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 docker-compose.yml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index abe35a1c0ee..701074cf3e0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,3 @@ - # Contributing to the Project We welcome contributions in the form of bug reports, feature requests, @@ -130,6 +129,24 @@ The project includes a `Dockerfile` for building a Docker image. You can build t docker build -t aider -f docker/Dockerfile . ``` +### Setting up the Development Environment using Docker + +To set up the development environment using Docker, follow these steps: + +1. Ensure you have Docker and Docker Compose installed on your machine. +2. Clone the repository: + ```bash + git clone https://github.com/Aider-AI/aider.git + cd aider + ``` +3. Build and run the Docker container using `docker-compose`: + ```bash + docker-compose up --build + ``` +4. The development environment will be set up inside the Docker container, and you can start working on the project. + +The `docker-compose.yml` file defines the service for the development environment, using the `Dockerfile` located in the `benchmark` directory. It mounts the current directory to `/aider` inside the container and sets the working directory to `/aider`. Port 8000 is exposed for potential web server usage. + ### Building the Documentation The project's documentation is built using Jekyll and hosted on GitHub Pages. To build the documentation locally, follow these steps: diff --git a/README.md b/README.md index 13f32476618..d3ed16ca5d1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ - # Aider is AI pair programming in your terminal @@ -66,6 +65,24 @@ and [usage documentation](https://aider.chat/docs/usage.html) for more details. +## Setting up the development environment using Docker + +To set up the development environment using Docker, follow these steps: + +1. Ensure you have Docker and Docker Compose installed on your machine. +2. Clone the repository: + ```bash + git clone https://github.com/Aider-AI/aider.git + cd aider + ``` +3. Build and run the Docker container using `docker-compose`: + ```bash + docker-compose up --build + ``` +4. The development environment will be set up inside the Docker container, and you can start working on the project. + +The `docker-compose.yml` file defines the service for the development environment, using the `Dockerfile` located in the `benchmark` directory. It mounts the current directory to `/aider` inside the container and sets the working directory to `/aider`. Port 8000 is exposed for potential web server usage. + ## Features - Run aider with the files you want to edit: `aider ...` diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000000..772dbab6e76 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3.8' + +services: + aider-dev: + build: + context: . + dockerfile: benchmark/Dockerfile + volumes: + - .:/aider + working_dir: /aider + ports: + - "8000:8000"