EC2 Instance Docker and Restricted IP Access
If you want your EC2 instance to be accessible only from a certain IP, you can do so using Security Groups. You can either create a new Security Group or modify an existing one.
The important thing here is that after you create the Security Group, you need to add a rule for Docker on port 2376 so that your local Docker instance can communicate with the remote daemon.