Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 1.64 KB

README.md

File metadata and controls

54 lines (36 loc) · 1.64 KB

Develop in Docker

Install Docker on your host machine and run:

make docker-dev
# same as:
cd ./containers/dev
./dev.sh

It could take some time if you are running for the first time as Docker will pull all the tools required for building OpenHands. The next time you run again, it should be instant.

Build and run

If everything goes well, you should be inside a container after Docker finishes building the openhands:dev image similar to the following:

Build and run in Docker ...
root@93fc0005fcd2:/app#

You may now proceed with the normal build and run workflow as if you were on the host.

Make changes

The source code on the host is mounted as /app inside docker. You may edit the files as usual either inside the Docker container or on your host with your favorite IDE/editors.

The following are also mapped as readonly from your host:

# host credentials
- $HOME/.git-credentials:/root/.git-credentials:ro
- $HOME/.gitconfig:/root/.gitconfig:ro
- $HOME/.npmrc:/root/.npmrc:ro

VSCode

Alternatively, if you use VSCode, you could also attach to the running container.

See details for developing in docker or simply ask OpenHands ;-)

Rebuild dev image

You could optionally pass additional options to the build script.

make docker-dev OPTIONS="--build"
# or
./containers/dev/dev.sh --build

See docker compose run for more options.