Working with images in private registries
In order to use use an image from a private registry, you need to authenticate with the registry. This can be done by creating a personal access token (PAT) and using it to authenticate with the registry.
Creating a PAT for DockerHub
- Go to DockerHub and log in.
- Select Personal Access Tokens.
- Click on
Generate new token
. - Select the access permission
Read-only
for the token.
Creating a PAT for GitHub Container Registry
- Create a PAT on GitHub with
read:packages
scope.
Using the PAT to authenticate with the registry
CLI
Pass the PAT to the registry using the --registry-pat
flag.
q8sctl execute \
--registry-pat PAT \
--kubeconfig path-to-kubeconfig \
--image image-name \
program.py
Jupyter
Pass the PAT as an environment variable REGISTRY_PAT
.
REGISTRY_PAT=PAT jupyter lab