Merge branch 'gwhaley-cc-bdl-minimum' into 'master'

Simplify the container-bundle page

The bundle description page had too much specific tech details, and needs to be more of an overview and jumping off point. Simplify and improve.

See merge request !148
This commit is contained in:
Rodrigo Caballero
2017-03-23 13:27:01 -07:00
+25 -69
View File
@@ -3,83 +3,39 @@
containers-basic
################
This bundle provides container applications
The `containers-basic` bundle adds the necessary tools to enable running
containers using Docker*. The bundle includes Intel® |CC| as an
additional Docker runtime.
Multiple runtime support for Docker
===================================
|CC| enable a hardware backed :abbr:`VM (Virtual Machine)` based
container runtime, compared with the normal software namespace containers
provided by standard Docker `runc` runtime.
Docker\* 1.12+ provides a way to execute containers using different **"oci
runtimes"**. An **"oci runtime"** is software compatible with :abbr:`OCI
(Open Containers Initiative)` specification that is responsible to create
a container.
Default runtime
===============
If your system has `VT-x` enabled, then, under |CL|, |CC|
will be used as the default Docker runtime, otherwise, the standard Docker
`runc` runtime will be used.
.. note:: Docker in Clear Linux is configured to use 2 runtimes:
To identify which runtimes are available and which is being used as
the default on your installed system, run the following command.
**cc-oci-runtime**: This is the default runtime used by docker in Clear Linux (if
Vt-x support is enabled). This runtime provides the capability to create secure
containers using Clear Containers (based VM containers).
.. code-block:: console
**runc**: This runtime is used to spawn and run containers using namespaces and
cgroups (this is the traditional way to create containers used by docker).
sudo docker info | grep Runtime
In Clear Linux, each time a container is created it uses cc-oci-runtime (*A.K.A*
**cor**).
The |CC| runtime will be listed as `cor`.
To start a secure container with cc-oci-runtime aka cor::
For more information on |CC| please see the
`Clear Containers runtime GitHub`_.
docker run -ti debian sh
Working with a proxy
====================
In the case you want to start a non secure container. You can
use the option **--runtime=runc** in the docker command **"run"**
If you are behind an HTTP proxy server, in a corporate
setting for example, please follow the `Docker proxy instructions`_.
To start an non-secure container using runc runtime::
docker run --runtime=runc -ti debian sh
Change default runtime
======================
To modify the default runtime you can override
the stateless docker daemon configuration
creating the file :file:`/etc/systemd/system/docker-cor.service.d/docker.conf`
and adding **--default-runtinme=runc**::
[Service]
ExecStart=/usr/bin/dockerd -H fd:// --storage-driver=overlay --add runtime cor=cc-oci-runtime --default-runtime=runc
HTTP proxy
==========
If you are behind an HTTP proxy server, for example in corporate settings, you
will need to add this configuration in the Docker systemd service file.
First, create a systemd drop-in directory for the docker service::
mkdir /etc/systemd/system/docker-cor.service.d
Now create a file called :file:`/etc/systemd/system/docker-cor.service.d/http-proxy.conf`
that adds the HTTP_PROXY environment variable::
[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80/"
If you have internal Docker registries that you need to contact without proxying
you can specify them via the NO_PROXY environment variable::
Environment="HTTP_PROXY=http://proxy.example.com:80/" "NO_PROXY=localhost,127.0.0.1,docker-registry.somecorporation.com"
Flush changes::
$ sudo systemctl daemon-reload
Verify that the configuration has been loaded::
$ systemctl show --property=Environment docker-cor
Environment=HTTP_PROXY=http://proxy.example.com:80/
Restart Docker::
$ sudo systemctl restart docker-cor
To get more info you can view https://docs.docker.com/engine/admin/systemd/
.. _Clear Containers runtime GitHub: https://github.com/01org/cc-oci-runtime
.. _Docker proxy instructions:
https://docs.docker.xom/engine/admin/systemd/#http-proxy