I need to create some docker containers that must be accessed by other computers at the same network.
Problem is that when I create the container, Docker gets IP ad
Docker containers can easily be accessed by other network node when a container:port is published through a host:port.
This is done using the -p
docker-run option. Here is the sum-up of the man-page ($man docker-run
gives more details and example that I won't copy/paste):
-p, --publish=[]
Publish a container's port, or range of ports, to the host.
See the doc online. This question/answer could be interesting to read too.
Basically:
docker run -it --rm -p 8085:8080 my_netcat nc -l -p 8080
Would allow LAN nodes to connect to the docker-host-ip:8085 and discuss with the netcat command.