Howto link a prestashop docker to an existing mysql server

I’m using the following Prestashop docker:

It so happens that I already have a mysql server running on the host, because that was included with the whole DirectAdmin panel.

  • Docker varnish start with command but not with docker-compose
  • What makes docker secure?
  • using kerberos in a container, inside of openshift / kubernetes
  • Docker images proxy server (private docker registry) using Nexus OSS and reusing its dependency images
  • Docker container specific disk quota
  • Pathload from Docker container
  • The variable DB_SERVER does nothing if I specify localhost or the IP adres of my server. -p 3306:3306 is also not allowed, since that port is already in use.

    How can a Docker container reach the host:3306 mysql server?

  • Change system date time in docker containers without impacting the host
  • Is it possible to mount a docker image and then access it (RO) as a normal directory or mounted device?
  • Get docker-compose.yml file location from running container?
  • Docker, what is it and what is the purpose
  • Jenkins ANT scripting: Save file with timestamp
  • Best Docker logging architecture using ELK stack
  • One Solution collect form web for “Howto link a prestashop docker to an existing mysql server”

    If I understand correctly, you have your Prestashop installation inside a container and MySQL server running on the Docker host?

    Unless configured differently, both the container and the host are in the same bridge network.

    Verify that your container is in the bridge network:

    docker inspect <container-name>
            "Networks": {
                "bridge": {
                    "Gateway": "",
                    "IPAddress": "",

    Notice the gateway IP address – this is the address of the docker host inside the bridge network. Use it as a DB_SERVER variable to connect to the MySQL.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.