Docker : Cannot access remote API

156 views Asked by At

I am trying to enable the docker rest API and then access it from my local machine. I have docker setup on an ec2 instance. I edit the ExecStart line in my /lib/systemd/systemd/docker.service

ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:4243

I then ran systemctl daemon-reload and sudo service docker restart .

When I run curl http://localhost:4243/version from inside the server, I get the return I am looking for. But when I run curl http://remote-machine-ip:4243/version from my local system I get a failed to connect error. How do I fix this?

0

There are 0 answers