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
Section titled “Create a registry project”- In MyAccount, under Storage, click Container Registry. With no registry project yet, the page opens on a form headed Create your Private Container Registry.
- 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. - 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.
- 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
Section titled “Create an access token”Docker logs in to your registry project with an access token.
- In the project list, click your project. Its tabs open.
- On the Access token tab, click + (Create New Token). Create Access Token opens.
- 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. - Under Expiration, choose Set number of days and keep the 1000 days in Number of days.
- Under Permissions:, check Push so the token can push as well as pull. Pull is always checked.
- 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
Section titled “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.
-
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:
docker login registry.e2enetworks.net -u <token_name> -p <token_value>In a script or CI job, pass the value on standard input:
echo "$REGISTRY_TOKEN" | docker login registry.e2enetworks.net -u <token-name> --password-stdinHere REGISTRY_TOKEN is a secret variable in your CI system that holds the Token Value, and
<token-name>is the Token Name. Docker printsLogin Succeeded. With-p, it first warns that a password on the command line is insecure;--password-stdinavoids that. -
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 imageslists it, and the repository and its tag with the name to keep the image under in your project, such asweb:1.0.<project-name>is your project’s name, already filled in by the portal:docker tag SOURCE_IMAGE[:TAG] registry.e2enetworks.net/<project-name>/REPOSITORY[:TAG] -
Copy the push command, fill in the same repository and tag, and run it:
docker push registry.e2enetworks.net/<project-name>/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:
docker tag hello-world:latest registry.e2enetworks.net/cr-12345/hello-world:latestdocker push registry.e2enetworks.net/cr-12345/hello-world:latestWhen 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.
What to do next
Section titled “What to do next”- Push and pull images: pull your image onto another machine with its Pull Command.
- 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: check your images for known vulnerabilities.
- Pull images from a Kubernetes pod: run your image on a cluster.