To create a registry in the control panel:
To create a registry using the command-line:
registry create command to create your registry:
doctl registry create <my-registry-name>
To push a Docker image to your registry:
registry login command to authenticate Docker with your registry:
doctl registry login
docker tag command to tag your image with the fully qualified destination path:
docker tag <my-image> registry.digitalocean.com/<my-registry>/<my-image>
docker push command to upload your image:
docker push registry.digitalocean.com/<my-registry>/<my-image>
If you push a new image using an existing tag, the tag gets updated but the old image is still accessible by its digest and takes up space in your registry. To reduce your storage usage, you can delete the untagged images and then run garbage collection.
Because image manifests are cached in different regions, there may be a maximum delay of one hour between pushing to a tag that already exists in your registry and being able to pull the new image by tag. This may happen, for example, when using the
:latest tag. To avoid the delay, use:
To create containers from the images stored in your registry from the control panel:
The default service account in each of those namespaces is updated to include the secret in its image pull secret.
When updating the source image tag, a new deployment will be triggered. If the actual tag name has not changed, it is not guaranteed to pull down a fresh copy of the image due to caching. The recommended approach is to use unique tag names for all image updates.
To view or delete images in your registry:
If you have a live registry and you have pushed images to your registry, they will be listed.
Click the plus (+) sign next to each image to see tagged image versions
Click More next to the tagged image version and select Delete. In the Delete tag dialog box:
Deleting an image by its tag or manifest does not delete the image layers. If you delete the image manifest manually, you can subsequently run garbage collection to delete the image layers and free up space in your registry. Additionally, you can delete all untagged manifests when running a garbage collection. For more information, see Clean Up Container Registry.
Use the checkboxes to delete multiple image versions in bulk.
To delete your registry using the control panel:
To delete your registry on the command-line, use the
registry delete command:
doctl registry delete