Make the change in your build environment and re-run
docker build. You will get a totally new image, but images can share parts; in effect, the later in your
Dockerfile the thing that changed is, the faster the rebuild will be and the more that will be shared with previous iterations of the image.
Images don’t have networking configuration. That running containers happen to is an implementation detail. If you read through this forum you can read lots of cases of people trying to impose a network configuration on Docker and struggling with it.
What you can easily do is run a container publishing a specific port on the host system. There’s an example of this in the Docker Containers tutorial. If you have multiple containers they’d each run on separate ports, and be accessible from outside via the host system’s DNS name or IP address.
I don’t understand this question. Can you share your
Dockerfile and give an example?