Installing Skopeo
Before you begin, ensure that Skopeo is installed on your system. If it’s not already installed, you can set it up using YUM. This command installs Skopeo along with all its necessary dependencies:For other package managers and installation options, refer to the official Skopeo documentation.
Inspecting Container Repositories
Skopeo allows you to examine remote container repositories without using local disk space. Theskopeo inspect command retrieves a JSON output containing various details such as repository tags, creation date, Docker version, and system architecture.
For example, to inspect a Fedora image hosted on the Fedora registry, run:
Inspecting Container Configurations
Beyond repository details, Skopeo can also inspect the configuration of a container image. By using the--config flag with skopeo inspect, and piping the result through jq, you can view neatly formatted configuration details. For instance:
Copying Container Images
Skopeo is not just for inspection—it also enables you to transfer container images across different storage mechanisms. Whether you’re dealing with remote registries, local container storage backends, or OCI directories, Skopeo simplifies the process.Copying Between Registries
To transfer an image from a public repository to an internal enterprise registry, use the following command:Copying from an OCI Layout Directory
If you need to copy an image from a local OCI layout directory to another local directory, this command will do the trick:Deleting Container Images
Removing an image from a repository is straightforward with Skopeo’sdelete command. Simply specify the image address to delete it:
Deleting images is irreversible. Ensure you have backups or are certain before executing the delete command.
Synchronizing Registries
For maintaining consistency between registries, Skopeo offers a synchronization feature. This is especially beneficial when managing a local container registry that mirrors a remote repository. For example, to sync a remote registry with a local directory, run:Accessing Skopeo Man Pages
For comprehensive details about Skopeo and its various commands, the manual pages are an excellent resource. Use theman command to explore them.
To access the general Skopeo manual, run:
skopeo — Command line utility used to interact with local and remote container images and container image registries SYNOPSIS
skopeo [global options] command [command options] DESCRIPTION
skopeo is a command line utility providing various operations with container images and container image registries. Similarly, for information on specific commands such as copying images, inspect the dedicated man page:
skopeo copy operation, including its options and usage.