fbpixel

Registries

Registries are the places where docker retrieves the images used to run containers. By default docker interacts with DockerHub’s public registry instance.

  • You can manage private registries using the BeeKube CLI;
  • You need to provide access credentials for those registries;
  • Currently the following platform are supported: DockerHub, Amazon ECR;

Beekube detects automatically if it’s required to login into a private registry to run the specified container.

Add And Manage Registries

Save registry credentials

That’s the command to add a Docker Hub private registry:

beekube registry add -u <username> -p <password>

This command instead will store credentials for an ECR private registry:

beekube registry add -u <AWS_ACCESS_KEY_ID> -p <AWS_SECRET_ACCESS_KEY> -s <server>

The additional <server> parameter must be the registry URI. You can find the URI on ECR’s repositories list (the main ECR page), here it’s shown the structure:

<account_id>.dkr.ecr.<region>.amazonaws.com/<namespace>/<repo-name>

and here an example:

beekube registry add -u 123456789 -p abcdefg -s 123456789012.dkr.ecr.us-west-1.amazonaws.com/hakunacloud/jenkins

Make sure that the provided access_key_id and secret_access_key reference an account with (at least) the following IAM permissions:

  • ecr:GetDownloadUrlForLayer
  • ecr:BatchGetImage
  • ecr:BatchCheckLayerAvailability

To learn more, check out official AWS documentation to manage IAM permissions and a see some examples.

List registries

beekube registry ls

Remove a registry

beekube registry rm <server> 

Keep in mind that to remove Docker Hub’s registry, the <server> parameter is simply dockerhub.