Note, Im actually using docker on linux 16.04, anyways I have container that are mandated created and controlled by the pterodactyl game panel I installed.
I have found multiple solutions but none seem to accommodate my issue. I found this command but I’m not sure how to apply it
[quote=“mikehaertl, post:5, topic:14248, full:true”]
The main problem for me was to reliably find out the IP address of the host. So in order to have a fixed set of IPs for both my host and my containers I’ve set up a docker network like this:
docker network create -d bridge --subnet 192.168.0.0/24 --gateway 192.168.0.1 dockernet
Now each container can connect to the host under the fixed IP 192.168.0.1.
You just need to make sure, that you connect all your containers to that “dockernet” network you just created. You can do that with the --net=dockernet option for docker run. Or from a docker-compose.yml:
version: ‘2’
services:
db:
image: some/image
networks:
- dockernet
networks:
dockernet:
external: true
Networks are described in the network documentation. They are quite useful and not very hard to understand.
If anyone has any insight please let me know.