Create a registry, push an image to it, and pull the same image back.
Before you begin
Section titled “Before you begin”- A TIR project, and a role that lets you create a registry.
- Docker installed on your machine, with an image you want to store.
Create a registry
Section titled “Create a registry”- In TIR, open your project. In the side menu, under Storage, select Container Registry.
- Select Create E2E Registry.
- In Namespace, type a name for the registry. It is part of every image address.
- In Username Prefix, type a prefix. TIR makes the registry’s username from it.
- Select Create.
For the naming rules, see Create a registry.
Log in with Docker
Section titled “Log in with Docker”In the registry’s row, select the button under Commands. Docker Commands gives your login command, with the registry’s username and password filled in. Run it:
docker login <endpoint> -u <username> -p <password><endpoint>is the registry address:registry.e2enetworks.netin Delhi andin-south1-registry.e2enetworks.netin Chennai.<username>and<password>are the registry’s own, as Docker Commands gives them.
Log in once per session, before your first push or pull.
Push an image
Section titled “Push an image”# 1. List local images to find the one you want to pushdocker images
# 2. Tag the image for your registrydocker tag <image>:<tag> <endpoint>/<namespace>/<image>:<tag>
# 3. Push the tagged imagedocker push <endpoint>/<namespace>/<image>:<tag>For example:
docker tag my-app:v1.0 registry.e2enetworks.net/my-namespace/my-app:v1.0docker push registry.e2enetworks.net/my-namespace/my-app:v1.0The image now shows on the registry’s Images tab.
Pull an image
Section titled “Pull an image”Pull the image back on any machine where you are logged in:
docker pull <endpoint>/<namespace>/<image>:<tag>Command summary
Section titled “Command summary”| Action | Command |
|---|---|
| Login | docker login <endpoint> -u <username> -p <password> |
| Tag | docker tag <image>:<tag> <endpoint>/<namespace>/<image>:<tag> |
| Push | docker push <endpoint>/<namespace>/<image>:<tag> |
| Pull | docker pull <endpoint>/<namespace>/<image>:<tag> |
Use the image
Section titled “Use the image”- Create an Instance from your own image to run the image you pushed.
- See the images in a registry.
- Delete a tag to remove an old version of an image.