Setting up drupal with docker using two containers? nginx and mariadb

I am trying to get a Drupal local development environment up and running using docker.

The site I am working on is live, running on a digital ocean server. When I access that server (ssh -p 1111 @234.234.234.23)
and run (docker ps) I can see two containers running. One is for the nginx-php5-drupal container that I got from here (https://github.com/bnchdrff/dockerfiles)

  • Chef Test Kitchen verify file exists inside Docker container
  • Unable to run Tomcat 7 as service inside container on CoreOS
  • Docker on embedded systems, why not?
  • Can't connect to docker process
  • Docker fails to start due to “volume store metadata database: timeout”
  • Different Php-Fpm containers with Apache
  • The other container is a mariadb container that holds the database for the drupal site.

    I have run (docker export) on both of these containers, downloaded them and then set them up as images locally, named (mariadb:local) and (bnchdrff/nginx-php5-drupal:latest) respectively

    I then run:

    sudo docker run -d –name mariadb mariadb:local /sbin/init

    sudo docker run -d -p 80:80 -p 2222:22 –name nginx-php5-drupal-bnchdrff –link mariadb:db bnchdrff/nginx-php5-drupal:latest /sbin/init

    I then attempt to navigate to localhost:80 and/or localhost in my browser…

    Nothing appears.

    Am I doing this right?

    My understanding is patchy as I am new to all of this. I think the best thing for me to do is to restart the whole process from exporting the running containers from the live site to running them locally because I swapped out the live nginx-php5-drupal container for the old one from the github repo and I think the person who put the site online customised it…

    Thanks.

  • Commands in Dockerfile don't seem to be running
  • Custom Installer for Unix Platform to install Python, Java, MySQL
  • How to update config file through Dockerfile
  • docker apache passenger: error cannot load such file bundler/setup (LoadError)
  • my docker-compose is picking up files from another folder, not from where I'm running the command
  • Running the WSO2 Application Manager docker image with custom configuration
  • One Solution collect form web for “Setting up drupal with docker using two containers? nginx and mariadb”

    If you are on a MAC OS you’ll need to use the boot2docker ip address.
    You can get this by running the following command: boot2docker ip

    https://docs.docker.com/installation/mac/

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