--- title: "Get started with Container Registry" description: "Create a Container Registry project in MyAccount, create an access token for it, and push your first Docker image." content_type: "get-started" product: "container-registry" platform: "MyAccount" url: "/myaccount/container-registry/get-started/" --- # Get started with Container Registry Create a registry project and push your first Docker image to it. You need Docker installed on your computer and an image to push. If you have no image yet, pull a small public one with `docker pull hello-world`, and push `hello-world:latest`. Your computer must reach both `registry.e2enetworks.net` and `objectstore.e2enetworks.net` over HTTPS. Container Registry is available in Delhi. Before you start, choose Delhi as the region in MyAccount, and select the MyAccount project you want the registry project in: each registry project belongs to the MyAccount project that was selected when it was created. ## Create a registry project 1. In MyAccount, under **Storage**, click **Container Registry**. With no registry project yet, the page opens on a form headed **Create your Private Container Registry**. 2. **Project Name** starts with a random name such as `cr-12345`. Keep it, or replace it with your own. A name is 2 to 50 characters long, starts with a lowercase letter, and uses lowercase letters and numbers, with single dots, underscores, or hyphens only between other characters. Choose a name that no registry project uses yet, in your account or in any other. The name is fixed once the project is created. 3. Leave **Prevent vulnerable images from running.** clear for now. It stops Docker from pulling images with vulnerabilities at or above a severity you choose, and you can turn it on later on the project's **Configuration** tab. 4. Click **Create Project**. The form shows **Container Registry Setup In Progress**, and your project reads **Creating** in the project list. The list refreshes itself every five seconds until the project reads **Created**. ## Create an access token Docker logs in to your registry project with an access token. 1. In the project list, click your project. Its tabs open. 2. On the **Access token** tab, click **+** (**Create New Token**). **Create Access Token** opens. 3. In **Name**, enter a name for the token, such as `laptop`. A token name starts with a lowercase letter, is at least 2 characters long, and uses lowercase letters, numbers, dots, underscores, and hyphens, with a dot, underscore, or hyphen only between other characters and never two together. 4. Under **Expiration**, choose **Set number of days** and keep the 1000 days in **Number of days**. 5. Under **Permissions:**, check **Push** so the token can push as well as pull. **Pull** is always checked. 6. Click **Create**. The **Access Token** dialog shows the **Token Name** and the **Token Value**. The **Token Name** is `e2e` followed by your project's name, `+`, and your token name: for `cr-12345` and `laptop`, it is `e2ecr-12345+laptop`. Copy both and keep them somewhere safe: the value is shown only this once. ## Push an image On the project's **Repositories** tab, click **Push Commands**. **Docker Push Command** opens with three commands made for your project: **Docker Login Command**, **Tag an image for this project:**, and **Push an image to this project:**. Copy each one from there, because each one already holds the registry address, `registry.e2enetworks.net`, and your project's name. 1. Copy the **Docker Login Command**. Replace the token name placeholder with the **Token Name** and the token value placeholder with the **Token Value** you copied, and run it: ```bash docker login registry.e2enetworks.net -u -p ``` In a script or CI job, pass the value on standard input: ```bash echo "$REGISTRY_TOKEN" | docker login registry.e2enetworks.net -u --password-stdin ``` Here REGISTRY_TOKEN is a secret variable in your CI system that holds the **Token Value**, and `` is the **Token Name**. Docker prints `Login Succeeded`. With `-p`, it first warns that a password on the command line is insecure; `--password-stdin` avoids that. 2. Copy the tag command and run it with your own names. Replace the source image and its tag with an image on your computer, as `docker images` lists it, and the repository and its tag with the name to keep the image under in your project, such as `web:1.0`. `` is your project's name, already filled in by the portal: ```bash docker tag SOURCE_IMAGE[:TAG] registry.e2enetworks.net//REPOSITORY[:TAG] ``` 3. Copy the push command, fill in the same repository and tag, and run it: ```bash docker push registry.e2enetworks.net//REPOSITORY[:TAG] ``` `[:TAG]` means the tag is optional; without one, Docker uses `latest`. Leave out the square brackets. For example, to push `hello-world:latest` to the project `cr-12345`: ```bash docker tag hello-world:latest registry.e2enetworks.net/cr-12345/hello-world:latest docker push registry.e2enetworks.net/cr-12345/hello-world:latest ``` When the push finishes, Docker prints the tag with the image's digest. On the project's **Repositories** tab, your repository is listed; click its name to see the image, its tag, and its **Pull Command**. Your first image is in your registry project. If `docker login` returns unauthorized, see [Troubleshooting Container Registry](/myaccount/container-registry/troubleshooting/container-registry/#docker-login-returns-unauthorized). ## What to do next - [Push and pull images](/myaccount/container-registry/how-to/push-and-pull-images/): pull your image onto another machine with its **Pull Command**. - [Create an access token](/myaccount/container-registry/how-to/create-an-access-token/): give each system its own token, and a pull-only token to anything that only runs images. - [Scan a project, repository, or artifact](/myaccount/container-registry/how-to/scan-a-project-repository-or-artifact/): check your images for known vulnerabilities. - [Pull images from a Kubernetes pod](/myaccount/container-registry/how-to/pull-images-from-a-kubernetes-pod/): run your image on a cluster.