Skip to content

πŸ™Œ OpenHands: AI-Driven Development

Fix: Compatible with older docker version for --add-host (#1604)

Leo886f713e4c29
diff --git a/README.md b/README.md
index 1a73df8b50..2c514a0cd2 100644
--- a/README.md
+++ b/README.md
@@ -64,7 +64,7 @@ docker run \
-v $WORKSPACE_BASE:/opt/workspace_base \
-v /var/run/docker.sock:/var/run/docker.sock \
-p 3000:3000 \
- --add-host host.docker.internal=host-gateway \
+ --add-host host.docker.internal:host-gateway \
ghcr.io/opendevin/opendevin:0.5
```
diff --git a/docs/modules/usage/intro.mdx b/docs/modules/usage/intro.mdx
index 37d51ae5a2..425ec749c5 100644
--- a/docs/modules/usage/intro.mdx
+++ b/docs/modules/usage/intro.mdx
@@ -84,7 +84,7 @@ docker run \
-v $WORKSPACE_BASE:/opt/workspace_base \
-v /var/run/docker.sock:/var/run/docker.sock \
-p 3000:3000 \
- --add-host host.docker.internal=host-gateway \
+ --add-host host.docker.internal:host-gateway \
ghcr.io/opendevin/opendevin:0.5
```
diff --git a/docs/modules/usage/llms/localLLMs.md b/docs/modules/usage/llms/localLLMs.md
index e9eb25b2cb..f51ea1e69f 100644
--- a/docs/modules/usage/llms/localLLMs.md
+++ b/docs/modules/usage/llms/localLLMs.md
@@ -32,7 +32,7 @@ Use the instructions [here](../intro) to start OpenDevin using Docker.
But when running `docker run`, you'll need to add a few more arguments:
```bash
---add-host host.docker.internal=host-gateway \
+--add-host host.docker.internal:host-gateway \
-e LLM_API_KEY="ollama" \
-e LLM_BASE_URL="http://host.docker.internal:11434" \
```
@@ -44,7 +44,7 @@ For example:
export WORKSPACE_BASE=$(pwd)/workspace
docker run \
- --add-host host.docker.internal=host-gateway \
+ --add-host host.docker.internal:host-gateway \
-e SANDBOX_USER_ID=$(id -u) \
-e LLM_API_KEY="ollama" \
-e LLM_BASE_URL="http://host.docker.internal:11434" \
diff --git a/docs/modules/usage/troubleshooting/troubleshooting.md b/docs/modules/usage/troubleshooting/troubleshooting.md
index b1ee52f2f6..addca5a111 100644
--- a/docs/modules/usage/troubleshooting/troubleshooting.md
+++ b/docs/modules/usage/troubleshooting/troubleshooting.md
@@ -89,7 +89,7 @@ See our guide for [local LLMs](llms/localLLMs) for more information.
- Check your `LLM_BASE_URL`
- Check that ollama is running OK
-- Make sure you're using `--add-host host.docker.internal=host-gateway` when running in docker
+- Make sure you're using `--add-host host.docker.internal:host-gateway` when running in docker
## 404 Resource not found
### Symptoms
diff --git a/docs/src/components/Code/Code.tsx b/docs/src/components/Code/Code.tsx
index c539955bc6..56ade31aaf 100644
--- a/docs/src/components/Code/Code.tsx
+++ b/docs/src/components/Code/Code.tsx
@@ -14,7 +14,7 @@ export WORKSPACE_BASE=$(pwd)/workspace`;
-v $WORKSPACE_BASE:/opt/workspace_base \\
-v /var/run/docker.sock:/var/run/docker.sock \\
-p 3000:3000 \\
- --add-host host.docker.internal=host-gateway \\
+ --add-host host.docker.internal:host-gateway \\
ghcr.io/opendevin/opendevin:0.5`;
return (