How to create a bidirectional link between containers?

Docker 1.10 addresses this very nicely by introducing advanced container networking. (Details: https://docs.docker.com/engine/userguide/networking/dockernetworks/ ) First, create a network. The example below creates a basic “bridge” network, which works on one host only. You can check out docker’s more complete documentation to do this across hosts using an overlay network. docker network create my-fancy-network Docker networks … Read more

Access to mysql container from other container

The –link flag is considered a legacy feature, you should use user-defined networks. You can run both containers on the same network: docker run -d –name php_container –network my_network my_php_image docker run -d –name mysql_container –network my_network my_mysql_image Every container on that network will be able to communicate with each other using the container name … Read more

Port forwarding in docker-machine?

You can still access the VBoxmanage.exe command from the VirtualBox used by docker machine: VBoxManage controlvm “boot2docker-vm” natpf1 “tcp-port27017,tcp,,27017,,27017”; Use docker-machine info to get the name of your vm. use modifyvm if the vm isn’t started yet. See a practical example in this answer. That is the current workaround, pending the possibility to pass argument … Read more

Kubenetes: Is it possible to hit multiple pods with a single request in Kubernetes cluster

[*] Provided you got kubectl in your pod and have access to the api-server, you can get all endpoint adressess and pass them to curl: kubectl get endpoints <servicename> \ -o jsonpath=”{.subsets[*].addresses[*].ip}” | xargs curl Alternative without kubectl in pod: the recommended way to access the api server from a pod is by using kubectl … Read more