0

I'm attempting to setup a docker container to run expression engine. Using best practices for Docker, it is recommended to separate the db from the web host and php containers. However, it seems there is no easy way to specify a remote database that I can find. The admin.php wizard always fails to connect to the database.

  • I am using mysql 5.6 currently
  • I have a hostname (db) that connects to the SQL container correctly via telnet from php and web containers, so I know its available.
  • Setting the server address to db or its ip address fails to connect
  • I have even tried a stream rewrite in nginx to pass all data from localhost:3306 to db:3306 with no luck. Tested by telnetting to localhost:3306 from php and web containers.

Does anyone have the correct procedure to tweak the database hostname before running the wizard with admin.php?

Thanks!

2

Figured it out.

FROM php:fpm-alpine

Doesn't include the mysql mods. I had to add this line to my dockerfile for php container:

RUN docker-php-ext-install mysqli pdo pdo_mysql
| improve this answer | |
  • Thanks for the information. – Stéphane May 9 at 3:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.