Git Product home page Git Product logo

drupal8-docker's Introduction

Drupal 8 - Docker Local Development

Docker enviroment setting up for Drupal 8 local development

Drupal version: 8.6.12

Clone this project

git clone https://github.com/dalenguyen/drupal8-docker.git
cd drupal8-docker

Before bringing up containers

This command will install Drupal 8.6.12 to drupal/web folder. For Windows user, you can skip this step. Instead, you have download drupal 8 from the main website and put in under drupal/web folder.

sh drupal-install.sh

Getting started

Manage the containers

docker-compose up -d
docker-compose down

Change your hosts file

Please update your /etc/hosts in order to visit the site and the dashboard

## Drupal 8 Docker
127.0.0.1       drupal8.localhost:8080
127.0.0.1       portainer.drupal8.localhost:8080

Database management

Export database

docker exec drupal8_mysql /usr/bin/mysqldump -u root --password=password drupal > drupal/backup.sql

Import database

cat drupal/backup.sql  | docker exec -i drupal8_mysql /usr/bin/mysql -u root --password=password drupal

Notes

Remember to change the host name of MySQL is to drupal8_mysql when you install Drupal.

Reference

Docker for WordPress Development

drupal8-docker's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

drupal8-docker's Issues

docker bash into server

Hi,
Can you please update the document on how to bash in to the server ?

CONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS              PORTS                  NAMES
018c6dc007f7        nginx:alpine            "nginx -g 'daemon of…"   8 minutes ago       Up 4 minutes        0.0.0.0:8080->80/tcp   drupal8_nginx
7af5abe5ffcb        drupal:8.6-fpm-alpine   "docker-php-entrypoi…"   8 minutes ago       Up 8 minutes        9000/tcp               drupal8_drupal
a33a82d4194b        mysql:8                 "/entrypoint.sh --de…"   8 minutes ago       Up 8 minutes        3306/tcp, 33060/tcp    drupal8_mysql

I get below errors when trying;

$docker exec drupal8_drupal bash
OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown

$docker exec drupal8_nginx bash
OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.