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 hakuna CLI;
  • You need to provide access credentials for those registries;
  • Currently the following platform are supported: DockerHub, Amazon ECR;

HakunaCloud 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:

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

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

hakuna 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:


and here an example:

hakuna registry add -u 123456789 -p abcdefg -s 123456789012.dkr.ecr.us-west-1.amazonaws.com

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

hakuna registry ls

Remove a registry

hakuna registry rm <server> 

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