I wanted to install multiple independent Wordpress instances on a single server. I’m planning on doing this using multiple docker containers. I can do this following the tutorials.
My question is related to the management: after a while it gets messy to see how many contains are running, which Wordpress instance is up or not, … Is there any way to get a proper (web alike) overview where you could get a ‘management’ overview of what’s going on?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
There are a number of web interfaces for Docker out there like Rancher.io and Shipyard
Another approach would be to use the native process manager for your host OS. On Ubuntu 14.04, that would be Upstart while on CoreOS it is systemd. This will allow you to start, stop, and check the status of your containers using the native service command
As an example, I created a WordPress container using the tutum/wordpress image and named it “example.com”
docker run -p 80:80 --name "example.com" tutum/wordpress
A simple Upstart script to manage a Docker container would look like:
description "Wordpress - example.com"
author "Doker Guru"
start on filesystem and started docker
stop on runlevel [!2345]
respawn
exec /usr/bin/docker start -a example.com
pre-stop exec /usr/bin/docker stop -a example.com
and install it to /etc/init/example.conf The container will now start on boot, respawn if it dies, and you can use commands like:
$ sudo service example status
example stop/waiting
$ sudo service example start
example start/running, process 2900
$ sudo service example stop
example stop/waiting
Once you have multiple containers running multiple services running, this can make your life much easier.
Thanks for the useful answer. Would you then for each container use a different port number for the external world, like:
so that my webpages are accessible through:
Or can it also work as follows
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.