{"__v":16,"_id":"5637e6fe97666c0d008656b6","category":{"__v":8,"_id":"55faf958d0e22017005b8274","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":13,"slug":"bring-your-tools","title":"BRING YOUR TOOLS"},"parentDoc":null,"project":"55faf11ba62ba1170021a9a7","user":"554340dfb7f4540d00fcef1d","version":{"__v":37,"_id":"55faf11ba62ba1170021a9aa","project":"55faf11ba62ba1170021a9a7","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"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-02T22:43:10.759Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"##Images and Containers\n\nRabix uses [Docker](https://www.docker.com/) to distribute tools for use on the CGC. Docker is a tool that allows applications and their dependencies to be packaged into discrete runtime environments, called **containers**.\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.\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###Images:\n\nDocker **images** are read-only files, which are used to produce containers. They are 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.\n\nDocker 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.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Overview to Docker\",\n  \"body\": \"For an overview of Docker, please see the [Docker user guide](https://docs.docker.com/userguide/).\"\n}\n[/block]\nDocker images can be uploaded to the [CGC Image Registry](doc: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##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](doc: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":"Docker basics"}
##Images and Containers Rabix uses [Docker](https://www.docker.com/) to distribute tools for use on the CGC. Docker is a tool that allows applications and their dependencies to be packaged into discrete runtime environments, called **containers**. ###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. 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. ###Images: Docker **images** are read-only files, which are used to produce containers. They are 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 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. [block:callout] { "type": "info", "title": "Overview to Docker", "body": "For an overview of Docker, please see the [Docker user guide](https://docs.docker.com/userguide/)." } [/block] Docker images can be uploaded to the [CGC Image Registry](doc: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. ##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](doc: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.