{"_id":"5637e6fe97666c0d008656b6","version":{"_id":"55faf11ba62ba1170021a9aa","project":"55faf11ba62ba1170021a9a7","__v":45,"createdAt":"2015-09-17T16:58:03.490Z","releaseDate":"2015-09-17T16:58:03.490Z","categories":["55faf11ca62ba1170021a9ab","55faf8f4d0e22017005b8272","55faf91aa62ba1170021a9b5","55faf929a8a7770d00c2c0bd","55faf932a8a7770d00c2c0bf","55faf94b17b9d00d00969f47","55faf958d0e22017005b8274","55faf95fa8a7770d00c2c0c0","55faf96917b9d00d00969f48","55faf970a8a7770d00c2c0c1","55faf98c825d5f19001fa3a6","55faf99aa62ba1170021a9b8","55faf99fa62ba1170021a9b9","55faf9aa17b9d00d00969f49","55faf9b6a8a7770d00c2c0c3","55faf9bda62ba1170021a9ba","5604570090ee490d00440551","5637e8b2fbe1c50d008cb078","5649bb624fa1460d00780add","5671974d1b6b730d008b4823","5671979d60c8e70d006c9760","568e8eef70ca1f0d0035808e","56d0a2081ecc471500f1795e","56d4a0adde40c70b00823ea3","56d96b03dd90610b00270849","56fbb83d8f21c817002af880","573c811bee2b3b2200422be1","576bc92afb62dd20001cda85","5771811e27a5c20e00030dcd","5785191af3a10c0e009b75b0","57bdf84d5d48411900cd8dc0","57ff5c5dc135231700aed806","5804caf792398f0f00e77521","58458b4fba4f1c0f009692bb","586d3c287c6b5b2300c05055","58ef66d88646742f009a0216","58f5d52d7891630f00fe4e77","59a555bccdbd85001bfb1442","5a2a81f688574d001e9934f5","5b080c8d7833b20003ddbb6f","5c222bed4bc358002f21459a","5c22412594a2a5005cc9e919","5c41ae1c33592700190a291e","5c8a525e2ba7b2003f9b153c","5cbf14d58c79c700ef2b502e"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"githubsync":"","project":"55faf11ba62ba1170021a9a7","user":"554340dfb7f4540d00fcef1d","category":{"_id":"55faf958d0e22017005b8274","__v":8,"pages":["56268b3cc2781f0d00364bc0","5637bfa84dbdd919001b277d","5637e6fe97666c0d008656b6","5637e74acfaa870d00cdeb7a","5637e764f7e3990d007b2c52","5640baf604c3eb0d006fc43c","56cccb6894c8f00b00b83f24","56ddf68dba70f50e0033c6df"],"project":"55faf11ba62ba1170021a9a7","version":"55faf11ba62ba1170021a9aa","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-17T17:33:12.687Z","from_sync":false,"order":16,"slug":"bring-your-tools","title":"DOCKER"},"__v":17,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-02T22:43:10.759Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"Docker is an application that allows tools and their dependencies to be packaged into discrete runtime environments. These environments, **containers**, are built from **images** and are stored inside an **image registry**.\n\nFor an overview of Docker, please see the [Docker website](https://www.docker.com/). Learn more about Docker [images](#section-images), [containers](#section-containers) and [image registries](#section-image-registries) below.\n\n## Images\n\nA Docker **image** is a read-only file used to produce Docker containers. An image is composed of 'layers' of other images, and any change that is made to an image is carried out by adding a new layer. \n\nThe dependencies of Docker layers define an ordering, and any layer that does not depend on any other layer is called a **base image**. Typically this layer will describe the operating system for the environment.\n\nDocker images can be uploaded to the [CGC Image Registry](the-cgc-image-registry), where they are referenced by repositories, which correspond to projects on the CGC. Once uploaded, you can run these tools on the CGC. Workflows will execute the tools in series, inside the containers that they are installed in.\n\n## Containers\n\nA Docker **container** is a virtual private server. It can host software applications and their dependencies, which can be run from many diverse environments. Containers consist of an operating system, user-added files, and metadata.\n\nContainers are built from images, but feature a read-write layer on top, so, unlike images, are interactive and can store state. This means that you can run applications inside them. After any executions in your Docker container, you can save a snapshot of the resulting state as another image.\n\nUsing Docker ensures that your tools will run on the CGC no matter what format they are in, and removes the possibility of conflicts between your local development environment and the execution environment of the CGC. Since there is no need to conform to any proprietary format when uploading your tools, you can easily run them elsewhere too.\n\n<a name=\"section-the-docker-image-registry\"></a>\n## Image Registries\n\nAn **image registry** stores Docker images. Each registry is organized into collections of images, called **repositories**.\n\nAvailable registries include [the CGC Image Registry](#section-the-cgc-image-registry) and [Docker Hub](#section-docker-hub-the-docker-image-registry), Docker’s own image registry.\n\n### The CGC Image Registry\n\nDocker images uploaded to [the CGC Image Registry](doc:the-cgc-image-registry) are further organized into repositories, which correspond to [projects](doc:projects-on-the-cgc) on the CGC. Once the images are uploaded to the CGC Image Registry, you can run these tools on the CGC. Workflows will execute the tools in series inside their Docker containers.\n\n### Docker Hub - the Docker image registry\n\nDocker hosts a number of images that you can use to build your containers. These are stored in an online registry called Docker Hub, where they are also organized into repositories. Docker Hub includes repositories that are are administrated by Docker, and contain images in which commonly-used software has been installed, including operating systems. These are typically used as base images. Docker Hub also hosts user repositories, containing images created and uploaded by Docker users. You are free to use images from any Docker Hub repository in building the image you upload to the CGC image registry.\n\nYou can also execute tools on the CGC that are contained in images stored in Docker Hub. However, **storing your images in the CGC Image Registry rather than in Docker Hub will speed up processing time on the CGC**, since the tools will be executed closer to the data they are processing.","excerpt":"","slug":"docker-basics","type":"basic","title":"About Docker"}
Docker is an application that allows tools and their dependencies to be packaged into discrete runtime environments. These environments, **containers**, are built from **images** and are stored inside an **image registry**. For an overview of Docker, please see the [Docker website](https://www.docker.com/). Learn more about Docker [images](#section-images), [containers](#section-containers) and [image registries](#section-image-registries) below. ## Images A Docker **image** is a read-only file used to produce Docker containers. An image is composed of 'layers' of other images, and any change that is made to an image is carried out by adding a new layer. The dependencies of Docker layers define an ordering, and any layer that does not depend on any other layer is called a **base image**. Typically this layer will describe the operating system for the environment. Docker images can be uploaded to the [CGC Image Registry](the-cgc-image-registry), where they are referenced by repositories, which correspond to projects on the CGC. Once uploaded, you can run these tools on the CGC. Workflows will execute the tools in series, inside the containers that they are installed in. ## Containers A Docker **container** is a virtual private server. It can host software applications and their dependencies, which can be run from many diverse environments. Containers consist of an operating system, user-added files, and metadata. Containers are built from images, but feature a read-write layer on top, so, unlike images, are interactive and can store state. This means that you can run applications inside them. After any executions in your Docker container, you can save a snapshot of the resulting state as another image. Using Docker ensures that your tools will run on the CGC no matter what format they are in, and removes the possibility of conflicts between your local development environment and the execution environment of the CGC. Since there is no need to conform to any proprietary format when uploading your tools, you can easily run them elsewhere too. <a name="section-the-docker-image-registry"></a> ## Image Registries An **image registry** stores Docker images. Each registry is organized into collections of images, called **repositories**. Available registries include [the CGC Image Registry](#section-the-cgc-image-registry) and [Docker Hub](#section-docker-hub-the-docker-image-registry), Docker’s own image registry. ### The CGC Image Registry Docker images uploaded to [the CGC Image Registry](doc:the-cgc-image-registry) are further organized into repositories, which correspond to [projects](doc:projects-on-the-cgc) on the CGC. Once the images are uploaded to the CGC Image Registry, you can run these tools on the CGC. Workflows will execute the tools in series inside their Docker containers. ### Docker Hub - the Docker image registry Docker hosts a number of images that you can use to build your containers. These are stored in an online registry called Docker Hub, where they are also organized into repositories. Docker Hub includes repositories that are are administrated by Docker, and contain images in which commonly-used software has been installed, including operating systems. These are typically used as base images. Docker Hub also hosts user repositories, containing images created and uploaded by Docker users. You are free to use images from any Docker Hub repository in building the image you upload to the CGC image registry. You can also execute tools on the CGC that are contained in images stored in Docker Hub. However, **storing your images in the CGC Image Registry rather than in Docker Hub will speed up processing time on the CGC**, since the tools will be executed closer to the data they are processing.