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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -