Giter VIP home page Giter VIP logo

docker-drupal-nginx's Introduction

docker-drupal-nginx

This repo contains a recipe for making a Docker container for Drupal, using Linux, Nginx, php-apc, php-fpm and MySQL. To build, make sure you have Docker installed,

Install docker:

sudo apt-get -y install lxc-docker
curl get.docker.io | sudo sh -x

Installation

$ git clone https://github.com/ricardoamaro/docker-drupal-nginx.git
$ cd docker-drupal-nginx
$ sudo docker build -t="docker-drupal-nginx" .

And run the container, connecting port 80:

sudo docker run -d -t -p 80:80 docker-drupal-nginx

That's it! Visit http://localhost/ in your webrowser.

Note: you cannot have port 80 already used or the container will not start. In that case you can start by setting: -p 8080:80

Credentials

  • ROOT MYSQL_PASSWORD will be on /mysql-root-pw.txt
  • DRUPAL MYSQL PASSWORD will be on /drupal-db-pw.txt
  • Drupal account-name=admin & account-pass=admin

More docker awesomeness

This will create an ID that you can start/stop/commit changes:

# sudo docker ps
ID                  IMAGE                   COMMAND               CREATED             STATUS              PORTS
538114c20d36        docker-drupal-nginx   /bin/bash /start.sh   3 minutes ago       Up 6 seconds        80->80  

Start/Stop

sudo docker stop 538114c20d36
sudo docker start 538114c20d36

Commit the actual state to the image

sudo docker commit 538114c20d36 docker-drupal-nginx

Starting again with the commited changes

sudo docker run -d -t -p 80:80 docker-drupal-nginx /start.sh

Shipping the container image elsewhere

sudo docker push  docker-drupal-nginx

You can find more images using the Docker Index.

Clean up

While i am developing i use this to rm all old instances

sudo docker ps -a | awk '{print $1}' | xargs -n1 -I {} docker rm {}

Known Issues

  • Upstart on Docker is broken due to this issue, and that's one of the reasons the image is puppetized using vagrant.
  • Warning: This is still in development and ports shouldn't be open to the outside world.

Contributing

Feel free to fork and contribute to this code. :)

  1. Fork the repo
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Authors

Created and maintained by Ricardo Amaro (<mail [at] ricardoamaro. com>)

License

GPL v3

docker-drupal-nginx's People

Contributors

ricardoamaro avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

docker-drupal-nginx's Issues

The repository 'http://archive.ubuntu.com/ubuntu raring Release' does not have a Release file.?

Error on build

$ docker build -t="docker-drupal-nginx" .

Sending build context to Docker daemon  171.5kB
Step 1/24 : FROM    ubuntu:latest
latest: Pulling from library/ubuntu
a48c500ed24e: Pull complete
1e1de00ff7e1: Pull complete
0330ca45a200: Pull complete
471db38bcfbf: Pull complete
0b4aba487617: Pull complete
Digest: sha256:d2518289e66fd3892c2dae5003218117abeeed2edbb470cba544aef480fb6b3a
Status: Downloaded newer image for ubuntu:latest
 ---> 452a96d81c30
Step 2/24 : MAINTAINER Ricardo Amaro <mail_at_ricardoamaro.com>
 ---> Running in 066b6ab4fd59
Removing intermediate container 066b6ab4fd59
 ---> 790cd1d27442
Step 3/24 : RUN echo "deb http://archive.ubuntu.com/ubuntu raring main restricted universe multiverse" > /etc/apt/sources.list
 ---> Running in 1300eb34056e
Removing intermediate container 1300eb34056e
 ---> d78c4449ade8
Step 4/24 : RUN apt-get update
 ---> Running in 0eb64a73e66c
Ign:1 http://archive.ubuntu.com/ubuntu raring InRelease
Err:2 http://archive.ubuntu.com/ubuntu raring Release
  404  Not Found [IP: 91.189.88.149 80]
Reading package lists...
E: The repository 'http://archive.ubuntu.com/ubuntu raring Release' does not have a Release file.
The command '/bin/sh -c apt-get update' returned a non-zero code: 100

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.