Error Starting Project using Podman
- Dominant language
- Python
- Stars
- 170
- Forks
- 189
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I use podman as docker replacement and I was not able to start the project using `./manage start --logs`.
I was able to solve the problem and it seems to be an intended incompatibility between docker and podman. So it might not to be a bug of this project. However, I still wanted to leave this here for others that might run into the same problem.
### Problem:
All container exited because `DOCKERHOST` is missing
```
von-node2-1 | Ledger does not exist - Creating...
von-node2-1 | von_generate_transactions -n 2
von-node2-1 | Error: no IP, IPS, or DOCKERHOST argument provided.
von-node3-1 | Ledger does not exist - Creating...
von-node3-1 | von_generate_transactions -n 3
von-node3-1 | Error: no IP, IPS, or DOCKERHOST argument provided.
von-node4-1 | Ledger does not exist - Creating...
von-node4-1 | von_generate_transactions -n 4
von-node4-1 | Error: no IP, IPS, or DOCKERHOST argument provided.
von-node1-1 | Ledger does not exist - Creating...
von-node1-1 | von_generate_transactions -n 1
von-node1-1 | Error: no IP, IPS, or DOCKERHOST argument provided.
von-webserver-1 | Ledger does not exist - Creating genesis data...
von-webserver-1 | von_generate_transactions -n
von-webserver-1 | Error: no IP, IPS, or DOCKERHOST argument provided.
von-webserver-1 exited with code 1
```
### DOCKERHOST resolution:
The problem is that the used DOCKERHOST resolution does not work with podman.
Neither `host.docker.internal` nor `docker run --rm --net=host eclipse/che-ip` returns the docker host IP. (from used script: https://raw.githubusercontent.com/bcgov/DITP-DevOps/main/code/snippets/getDockerHost)
This seems to be intended by the podman devs: https://github.com/containers/podman/issues/10878
### Solution
The default IP for podman seems to be `10.0.2.2`. Setting the `DOCKERHOST=10.0.2.2` in the `.env` file solved this issue.
EDIT:
- This solution made the webserver work but the webserver was not able to connect to the pool.
- Uninstalling podman and switching to docker solved this and now everything works.
- So there are probably more incompatibilities with podman.
Contributor guide
Research direction
Start with ./manage start --logs and the DOCKERHOST handling described in the issue, including the linked getDockerHost script and .env setting. Reproduce with Podman, then compare the webserver and pool connection failures; done would require a clearly defined, tested compatibility change or updated guidance, which this issue does not currently specify.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100