Kontena Cloud Image Registry

Kontena Cloud Image Registry provides a zero-maintenance, secure and ready-to-go solution for storing Docker images.

Using Kontena Cloud Image Registry

Prerequisites

  • Kontena Cloud account
  • Kontena CLI with the cloud plugin. If you don't have the plugin installed, you can install (or upgrade) it with the: kontena plugin install cloud command.

Using with Docker CLI

Login with Docker CLI

Automated way
$ kontena cloud image-repository login-docker

Creates a permanent Kontena Cloud OAuth2 token and runs docker login -u <YOUR_USERNAME> images.kontena.io with generated token as the password.

Manual way
  • Create a permanent Kontena Cloud OAuth2 token:

    $ kontena cloud token create <NAME>
    
  • Login with Docker CLI using your Kontena Cloud username and permanent token from the previous step as the password:

    $ docker login -u <USERNAME> images.kontena.io
    

Build & Push an image with Docker CLI

Build:

$ docker build -t images.kontena.io/<ORG>/<REPO>:<TAG> .

Push:

$ docker push images.kontena.io/<ORG>/<REPO>:<TAG>

Pull an image with Docker CLI

$ docker pull images.kontena.io/<ORG>/<REPO>:<TAG>

List image repositories

$ kontena cloud image-repository list --org <ORG>

Create a repository

$ kontena cloud image-repository create --org <ORG> <REPOSITORY>

It's also possible to create a repository by just pushing a tag to a new repository:

$ docker push images.kontena.io/<ORG>/<REPOSITORY>:<TAG>

Show a repository details

$ kontena cloud image-repository show <REPOSITORY>

Remove a repository

$ kontena cloud image-repository remove <REPOSITORY>

List a repository tags

$ kontena cloud image-repository tag list <REPOSITORY>

Using repositories with Kontena Platform

Using with Kontena Stacks

Kontena Stack service image should point to the Kontena Cloud Image Registry endpoint. Image URI format is:

images.kontena.io/<ORGANIZATION>/<REPOSITORY>:<TAG>

Example:

services:
  hello:
    image: images.kontena.io/acme/hello:1.0

Configures a stack to fetch an image from the acme organization, hello repository with a tag 1.0.

Note: you need to add image registry configuration to make this work with Kontena Platform

Add Image Registry configuration

  • Create a permanent Kontena Cloud OAuth2 token:

    $ kontena cloud token create <NAME>
    
  • Add external registry configuration

    $ kontena external-registry add --username <USERNAME> --email <EMAIL> --password <TOKEN> images.kontena.io
    
    • USERNAME - your Kontena Cloud username
    • EMAIL - your Kontena Cloud email
    • TOKEN - Kontena Cloud permanent token from previous step

List image registry configurations

$ kontena external-registry list

Remove an image registry configuration

$ kontena external-registry remove <NAME>

results matching ""

    No results matching ""