Here is the command I used to create containers :
docker network create prestashop
docker run -ti --name db --network prestashop -e MYSQL_ROOT_PASSWORD=1234 -p 3307:3306 -d mysql:latest
docker run -ti --name prestashop --network prestashop -e DB_SERVER=db -p 8080:80 -d prestashop/prestashop
With that I can access to the Prestashop installation however when I need to configure the database I get this error :
Database Server is not found. Please verify the login, password and server fields (DbPDO)
I'm using thoses fields :
Database server address : (for this one I tried :) db | 127.0.0.1:3037 | 127.0.0.1
Database name : prestashop
Database login : root
Database password : 1234
And I'm stuck to this step
EDIT :
Tried :
Insert another computer the same commands, everything works until I try to connect from the prestashop database configuration.
Removing the
-ti
options from the command line like @balexandre said.
Update
The issue come from the MySQL Version 8. I changed the mysql:latest
to mysql:5.7
and everything is working but this is not the version I'm looking for.
I still have no clue why MySQL 8 doesn't work