github.com/jogo/docker@v1.7.0-rc1/docs/sources/docker-hub-enterprise/userguide.md (about) 1 page_title: Docker Hub Enterprise: User guide 2 page_description: Documentation describing basic use of Docker Hub Enterprise 3 page_keywords: docker, documentation, about, technology, hub, enterprise 4 5 6 # Docker Hub Enterprise User's Guide 7 8 This guide covers tasks and functions a user of Docker Hub Enterprise (DHE) will 9 need to know about, such as pushing or pulling images, etc. For tasks DHE 10 administrators need to accomplish, such as configuring or monitoring DHE, please 11 visit the [Administrator's Guide](./adminguide.md). 12 13 ## Overview 14 15 The primary use case for DHE users is to push and pull images to and from the 16 DHE image storage service. For example, you might pull an Official Image for 17 Ubuntu from the Docker Hub, customize it with configuration settings for your 18 infrastructure and then push it to your DHE image storage for other developers 19 to pull and use for their development environments. 20 21 Pushing and pulling images with DHE works very much like any other Docker 22 registry: you use the `docker pull` command to retrieve images and the `docker 23 push` command to add an image to a DHE repository. To learn more about Docker 24 images, see 25 [User Guide: Working with Docker Images](https://docs.docker.com/userguide/dockerimages/). For a step-by-step 26 example of the entire process, see the 27 [Quick Start: Basic Workflow Guide](./quick-start.md). 28 29 > **Note**: If your DHE instance has authentication enabled, you will need to 30 >use your command line to `docker login <dhe-hostname>` (e.g., `docker login 31 > dhe.yourdomain.com`). 32 > 33 > Failures due to unauthenticated `docker push` and `docker pull` commands will 34 > look like : 35 > 36 > $ docker pull dhe.yourdomain.com/hello-world 37 > Pulling repository dhe.yourdomain.com/hello-world 38 > FATA[0001] Error: image hello-world:latest not found 39 > 40 > $ docker push dhe.yourdomain.com/hello-world 41 > The push refers to a repository [dhe.yourdomain.com/hello-world] (len: 1) 42 > e45a5af57b00: Image push failed 43 > FATA[0001] Error pushing to registry: token auth attempt for registry 44 > https://dhe.yourdomain.com/v2/: 45 > https://dhe.yourdomain.com/auth/v2/token/?scope= 46 > repository%3Ahello-world%3Apull%2Cpush&service=dhe.yourdomain.com 47 > request failed with status: 401 Unauthorized 48 49 ## Pushing Images 50 51 You push an image up to a DHE repository by using the 52 [`docker push` command](https://docs.docker.com/reference/commandline/cli/#push). 53 54 You can add a `tag` to your image so that you can more easily identify it 55 amongst other variants and so that it refers to your DHE server. 56 57 `$ docker tag hello-world:latest dhe.yourdomain.com/yourusername/hello-mine:latest` 58 59 The command labels a `hello-world:latest` image using a new tag in the 60 `[REGISTRYHOST/][USERNAME/]NAME[:TAG]` format. The `REGISTRYHOST` in this 61 case is your DHE server, `dhe.yourdomain.com`, and the `USERNAME` is 62 `yourusername`. Lastly, the image tag is set to `hello-mine:latest`. 63 64 Once an image is tagged, you can push it to DHE with: 65 66 `$ docker push dhe.yourdomain.com/demouser/hello-mine:latest` 67 68 > **Note**: If the Docker daemon on which you are running `docker push` doesn't 69 > have the right certificates set up, you will get an error similar to: 70 > 71 > $ docker push dhe.yourdomain.com/demouser/hello-world 72 > FATA[0000] Error response from daemon: v1 ping attempt failed with error: 73 > Get https://dhe.yourdomain.com/v1/_ping: x509: certificate signed by 74 > unknown authority. If this private registry supports only HTTP or HTTPS 75 > with an unknown CA certificate, please add `--insecure-registry 76 > dhe.yourdomain.com` to the daemon's arguments. In the case of HTTPS, if 77 > you have access to the registry's CA certificate, no need for the flag; 78 > simply place the CA certificate at 79 > /etc/docker/certs.d/dhe.yourdomain.com/ca.crt 80 81 ## Pulling images 82 83 You can retrieve an image with the 84 [`docker pull` command](https://docs.docker.com/reference/commandline/cli/#run), 85 or you can retrieve an image and run Docker to build the container with the 86 [`docker run`command](https://docs.docker.com/reference/commandline/cli/#run). 87 88 To retrieve an image from DHE and then run Docker to build the container, add 89 the needed info to `docker run`: 90 91 $ docker run dhe.yourdomain.com/yourusername/hello-mine 92 latest: Pulling from dhe.yourdomain.com/yourusername/hello-mine 93 511136ea3c5a: Pull complete 94 31cbccb51277: Pull complete 95 e45a5af57b00: Already exists 96 Digest: sha256:45f0de377f861694517a1440c74aa32eecc3295ea803261d62f950b1b757bed1 97 Status: Downloaded newer image for dhe.yourdomain.com/demouser/hello-mine:latest 98 99 Note that if you don't specify a version, by default the `latest` version of an 100 image will be pulled. 101 102 If you run `docker images` after this you'll see a `hello-mine` image. 103 104 $ docker images 105 REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE 106 dhe.yourdomain.com/yourusername/hello-mine latest e45a5af57b00 3 months ago 910 B 107 108 To pull an image without building the container, use `docker pull` and specify 109 your DHE registry by adding it to the command: 110 111 $ docker pull dhe.yourdomain.com/yourusername/hello-mine 112 113 114 ## Next Steps 115 116 For information on administering DHE, take a look at the 117 [Administrator's Guide](./adminguide.md). 118 119 120 <!--TODO: 121 122 * mention that image aliases that are not in the same repository are not updated - either on push or pull 123 * but that multiple tags in one repo are pushed if you don't specify the `:tag` (ie, `imagename` does not always mean `imagename:latest`) 124 * show what happens for non-latest, and when there are more than one tag in a repo 125 * explain the fully-qualified repo/image name 126 * explain how to remove an image from DHE -->