Launch container images from private repositories
To deploy applications using private container images on levv cloud, you need to authenticate your private repository credentials and upload them to levv. Below is a step-by-step guide on how to achieve this.
1. Obtain your credentials in JSON format
Ensure your repository credentials are stored in a JSON file. Most container registries, such as Docker Hub, GitHub, and GitLab, allow you to download or generate these credentials.
Once logged in using the docker CLI, view the config.json file:
The output contains a section similar to this:
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "c3R...zE2"
},
"ghcr.io": {
"auth": "c3R...zE2"
},
"registry.gitlab.com": {
"auth": "c3R...zE2"
}
}
}
2. Upload credentials to levv cloud
Once you have your credentials, use the following command to upload the .json file to levv cloud:
This example uploads your Docker Hub credentials stored in your home folder. Replace the path with the location of your credentials file for other registries.
3. Modify Your Compose File
Update your compose file to specify the private image. Here’s an example:
Make sure to replace your-privaterepo/yourapp:tag with your actual private image repository and tag.
4. Deploy Your Application
After updating your compose file, deploy your application with:
This command will pull the private image using the credentials you provided and launch your application on levv cloud.
For more information, refer to your specific container registry's documentation on managing and downloading credentials.
Credentials scope
The credentials that you store on levv cloud are project-scoped. When you launch services that use container images from private repositories, make sure that the credentials are also available within that project.
Check our documentation on projects to learn more about it.
Check the full reference on levv auth cir command.