Link docker containers (Drupal and MariaDB) -
to start built docker container mariadb docker image.
after loaded database dumpfile in running container.
[mariadb status][1]
everything goes fine. when want run/link drupal image:
docker run --name drupaldocker --link mariadbdocker:mariadb -p 8089:80 -d drupal
i can reach drupal installation page, when want load database have same errors:
-host, pass or dbname wrong.
but i'm pretty sure credentials right. seems drupal container can't find mariadb image.
docker links deprecated feature , should avoided: https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/
i assume have container named mariadbdocker running. if gain bash access inside drupaldocker container, should able ping mariadb alias this:
docker run --name drupaldocker --link mariadbdocker:mariadb -p 8089:80 -it drupal /bin/bash
if ping succeeds still have credentials issue.
Comments
Post a Comment