anchor.diff:  
   The attack surface area for a Docker-based container running on Diego remains somewhat higher than that of a buildpack application because Docker allows users to fully specify the contents of their root file systems. A buildpack application runs on a trusted root filesystem.
   
  -The Garden-Linux team has implemented a host of features to allow the platform to run Docker images more securely in a multi-tenant context. In particular, Cloud Foundry uses the `user-namespacing` feature found on modern Linux kernels to ensure that users cannot gain escalated privileges on the host even if they escalate privileges within a container.
  +The Garden-runC provides features that allow the platform to run Docker images more securely in a multi-tenant context. In particular, Cloud Foundry uses the `user-namespacing` feature found on modern Linux kernels to ensure that users cannot gain escalated privileges on the host even if they escalate privileges within a container.
   
   The Cloud Controller always runs Docker containers on Diego with user namespaces enabled. This security restriction prevents certain features, such as the ability to mount FuseFS devices, from working in Docker containers.
   
  
positive.code: 
  <strong><%= modified_date %></strong>
  
  This topic describes Docker image support in Cloud Foundry with Diego and outlines how Cloud Foundry uses Diego to run Docker images. For more information about Diego, see the [Diego Architecture](../concepts/diego/diego-architecture.html) topic.
  
  A Docker image consists of a collection of layers. Each layer consists of one or both of the following:
  
  * Raw bits to download and mount. These bits form the file system.
  * Metadata that describes commands, users, and environment for the layer. This metadata includes the `ENTRYPOINT` and `CMD` directives, and is specified in the Dockerfile.
  
  ##<a id='create-container'></a>Understanding How Garden-Linux Creates Containers##
  
  Diego uses [Garden-Linux](https://github.com/cloudfoundry-incubator/garden-linux) to construct Linux containers. Garden-Linux builds Linux containers with the same kernel resource isolation features used by all Linux containers: **namespaces** and **cgroups**.
  
  Linux container creation requires that a file system is mounted as the root file system of the container. Garden-Linux supports mounting Docker images as root file systems for the containers it constructs. Garden-Linux fetches and caches the individual layers associated with a Docker image, then combines and mounts them as the root file system, using the same libraries that power Docker.
  
  This process yields a container with contents that exactly match the contents of the associated Docker image.
  
  ##<a id='run-monitor'></a>Understanding Diego Process Determination and Monitoring ##
  
  Once Garden-Linux creates a container, Diego runs and monitors the processes inside of it.
  
  To determine which processes to run, the [Cloud Controller](../concepts/architecture/cloud-controller.html) fetches the metadata associated with the Docker image and returns it to the Cloud Controller. The Cloud Controller uses this metadata to perform the following actions:
  
  
negative.code: 
  <p class='note'><strong>Note</strong>: Disabling the <code>diego_docker</code> feature flag stops all Docker-based apps in your deployment within a few convergence cycles, on the order of a minute.</p>
  
  ##<a id='push-docker'></a>Push a Docker Image with the Cloud Foundry Command Line Interface (cf CLI)
  
  Follow these instructions to deploy updated or new Docker images using Cloud Foundry Command Line Interface (cf CLI).
  
  To perform the procedures in this topic, you must install cf CLI v6.13.0 or later. See <a href="cf-cli/install-go-cli.html">Installing the cf CLI</a> for more information. For information about pushing a docker image with an previous version of the cf CLI, see <a href= 'https://github.com/cloudfoundry-incubator/diego-design-notes/blob/master/docker-support.md'>Docker Support in CF + Diego</a>.
  
  When pushing an app, you specify either a Docker image on Docker Hub or a URI to a trusted Docker registry. Diego does not support using private registries.
  
  ###<a id='public'></a>Push a Docker Image using Docker Hub
  
  Run `cf push test-app -o cloudfoundry/MY-DOCKER-IMAGE` to deploy a Docker image. Replace `MY-DOCKER-IMAGE` with the name of an image from an accessible Docker Registry.
  
  