Delivering Enhanced OCI Compatibility, Customizable Workflows, and Strengthened SecuritySylabs, a global leader in providing tools and services for performance-intensive container technology, today announces the release of SingularityCE 4.1.0, the newest iteration of...
OverviewSingularity Enterprise comes with a fully compliant Open Container Initiative (OCI) registry. The following is a collection of typical registry operations within your workflow. Assuming the Singularity Enterprise registry address is registry.sylabs.io, please substitute with the appropriate address available in your environment.
LoginBefore performing any of the following operations, you will need to authenticate and authorize yourself with the container registry. This involves providing credentials — such as your username and password or an access token — to ensure you have the necessary permissions. Assuming you already have your token registered using the
singularity remote login command, start your Docker operations by authenticating with the following command:
singularity remote get-login-password | \
docker login -u USERNAME --password-stdin registry.sylabs.io
TagTagging involves giving a specific version or name to a container image. This is useful for version control and ensuring that specific versions of your application are used. Assuming you already have an image on your Docker daemon, you can tag it in preparation to push with the following command:
docker tag example registry.sylabs.io/USERNAME/example:v1.0
PushPushing an image to a container registry involves uploading a locally built container image to the registry so it can be stored and accessed by others. This is often done using a command like:
docker push registry.sylabs.io/USERNAME/example:v1.0
PullPulling an image from a container registry is the process of downloading an image from the registry to run it locally or on a remote server. This is typically done using a command like:
docker pull registry.sylabs.io/USERNAME/example:v1.0
Using SkopeoSkopeo is a command-line tool for copying container images between different container registries. It can be used to pull, push, inspect, and delete container images from and to OCI-compliant registries. It is particularly useful for automation and scripting.
LoginSimilar to Docker command, Skopeo can accept the login argument and authenticate:
singularity remote get-login-password | \
skopeo login -u USERNAME --password-stdin registry.sylabs.io
Copy RemotelyThis operation can copy from a remote location to your Singularity Enterprise registry. The following example will copy over Docker Hub to Singularity Enterprise registry.
skopeo copy docker://alpine:latest\ docker://registry.sylabs.io/USERNAME/alpine/alpine:latest
DeleteRemoving images from a container registry is important for cleaning up outdated or unnecessary images. Docker command does not provide a command for this, but with Skopeo it is possible to remove an image from the registry, like so:
skopeo delete docker://registry.sylabs.io/USERNAME/alpine/alpine:latest
ConclusionUnderstanding and mastering the basic operations with OCI registries is fundamental for anyone working with containerization and container orchestration technologies. Whether you are pushing, pulling, tagging, or managing access control, these operations are the building blocks of efficient container image management. With the right tools and practices you can streamline your development and deployment workflows, ensuring that your container images are readily available within OCI-compliant registries.
Join Our Mailing List
Program Aims to Empower Next Generation of Container Technology ExpertsSylabs, a global leader in providing tools and services for performance-intensive container technology, today announces the comprehensive "Singularity Containers 101" curriculum. Using the...
Sylabs Unveils 2024 Predictions for Advanced Container Technologies: Embracing Performance, AI, and Security
Sylabs has released its predictions for the industry’s landscape in 2024. The company forecasts significant advancements in key areas such as performance portability, artificial intelligence (AI) and AIOps workload management, adherence to FAIR principles,...