bcgov / von-network

A portable development level Indy Node network.
Apache License 2.0
163 stars 188 forks source link

Error Starting Project using Podman #284

Open TomAtGithub opened 1 year ago

TomAtGithub commented 1 year ago

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:

WadeBarnes commented 1 year ago

Thanks for the info @TomAtGithub