docker run --name some-app --link some-mysql:mysql -d application-that-uses-mysql
docker ps
# Now to get the mysql ip address
docker inspect [result ip from ps for mysql instance]
# Replace below ip with real mysql ip result from inspect
mysql --host=172.17.0.5 --user=root --password=mysecretpassword
Comments