Commit 8d3443a8 authored by Ernesto Rodriguez Ortiz's avatar Ernesto Rodriguez Ortiz
Browse files

Update the README

parent 2610a6cf
......@@ -6,112 +6,72 @@ To build, make sure you have Docker [installed](
This will try to go in line with [Drupal automated-testing](
## kill any running docker daemon
sudo killall docker
## Install docker:
First, check that your APT system can deal with https URLs: the file /usr/lib/apt/methods/https should exist. If it doesn't, you need to install the package apt-transport-https.
curl | sudo sh -x
[ -e /usr/lib/apt/methods/https ] || {
apt-get update
apt-get install apt-transport-https
## Clone this repo somewhere,
Then, add the Docker repository key to your local keychain.
git clone
cd docker-drupal
sudo apt-key adv --keyserver hkp:// --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
and then build it:
Add the Docker repository to your apt sources list, update and install the lxc-docker package.
sudo docker build -t <yourname>/drupal .
sudo sh -c "echo deb docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker
this can take a while but should eventually return a command prompt. It's done when it says "Successfully built {hash}"
Add your user to the docker group to be able to execute docker command wihtout sudo
## And run the container, connecting port 80:
sudo docker run -d -t -p 80:80 <yourname>/drupal
adduser <user> docker
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`
build directly from github is broken at the moment:
## Clone this repo somewhere,
sudo docker build -t <yourname>/drupal git://
git clone
cd docker-lampd
### 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:
and then build it:
# sudo docker ps
538114c20d36 <yourname>/drupal:latest /bin/bash / 3 minutes ago Up 6 seconds 80->80
sudo docker build -t sflinux/baseimage .
sudo docker stop 538114c20d36
sudo docker start 538114c20d36
this can take a while but should eventually return a command prompt. It's done when it says "Successfully built {hash}"
Commit the actual state to the image
sudo docker commit 538114c20d36 <yourname>/drupal
That's it!
Now you have your base image that can be used in all your Drupal projects instead of use ubuntu:lastes or ubuntu:14.04
Starting again with the commited changes
sudo docker run -d -t -p 80:80 <yourname>/drupal /
You can verifid this runing
Shipping the container image elsewhere
sudo docker push <yourname>/drupal
# sudo docker images
sflinux/baseimage latest a57eacb74c44 4 days ago 723.7 MB
You can find more images using the [Docker Index][docker_index].
### More information about this project
This project use phusion/baseimage like base image to build and image with all the software neede to install Drupal projects and make tests
### Clean up
While i am developing i use this to rm all old instances
sudo docker ps -a | awk '{print $1}' | grep -v CONTAINER | xargs -n1 -I {} docker rm {}
To read about why use phusion/baseimage and not ubuntu:14.04 look at [Phusion Baseimage](
### Known Issues
* Upstart on Docker is broken due to [this issue][docker_upstart_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.
You generally not will need to run this image, it will be used generally to build other images
## 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][author] (<>)
Created and maintained by [Ernesto Rodriguez Ortiz][author] (>)
## License
GPL v3
GPL v2
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment