The following command will make a list with all docker container names and their respective IPs.
For the containers that have multiple IPs it will printed them on the same row as their name.
First, to avoid opening the network of the container to another network, you need to open a shell to the docker container itself. To do so, use the following command: docker exec -it website_db /bin/bash; After executing the exec command, you will get a shell to the docker container. Use…
Recently, we needed to delete the logs of a running docker setup. To do so, we used the following horrible solution: First, we executed docker system info | grep "Docker Root Dir";to get the installation path of docker. It resulted to the following: Docker Root Dir: /var/lib/docker Then, we truncated…
IP allocations First, we set up a static IP on the network device that would handle all external traffic and a DHCP on the network device that would access the management network, which is connected for maintenance. To do so, we created the following file: /etc/netplan/01-netcfg.yaml using the following command:…
thanks.
Brilliant, thanks!
My docker container didn’t had ‘ip’ command and curl command. Found this after spending 3 hours on internet. It worked as expected. Thanks lot !
Worked like charm, thank you!