I want to make my docker container accessable via specific ip address ('10.1.0.5').
I understood that to make the container run a service that will be public and accessable via '10.1.0.5' ip address like a real service and not from the local host I need to run this command:
docker run --name relay -p 10.1.0.5:3000:3000 image
When I do run this command on the terminal I am getting this error:
docker: Error response from daemon: Ports are not available: exposing port TCP 10.1.0.5:3000 -> 0.0.0.0:0: listen tcp 10.1.0.5:3000: bind: can't assign requested address.
ERRO[0000] error waiting for container: context canceled
My host machine is MacOS if that somehow related to the issue.
Can someone tell me what I am missing? or at least tell me why this is happening.