This is a long-form response to this question, and describes how to get the nova-docker driver up running with devstack under Ubuntu 14.04 (Trusty). I wrote a similar post for Fedora 21, although that one was using the RDO Juno packages, while this one is using devstack and the upstream sources.

Getting started

We’ll be using the Ubuntu 14.04 cloud image (because my test environment runs on OpenStack).

First, let’s install a few prerequisites:

$ sudo apt-get update
$ sudo apt-get -y install git git-review python-pip python-dev

And generally make sure things are up-to-date:

$ sudo apt-get -y upgrade

Installing Docker

We need to install Docker if we’re going to use nova-docker.

Ubuntu 14.04 includes a fairly dated version of Docker, so I followed the instructions on the Docker website for installing the current version of Docker on Ubuntu; this ultimately got me:

$ sudo apt-get -y install lxc-docker
$ sudo docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef

Docker by default creates its socket (/var/run/docker.socket) with root:root ownership. We’re going to be running devstack as the ubuntu user, so let’s change that by editing /etc/default/docker and setting:

DOCKER_OPTS='-G ubuntu'

And restart docker:

$ sudo restart docker

And verify that we can access Docker as the ubuntu user:

$ docker version
Client version: 1.5.0
Client API version: 1.17

Installing nova-docker

As the ubuntu user, let’s get the nova-docker source code:

$ git clone
$ cd nova-docker

As of this writing (HEAD is “984900a Give some time for docker.stop to work”), you need to apply a patch to nova-docker to get it to work with the current Nova master branch:

$ git fetch \
  refs/changes/50/154750/3 \
  && git checkout FETCH_HEAD

Once that change has merged (update, 2015-02-12: the patch has merged), this step should no longer be necessary. With the patch we applied, we can install the nova-docker driver:

$ sudo pip install .

Configuring devstack

Now we’re ready to get devstack up and running. Start by cloning the repository:

$ git clone
$ cd devstack

Then create a local.conf file with the following content:



# The default fixed range ( conflicted with an address
# range I was using locally.

# This enables Neutron, because that's how I roll.
disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta

# I am disabling horizon (because I rarely use the web ui)
# and tempest in order to make the installer complete a 
# little faster.
disable_service horizon
disable_service tempest

# Introduce glance to docker images

# Configure nova to use the nova-docker driver

This will result in things getting installed in subdirectories of $HOME/stack. We enable Neutron and leave pretty much everything else set to default values.

Start the installation

So, now we’re all ready to roll!

$ ./
[Call Trace]
[ERROR] /home/ubuntu/devstack/stackrc:665 Could not determine host ip address. See local.conf for suggestions on setting HOST_IP.
/home/ubuntu/devstack/functions-common: line 322: /home/ubuntu/stack/logs/error.log: No such file or directory

…or not. This error happens if devstack is unable to turn your hostname into an IP address. We can set HOST_IP in our environment:

$ HOST_IP= ./

And then go grab a cup of coffee or something.

Install nova-docker rootwrap filters

Once is finished running, we need to install a rootwrap configuration file for nova-docker:

$ sudo cp nova-docker/etc/nova/rootwrap.d/docker.filters \

Starting a Docker container

Now that our environment is up and running, we should be able to start a container. We’ll start by grabbing some admin credentials for our OpenStack environment:

$ . openrc admin

Next, we need an appropriate image; my larsks/thttpd image is small (so it’s quick to download) and does not require any interactive terminal (so it’s appropriate for nova-docker), so let’s start with that:

$ docker pull larsks/thttpd
$ docker save larsks/thttpd |
  glance image-create --name larsks/thttpd \
    --is-public true --container-format docker \
    --disk-format raw

And now we’ll boot it up. I like to do this as a non-admin user:

$ . openrc demo
$ nova boot --image larsks/thttpd --flavor m1.small test0

After a bit, we should see:

$ nova list
| ID ...| Name  | Status |...| Power State | Networks           |
| 0c3...| test0 | ACTIVE |...| Running     | private= |

Let’s create a floating ip address:

$ nova floating-ip-create
| Ip         | Server Id | Fixed Ip | Pool   |
| | -         | -        | public |

And assign it to our container:

$ nova floating-ip-associate test0

And now access our service:

$ curl
<!DOCTYPE html>
                <title>Your web server is working</title>