Docker Community Forums

Share and learn in the Docker community.

Restrict access to docker container to handful ip addresses

Hello

I am new to Docker and catching up. I have a container on private repo that I have no access to (eg; no access to op functionality of the repo). I need to restrict access to the container I pushed to the repo to handful list of ip(s) … example; if the incoming request ip is in this list:

11.222.333.10
22.333.444.11
44.555.666.34

allow access to the container and the service hosted in the container. otherwise deny… I made up these ip numbers

I understand I can do this via iptables. is there an example that I can follow? build images and test run containers on windows 10 prior to push.

Thank you for the help

Could you find anything for this issue?