-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setup correctly connection from container to Docker API #38
Comments
I ended up with the following steps:
|
Hi glad to hear you found a solution. However it will work if you connect to the right host |
I highly recommend not binding "docker.sock" into you application container cause you can gain root access to you docker host system from within your web application container. |
Hi, I have tried |
what OS do you use? On Linux systems You have to bind your host applications to bridge network gateway in addition to localhost(127.0.0.1). Use following docker command to get the bridge network gateway IP address You might need to configure your firewall of the host system to allow the docker-host container to communicate with the host on your relevant port, see #21. |
maybe its because auf the bridge network configuration in your docker.compose file, can you give it a try without that network? |
Could you please explain how to setup correctly connection from container to Docker API or host port 2375 in Linux machine.
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock -H tcp://127.0.0.1:2375
sudo docker exec -it web_1 bash
curl -X GET host.docker.internal:2375/containers/json
and get an errorcurl: (6) Could not resolve host: host.docker.internal
Where am I wrong?
The text was updated successfully, but these errors were encountered: