How do you create Docker containers to have unique IP Addresses (but not the default 172.x.x.x type)?
(If you need help installing Docker, see this posting.)
Create new IP addresses with these commands (with sudo in front of them, preferably, or less preferably as the root user):
ip addr add 126.96.36.199/28 brd + dev eth0
ip addr add 188.8.131.52/28 brd + dev eth0
ip addr add 184.108.40.206/28 brd + dev eth0
# Replace the IP addresses and subnet masks as you desire
Then use a modified version of this command:
docker run -p 220.127.116.11:80:80 repositoryName:versionDesignation /bin/bash
# You can use the "docker images" command to find the "repositoryName" and "versionDesignation"
# The IP address and port mapping (from Linux server to Docker container) can be substituted as needed
Two or more containers on the same Docker host can use port 80 using this method. To have the IP addresses available upon every log in, you can create a /etc/profile.d/custom.sh file. This will give you the IP addresses on the Docker server upon logging in each time. The custom.sh file should have the lines you entered above after a "#!/bin/bash" header. Here is an example:
#!/bin/bash ip addr add 18.104.22.168/28 brd + dev eth0 ip addr add 22.214.171.124/28 brd + dev eth0 ip addr add 126.96.36.199/28 brd + dev eth0