Docker Raw Format


The nova-docker project described here is unmaintained and has been retired. Please see the documentation on the Zun service for an alternative solution.

What actually fixed the root issue was deleting the Docker.raw file that Docker for Mac uses for storage, and restarting it. To find that file open up Docker for Mac and go to. Preferences Resources Advanced Disk Image Location.this is for version 2.2.0.5, but on older versions it should be similar. I'm new to Docker and want to run a container i downloaded. How much space should i give this raw file. It seems to be some sort of storage for the container. I read the docs but they don't say much about it's intent/purpose and if it pre-allocates all the space I give it or if it grows on demand to the max size is assigned. Specifically there are ones like CAPNETRAW in the default docker set which could be dangerous (see here for more details) Capability Gotcha’s. There are some gotcha’s to be aware of when using capabilities. First up is that, to use file capabilities, the filesystem you’re running from needs have extended attribute (xattr) support.

Docker Desktop stores Linux containers and images in a single, large “disk image” file in the Mac filesystem. This is different from Docker on Linux, which usually stores containers and images in the /var/lib/docker directory. The size of this file is big in your system because you have a lot of images and containers.

  • 1Overview
  • 2Configure an existing OpenStack installation to enable Docker
  • 3Configure DevStack to use Nova-Docker

Overview

The Docker driver is a hypervisor driver for Openstack Nova Compute. It was introduced with the Havana release, but lives out-of-tree for Icehouse and Juno. Being out-of-tree has allowed the driver to reach maturity and feature-parity faster than would be possible should it have remained in-tree. It is expected the driver will return to mainline Nova in the Kilo release.

Docker is an open-source engine which automates the deployment of applications as highly portable, self-sufficient containers which are independent of hardware, language, framework, packaging system and hosting provider.

Docker provides management of Linux containers with a high level API providing a lightweight solution that runs processes in isolation. It provides a way to automate software deployment in a secure and repeatable environment. A Docker container includes a software component along with all of its dependencies - binaries, libraries, configuration files, scripts, virtualenvs, jars, gems, tarballs, etc. Docker can be run on any x64 Linux kernel supporting cgroups and aufs.

Docker is a way of managing multiple containers on a single machine. However used behind Nova makes it much more powerful since it’s then possible to manage several hosts, which in turn manage hundreds of containers. The current Docker project aims for full OpenStack compatibility.

Containers don't aim to be a replacement for VMs, they are complementary in the sense that they are better for specific use cases.


What unique advantages Docker bring over other containers technologies?

Docker takes advantage of containers and filesystem technologies in a high-level which are not generic enough to be managed by libvirt.

  • Process-level API: Docker can collect the standard outputs and inputs of the process running in each container for logging or direct interaction, it allows blocking on a container until it exits, setting its environment, and other process-oriented primitives which don’t fit well in libvirt’s abstraction.
  • Advanced change control at the filesystem level: Every change made on the filesystem is managed through a set of layers which can be snapshotted, rolled back, diff-ed etc.
  • Image portability: The state of any docker container can be optionally committed as an image and shared through a central image registry. Docker images are designed to be portable across infrastructures, so they are a great building block for hybrid cloud scenarios.
  • Build facility: docker can automate the assembly of a container from an application’s source code. This gives developers an easy way to deploy payloads to an OpenStack cluster as part of their development workflow.


How does the Nova hypervisor work under the hood?

The Nova driver embeds a tiny HTTP client which talks with the Docker internal Rest API through a unix socket. It uses the HTTP API to control containers and fetch information about them.

The driver will fetch images from the OpenStack Image Service (Glance) and load them into the Docker filesystem. Images may be placed in Glance by exporting them from Docker using the 'docker save' command.

Older versions of this driver required running a private docker-registry, which would proxy to Glance. This is no longer required.

Docker Raw Format Software

Configure an existing OpenStack installation to enable Docker

Installing Docker for OpenStack

The first requirement is to install Docker on your compute hosts.

In order for Nova to communicate with Docker over its local socket, add nova to the docker group and restart the compute service to pick up the change:

You will also need to install the driver:

You should then install the required modules

You may optionally choose to create operating-system packages for this, or use another appropriate installation method for your deployment.

Nova configuration

Examples

Nova needs to be configured to use the Docker virt driver.

Edit the configuration file /etc/nova/nova.conf according to the following options:

Create the directory /etc/nova/rootwrap.d, if it does not already exist, and inside that directory create a file 'docker.filters' with the following content:

Glance configuration

Glance needs to be configured to support the 'docker' container format. It's important to leave the default ones in order to not break an existing glance install.

Using Nova-Docker

Docker

Once you configured Nova to use the docker driver, the flow is the same as anyother driver.

Only images with a 'docker' container format will be bootable. The image contains basically a tarball of the container filesystem.

It's recommended to add new images to Glance by using Docker. For instance, here is how you can fetch images from the public registry and push them back to Glance in order to boot a Nova instance with it:

Then, pull the image and push it to Glance:

NOTE: The name you provide to glance must match the name by which the image is known to docker.

You can obviously boot instances from nova cli:

Once the instance is booted:

You can also see the corresponding container on docker:

The command used here is the one configured in the image. Each container image can have a command configured for the run. The driver does not usually override this. You can image booting an apache2 instance, it will start the apache process if the image is authored properly via a Dockerfile.

Raw

Configure DevStack to use Nova-Docker

Using the Docker hypervisor via DevStack replaces all manual configuration needed above.

Note: below, localadmin admin user, adjust to suit your configuration

Install the latest Docker release

Ubuntu:

Fedora:

Prepare Nova-Docker

Set up Devstack

Clone devstack (it is recommended to use the same releases of devstack and nova-docker, e.g., stable/kilo, master, etc.)

Before running DevStack's stack.sh script, configure the following options in the local.conf or localrc file:

Configure nova to use the nova-docker driverNote: neutron is the default as of kilo

Start Devstack

./stack.sh

Testing Nova-Docker

Docker Raw Format Example

Copy the filters

Start a Container

Assign it a floating IP and connect to it

Configure DevStack to use Nova-Docker (alternate post-stack method)

Using the Docker hypervisor via DevStack replaces all manual configuration needed above.

Install Docker, then install Devstack and run stack.sh

Once stack.sh completes, run unstack.sh from the devstack directory

Install nova-docker:

Prepare DevStack:

Run stack.sh from devstack directory:

Docker

It may be necessary to install a Docker filter as well:

Docker Raw Format Download

Resources

  • Lars Kellogg-Stedman; Installing Nova-Docker with Devstack (blog post)

Docker Raw File

Community

We have a Nova Subteam and involvement of various contributors may be verified via Github's contributors page.

The Docker team is also involved with the more generic and highly-overlapping efforts of the Nova Containers Sub-team.

We are available on IRC on Freenode in #nova-docker. The containers team may be found in #openstack-containers.

Docker Raw Format Examples

Retrieved from 'https://wiki.openstack.org/w/index.php?title=Docker&oldid=176422'