There is an issue with connectivity when trying to connect to dfx running in docker container. When running on external server I have no issue. Running from dfx ping from docker, host, external server doesn't help (tested with installed dfx 0.26.1 and 0.28.0 on client).
I tried the following:
- Run dfx inside docker (0.26.1, 0.27.0, 0.28.0)
ENV DFX_VERSION=0.28.0
RUN DFXVM_INIT_YES=true sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
ENV PATH="$HOME/.local/share/dfx/bin:$PATH"
RUN dfxvm install ${DFX_VERSION}
ENTRYPOINT ["sh", "-c", "dfx start --host 0.0.0.0:4943"]
There are also nvm and python pocket installation scripts like in icp-dev-env container. I use also version with script and SIGTERM to gracefully stop dfx on docker stop, but both options fail only for 0.28.0
- Ping outside docker using:
Ping inside container, which runs dfx works ok. Ping to localhost:4943, 127.0.0.1:4943 works.
I expected to see this happen:
{
"replica_health_status": "healthy",
"root_key": [...]
}
Instead, this happened:
Error: Failed while waiting for agent status.
Caused by: The replica returned an HTTP Error: Http Error: status 400 Bad Request, content type "text/plain; charset=utf-8", content: error: unknown_domain
details:
The requested domain is not served by this HTTP gateway.
Specifying --domain 172.17.0.1 on dfx start works for version 0.28.0, but doesn't work when container is on another server e.g. 192.168.0.12 and sends dfx ping http://192.168.0.12:4943.
Meta
dfx --version:
0.26.1 -> ok
0.27.0 -> ok
0.28.0 -> not ok
Further log output
Container:
Using the default configuration for the local shared network.
No local network replica found. Nothing to do.
info: dfx 0.28.0 is already installed
Running dfx start for version 0.28.0
Using the default configuration for the local shared network.
Replica API running on 0.0.0.0:4943. You must open a new terminal to continue developing. If you'd prefer to stop, quit with 'Ctrl-C'.
Client:
Error: Failed while waiting for agent status.
Caused by: The replica returned an HTTP Error: Http Error: status 400 Bad Request, content type "text/plain; charset=utf-8", content: error: unknown_domain
details:
The requested domain is not served by this HTTP gateway.
There is an issue with connectivity when trying to connect to dfx running in docker container. When running on external server I have no issue. Running from
dfx pingfrom docker, host, external server doesn't help (tested with installed dfx 0.26.1 and 0.28.0 on client).I tried the following:
There are also nvm and python pocket installation scripts like in
icp-dev-envcontainer. I use also version with script and SIGTERM to gracefully stop dfx on docker stop, but both options fail only for0.28.0Ping inside container, which runs dfx works ok. Ping to localhost:4943, 127.0.0.1:4943 works.
I expected to see this happen:
Instead, this happened:
Specifying
--domain 172.17.0.1ondfx startworks for version0.28.0, but doesn't work when container is on another server e.g.192.168.0.12and sendsdfx ping http://192.168.0.12:4943.Meta
dfx --version:Further log output
Container:
Client: