![docker network modify docker network modify](https://dbafromthecold.files.wordpress.com/2017/06/dockerdefaultlocation.png)
In each of your docker-compose.yml configure the default network to use your externally created network with the networks top-level key.
In order to do this you’ll need to: Create an external network with docker network createMind that we can't connect to the “test3” container because it's in a different network. You can connect services defined across multiple docker-compose.yml files. Docker's builtin DNS service will resolve the address for us: :/# curl test2:8080 Since we're inside the Docker's network, we can also use the alias instead of the IP address. Then, use curl to send a request to the “test2” container: :/# curl 172.22.0.2:8080 Communication Between Containersįirst, let's get inside the “test1” container: $ docker exec -it b09a8f47e2a8 /bin/bash memory Change the container’s memory limit (e.g.
![docker network modify docker network modify](https://codentrick.com/content/images/2015/07/Docker_Linking_Dual-640x480.jpg)
cpu-shares Set the CPU share relative weight.
![docker network modify docker network modify](https://3.bp.blogspot.com/-ZDRjEUeX8g4/V5JpclaP8pI/AAAAAAAAAY4/eH6xdXlMINcsHlp16Pak10XbiJGyTwX9QCLcB/s1600/Docker%2Band%2BOVS.jpg)
cpus Set the number of CPUs available to the container. First, let's list all containers with their identifiers: $ docker ps -format 'table 'Īlternatively, we can print hosts directly from a container using the docker exec command: $ docker exec 78c10f03ad89 cat /etc/hostsġ72.23.0.3ė8c10f03ad89 5. Here’s a condensed list of the options you can use: -blkio-weight Change the container’s Block IO relative weight. Similarly, we can inspect a specific container.