Push images from your computer into a registry project, and pull them onto any machine that runs
Docker. The registry address is registry.e2enetworks.net. The portal gives you each command with
the address and your project’s name filled in, so copy them from there. Each image you push is an
artifact in its repository: one exact image, named by its digest, with any tags you gave it.
Before you begin
Section titled “Before you begin”You need:
- Docker installed on the machine you push from or pull to.
- A registry project that reads Created. See Create a registry project.
- An access token for the project, and its Token Name and Token Value. To push, the token needs Push checked; a token with only Pull suits machines that only pull. See Create an access token.
- A network that lets the machine reach both
registry.e2enetworks.netandobjectstore.e2enetworks.netover HTTPS. Docker talks to the registry, and the image layers download from the second address.
Find the commands for your project
Section titled “Find the commands for your project”In MyAccount, under Storage, click Container Registry, and click your project. On its Repositories tab, click Push Commands. Docker Push Command opens with three commands:
- Docker Login Command logs Docker in to the registry with an access token.
- Tag an image for this project: names a local image with the project’s address.
- Push an image to this project: sends the image to the project.
On this page, <project-name> stands for your project’s name.
Log in
Section titled “Log in”Copy the Docker Login Command. Replace the token name placeholder with the token’s Token Name and the token value placeholder with its Token Value, 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 prints Login Succeeded. With -p, it first warns
that a password on the command line is insecure; --password-stdin avoids that.
Log in once on each machine; Docker keeps the login. If it returns unauthorized, see Troubleshooting Container Registry.
Tag and push an image
Section titled “Tag and push an image”-
List the images on your computer, and note the name and tag of the one to push:
docker images -
Copy the Tag an image for this project: command. Replace the source image and its tag with the image’s name and tag, and the repository and its tag with the name to keep it under in your project, such as
web:1.0, and run it:docker tag SOURCE_IMAGE[:TAG] registry.e2enetworks.net/<project-name>/REPOSITORY[:TAG] -
Copy the Push an image to this project: 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 your local image web:1.0 to the project cr-12345:
docker tag web:1.0 registry.e2enetworks.net/cr-12345/web:1.0docker push registry.e2enetworks.net/cr-12345/web:1.0When the push finishes, Docker prints the tag with the image’s digest. The image appears on the
project’s Repositories tab, in the repository you named. The first push to a new repository name
creates that repository. Every image path has the project’s name right after the registry address,
as in registry.e2enetworks.net/cr-12345/web:1.0. If the push fails with unauthorized to access repository, see
Troubleshooting Container Registry.
Pull an image
Section titled “Pull an image”Log in on the machine you pull to, as in Log in. Then pull the image in either of two ways.
To pull by the tag you pushed it with, run:
docker pull registry.e2enetworks.net/<project-name>/<repository>:<tag><repository> and <tag> are the name and tag you pushed the image with, such as web and 1.0.
To pull one exact artifact, whatever its tags point to later, pull it by its digest:
-
On the project’s Repositories tab, click the repository’s name. Its page opens on the Info tab.
-
The Info tab lists the repository’s artifacts with their Tags, Pull Command, Size in MB, Push Time, and Vulnerabilities. To find an artifact, search for its tag.
-
Copy the artifact’s Pull Command, and run it:
docker pull registry.e2enetworks.net/<project-name>/<repository>@<digest><digest>is the artifact’s digest, already filled in for you.
When the pull finishes, docker images lists the image.
(Optional) See who pushed and pulled
Section titled “(Optional) See who pushed and pulled”On the repository’s page, open the Logs tab. The tab records Docker pushes and pulls by the
project’s current access tokens, one row each, with Username, Resource, Resource Type,
Operation, and Timestamp. A push reads create under Operation and a pull reads pull,
with the token’s Token Name under Username. The tab shows the first 100 entries the registry
returns for the whole project.
You can now push and pull images with Docker. To run them on Kubernetes, see Pull images from a Kubernetes pod. For errors, see Troubleshooting Container Registry.