Docker how to specify an ip address with docker-compose

  docker, docker-compose

I use docker-compose to charge my container, I need to connect between container and host, so I need an ip that I always could access, I know docker’s default ip on linux is 172.17.0.x, but something strange is that every time I start up the container the ip will change, from to to and etc …, step by step

Source: StackOverflow