Docker Community Forums

Share and learn in the Docker community.

Assign IP Address for container

Hello,

I am new to docker and getting started with docker for mac. Here is my version details

$ docker version
Client:
Version: 1.12.6
API version: 1.24
Go version: go1.6.4
Git commit: 78d1802
Built: Wed Jan 11 00:23:16 2017
OS/Arch: darwin/amd64

Server:
Version: 1.12.6
API version: 1.24
Go version: go1.6.4
Git commit: 78d1802
Built: Wed Jan 11 00:23:16 2017
OS/Arch: linux/amd64

I do have a docker image that I want to run in a specific IP. How could I do this? I am able to run and access this from localhost ip and port forwarding also works fine. But I would like to run my container in a specific IP altogether. How could I achieve this? Kindly note that the question specific to “Docker for Mac”. Thanks.

Regards,
Sudeep