Skip to content

Commit 286135f

Browse files
committed
feat: add troubleshooting guide for docker network errors
Signed-off-by: Nicolas Crocfer <[email protected]>
1 parent bc1884f commit 286135f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

docs/troubleshooting.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,36 @@ CSRF_TRUSTED_ORIGINS = [
7171
```
7272

7373
For more information, refer to the [Django documentation about `CSRF_TRUSTED_ORIGINS`](https://docs.djangoproject.com/en/5.1/ref/settings/#csrf-trusted-origins).
74+
75+
76+
## Docker build fails due to network issues
77+
78+
During installation with `./install.sh start`, the Docker build may fail with messages like:
79+
80+
```
81+
Connection timed out [IP: 151.101.194.132 80]
82+
E: Unable to locate package git
83+
```
84+
85+
This means the container could not access the internet to fetch packages. This issue is related to your **host machine or Docker network configuration**, not to OpenCVE itself.
86+
87+
You can work around the issue by forcing Docker to use the host network during the build. Edit your `docker-compose.yml` and add `network: host` under the `build` section of the service that fails, for example:
88+
89+
```
90+
webserver:
91+
env_file:
92+
- .env
93+
build:
94+
context: ../web/
95+
network: host
96+
...
97+
```
98+
99+
Then run the installation again:
100+
101+
```
102+
./install.sh start
103+
```
104+
105+
!!!note
106+
`network: host` only works on Linux. If you're on macOS or Windows, make sure your Docker has proper internet access and DNS resolution.

0 commit comments

Comments
 (0)