{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[]},"params":[]},"next":{"description":"","pages":[]},"title":"Core Docker commands","type":"basic","slug":"core-docker-commands","excerpt":"","body":"This section contains core Docker commands for running containers and pushing images to the Cavatica image registry.\n\n### Make sure Docker is running\n\n* **Mac OS 10.10.3 Yosemite or newer**: run Docker Desktop for Mac and start a terminal of your choice.\n* **Mac OS 10.8 Mountain Lion or newer**: run Docker Quickstart terminal to start Docker Machine.\n* **Windows 10**: run Docker Desktop for Windows and start a terminal of your choice.\n* **Windows 7** or **8**: run Docker Quickstart Terminal to start Docker Machine. \n* **Linux**: no action required.\n\n\n*Note: Scroll the table horizontally to see the entire content.* \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Command\",\n    \"h-1\": \"Effect\",\n    \"0-0\": \"`$ docker login pgc-images.sbgenomics.com`\",\n    \"0-1\": \"This returns a prompt for your Cavatica credentials, and then, if satisfied, gives you access to the Cavatica registry. Don't forget to add `pgc-images.sbgenomics.com` to this command, or else the utility will attempt to log you in to the Docker Hub registry.\\n\\n<span style=\\\"color:red\\\"><b>You should enter [your authentication token](doc:get-your-authentication-token) in response to the password prompt, not your Cavatica password. </b></span>\",\n    \"1-0\": \"`$ docker run -ti <image>`\",\n    \"1-1\": \"This runs a Docker container on your local machine. `<image>` can be any image in [Docker](https://hub.docker.com/account/signup/) Hub or the Cavatica image registry that you have uploaded or have permission to access. The `-ti` flag makes the container run, interactively.\\n\\nIf you are opening an image from Docker Hub, specify `<image> ` using `<docker_repository>[:tag]`, e.g.` ubuntu`.\\nIf you are opening an image from the Cavatica registry, `<image>` should be specified using the format `pgc-images.sbgenomics.com/<username>/<repository_name>/[:tag]`, e.g `pgc-images.sbgenomics.com/rfranklin/samtools:v1`.\",\n    \"2-0\": \"`$ docker ps -a`\",\n    \"3-0\": \"`docker commit <container ID> pgc-images.sbgenomics.com/<username>/<repository_name>[:tag]`\",\n    \"2-1\": \"This lists all your Docker containers.\",\n    \"3-1\": \"This takes an image (snapshot) of the container with ID `<container ID>`, and names the image with the format recognised by the Cavatica registry.\\nYou can find the `container ID` of an image using `docker ps -a`.\",\n    \"4-0\": \"`$ docker images`\",\n    \"4-1\": \"This lists all your local Docker images.\",\n    \"5-0\": \"`$ docker tag <image> pgc-images.sbgenomics.com/<username>/<repository_name>[:tag]`\",\n    \"5-1\": \"This tags the image with a reference to\\n[the Cavatica registry](doc:the-image-registry).\",\n    \"6-0\": \"`$ docker push pgc-images.sbgenomics.com/<username>/<repository_name>[:tag]`\",\n    \"6-1\": \"This uploads your Docker image to [the Cavatica registry](doc:the-image-registry), so that the tool in it can be used on Cavatica.\",\n    \"7-0\": \"`$ docker rmi pgc-images.sbgenomics.com/<username>/<repository_name>[:tag]`\",\n    \"7-1\": \"This removes the specified Docker image from your local machine\",\n    \"8-0\": \"`$ docker pull pgc-images.sbgenomics.com/<username>/<repository_name>[:tag]`\",\n    \"8-1\": \"This downloads the specified image from [the Cavatica registry](doc:the-image-registry).\",\n    \"9-0\": \"`$ docker logout pgc-images.sbgenomics.com`\",\n    \"9-1\": \"This stops your connection to the Cavatica image registry.\"\n  },\n  \"cols\": 2,\n  \"rows\": 10\n}\n[/block]","updates":[],"order":5,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5eaffaaae4d16801b0344ae1","createdAt":"2020-05-04T11:21:14.013Z","user":"5767bc73bb15f40e00a28777","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Docker","slug":"docker","order":7,"from_sync":false,"reference":false,"_id":"5eaff69e844d67003642a020","createdAt":"2020-05-04T11:03:58.395Z","version":"5773dcfc255e820e00e1cd50","project":"5773dcfc255e820e00e1cd4d","__v":0},"version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5773dcfc255e820e00e1cd51","5773df36904b0c0e00ef05ff","577baf92451b1e0e006075ac","577bb183b7ee4a0e007c4e8d","577ce77a1cf3cb0e0048e5ea","577d11865fd4de0e00cc3dab","578e62792c3c790e00937597","578f4fd98335ca0e006d5c84","578f5e5c3d04570e00976ebb","57bc35f7531e000e0075d118","57f801b3760f3a1700219ebb","5804d55d1642890f00803623","581c8d55c0dc651900aa9350","589dcf8ba8c63b3b00c3704f","594cebadd8a2f7001b0b53b2","59a562f46a5d8c00238e309a","5a2aa096e25025003c582b58","5a2e79566c771d003ca0acd4","5a3a5166142db90026f24007","5a3a52b5bcc254001c4bf152","5a3a574a2be213002675c6d2","5a3a66bb2be213002675cb73","5a3a6e4854faf60030b63159","5c8a68278e883901341de571","5cb9971e57bf020024523c7b","5cbf1683e2a36d01d5012ecd","5dc15666a4f788004c5fd7d7","5eaff69e844d67003642a020","5eb00899b36ba5002d35b0c1","5eb0172be179b70073dc936e","5eb01b42b36ba5002d35ebba","5eb01f202654a20136813093","5eb918ef149186021c9a76c8"],"_id":"5773dcfc255e820e00e1cd50","__v":33,"createdAt":"2016-06-29T14:36:44.812Z","releaseDate":"2016-06-29T14:36:44.812Z","project":"5773dcfc255e820e00e1cd4d"},"project":"5773dcfc255e820e00e1cd4d","__v":0,"parentDoc":null}

Core Docker commands


This section contains core Docker commands for running containers and pushing images to the Cavatica image registry. ### Make sure Docker is running * **Mac OS 10.10.3 Yosemite or newer**: run Docker Desktop for Mac and start a terminal of your choice. * **Mac OS 10.8 Mountain Lion or newer**: run Docker Quickstart terminal to start Docker Machine. * **Windows 10**: run Docker Desktop for Windows and start a terminal of your choice. * **Windows 7** or **8**: run Docker Quickstart Terminal to start Docker Machine. * **Linux**: no action required. *Note: Scroll the table horizontally to see the entire content.* [block:parameters] { "data": { "h-0": "Command", "h-1": "Effect", "0-0": "`$ docker login pgc-images.sbgenomics.com`", "0-1": "This returns a prompt for your Cavatica credentials, and then, if satisfied, gives you access to the Cavatica registry. Don't forget to add `pgc-images.sbgenomics.com` to this command, or else the utility will attempt to log you in to the Docker Hub registry.\n\n<span style=\"color:red\"><b>You should enter [your authentication token](doc:get-your-authentication-token) in response to the password prompt, not your Cavatica password. </b></span>", "1-0": "`$ docker run -ti <image>`", "1-1": "This runs a Docker container on your local machine. `<image>` can be any image in [Docker](https://hub.docker.com/account/signup/) Hub or the Cavatica image registry that you have uploaded or have permission to access. The `-ti` flag makes the container run, interactively.\n\nIf you are opening an image from Docker Hub, specify `<image> ` using `<docker_repository>[:tag]`, e.g.` ubuntu`.\nIf you are opening an image from the Cavatica registry, `<image>` should be specified using the format `pgc-images.sbgenomics.com/<username>/<repository_name>/[:tag]`, e.g `pgc-images.sbgenomics.com/rfranklin/samtools:v1`.", "2-0": "`$ docker ps -a`", "3-0": "`docker commit <container ID> pgc-images.sbgenomics.com/<username>/<repository_name>[:tag]`", "2-1": "This lists all your Docker containers.", "3-1": "This takes an image (snapshot) of the container with ID `<container ID>`, and names the image with the format recognised by the Cavatica registry.\nYou can find the `container ID` of an image using `docker ps -a`.", "4-0": "`$ docker images`", "4-1": "This lists all your local Docker images.", "5-0": "`$ docker tag <image> pgc-images.sbgenomics.com/<username>/<repository_name>[:tag]`", "5-1": "This tags the image with a reference to\n[the Cavatica registry](doc:the-image-registry).", "6-0": "`$ docker push pgc-images.sbgenomics.com/<username>/<repository_name>[:tag]`", "6-1": "This uploads your Docker image to [the Cavatica registry](doc:the-image-registry), so that the tool in it can be used on Cavatica.", "7-0": "`$ docker rmi pgc-images.sbgenomics.com/<username>/<repository_name>[:tag]`", "7-1": "This removes the specified Docker image from your local machine", "8-0": "`$ docker pull pgc-images.sbgenomics.com/<username>/<repository_name>[:tag]`", "8-1": "This downloads the specified image from [the Cavatica registry](doc:the-image-registry).", "9-0": "`$ docker logout pgc-images.sbgenomics.com`", "9-1": "This stops your connection to the Cavatica image registry." }, "cols": 2, "rows": 10 } [/block]