Skip to main content

a library and tools for interacting with container registries

Project description

containerregistry

Build Status

A set of Python libraries and tools for interacting with a Docker Registry.

Bazel users see rules_docker, which relies heavily on these tools.

puller.par

$ bazel run @containerregistry//:puller.par -- --help
usage: puller.par [-h] --name NAME --directory DIRECTORY [--os OS]
                   [--os-version OS_VERSION]
                   [--os-features [OS_FEATURES [OS_FEATURES ...]]]
                   [--architecture ARCHITECTURE] [--variant VARIANT]
                   [--features [FEATURES [FEATURES ...]]]
                   [--client-config-dir CLIENT_CONFIG_DIR]
                   [--stderrthreshold STDERRTHRESHOLD]

Pull images from a Docker Registry, faaaaast.

optional arguments:
  -h, --help            show this help message and exit
  --name NAME           The name of the docker image to pull and save.
                        Supports fully-qualified tag or digest references.
  --directory DIRECTORY
                        Where to save the image's files.
  --os OS               For multi-platform manifest lists, specifies the
                        operating system.
  --os-version OS_VERSION
                        For multi-platform manifest lists, specifies the
                        operating system version.
  --os-features [OS_FEATURES [OS_FEATURES ...]]
                        For multi-platform manifest lists, specifies operating
                        system features.
  --architecture ARCHITECTURE
                        For multi-platform manifest lists, specifies the CPU
                        architecture.
  --variant VARIANT     For multi-platform manifest lists, specifies the CPU
                        variant.
  --features [FEATURES [FEATURES ...]]
                        For multi-platform manifest lists, specifies CPU
                        features.
  --client-config-dir CLIENT_CONFIG_DIR
                        The path to the directory where the client
                        configuration files are located. Overiddes the value
                        from DOCKER_CONFIG
  --stderrthreshold STDERRTHRESHOLD
                        Write log events at or above this level to stderr.

pusher.par

$ bazel run @containerregistry//:pusher.par -- --help
usage: pusher.par [-h] --name NAME [--tarball TARBALL] [--config CONFIG]
                   [--manifest MANIFEST] [--digest DIGEST] [--layer LAYER]
                   [--stamp-info-file STAMP_INFO_FILE] [--oci]
                   [--client-config-dir CLIENT_CONFIG_DIR]
                   [--stderrthreshold STDERRTHRESHOLD]

Push images to a Docker Registry, faaaaaast.

optional arguments:
  -h, --help            show this help message and exit
  --name NAME           The name of the docker image to push.
  --tarball TARBALL     An optional legacy base image tarball.
  --config CONFIG       The path to the file storing the image config.
  --manifest MANIFEST   The path to the file storing the image manifest.
  --digest DIGEST       The list of layer digest filenames in order.
  --layer LAYER         The list of layer filenames in order.
  --stamp-info-file STAMP_INFO_FILE
                        A list of files from which to read substitutions to
                        make in the provided --name, e.g. {BUILD_USER}
  --oci                 Push the image with an OCI Manifest.
  --client-config-dir CLIENT_CONFIG_DIR
                        The path to the directory where the client
                        configuration files are located. Overiddes the value
                        from DOCKER_CONFIG
  --stderrthreshold STDERRTHRESHOLD
                        Write log events at or above this level to stderr.

importer.par

$ bazel run @containerregistry//:importer.par -- --help
usage: importer.par [-h] --tarball TARBALL [--format {tar,tar.gz}] --directory
                    DIRECTORY [--stderrthreshold STDERRTHRESHOLD]

Import images from a tarball into our faaaaaast format.

optional arguments:
  -h, --help            show this help message and exit
  --tarball TARBALL     The tarball containing the docker image to rewrite
                        into our fast on-disk format.
  --format {tar,tar.gz}
                        The form in which to save layers.
  --directory DIRECTORY
                        Where to save the image's files.
  --stderrthreshold STDERRTHRESHOLD
                        Write log events at or above this level to stderr.

flatten.par

$ bazel run @containerregistry//:flatten.par -- --help
usage: flatten.par [-h] [--tarball TARBALL] [--config CONFIG]
                   [--digest DIGEST] [--layer LAYER]
                   [--uncompressed_layer UNCOMPRESSED_LAYER]
                   [--diff_id DIFF_ID] [--filesystem FILESYSTEM]
                   [--metadata METADATA] [--stderrthreshold STDERRTHRESHOLD]

Flatten container images.

optional arguments:
  -h, --help            show this help message and exit
  --tarball TARBALL     An optional legacy base image tarball.
  --config CONFIG       The path to the file storing the image config.
  --digest DIGEST       The list of layer digest filenames in order.
  --layer LAYER         The list of compressed layer filenames in order.
  --uncompressed_layer UNCOMPRESSED_LAYER
                        The list of uncompressed layer filenames in order.
  --diff_id DIFF_ID     The list of diff_ids in order.
  --filesystem FILESYSTEM
                        The name of where to write the filesystem tarball.
  --metadata METADATA   The name of where to write the container startup
                        metadata.
  --stderrthreshold STDERRTHRESHOLD
                        Write log events at or above this level to stderr.

appender.par

$ bazel run @containerregistry//:appender.par -- --help
usage: appender.par [-h] --src-image SRC_IMAGE --tarball TARBALL --dst-image
                    DST_IMAGE [--stderrthreshold STDERRTHRESHOLD]

Append tarballs to an image in a Docker Registry.

optional arguments:
  -h, --help            show this help message and exit
  --src-image SRC_IMAGE
                        The name of the docker image to append to.
  --tarball TARBALL     The tarball to append.
  --dst-image DST_IMAGE
                        The name of the new image.
  --stderrthreshold STDERRTHRESHOLD
                        Write log events at or above this level to stderr.

digester.par

$ bazel run @containerregistry//:digester.par -- --help
usage: digester.par [-h] [--tarball TARBALL] --output-digest OUTPUT_DIGEST
                    [--config CONFIG] [--manifest MANIFEST] [--digest DIGEST]
                    [--layer LAYER] [--oci]
                    [--stderrthreshold STDERRTHRESHOLD]

Calculate digest for a container image.

optional arguments:
  -h, --help            show this help message and exit
  --tarball TARBALL     An optional legacy base image tarball.
  --output-digest OUTPUT_DIGEST
                        Filename to store digest in.
  --config CONFIG       The path to the file storing the image config.
  --manifest MANIFEST   The path to the file storing the image manifest.
  --digest DIGEST       The list of layer digest filenames in order.
  --layer LAYER         The list of layer filenames in order.
  --oci                 Image has an OCI Manifest.
  --stderrthreshold STDERRTHRESHOLD
                        Write log events at or above this level to stderr.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

containerregistry-ccwienk-0.2.5.tar.gz (62.3 kB view details)

Uploaded Source

Built Distribution

containerregistry_ccwienk-0.2.5-py3-none-any.whl (111.6 kB view details)

Uploaded Python 3

File details

Details for the file containerregistry-ccwienk-0.2.5.tar.gz.

File metadata

  • Download URL: containerregistry-ccwienk-0.2.5.tar.gz
  • Upload date:
  • Size: 62.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for containerregistry-ccwienk-0.2.5.tar.gz
Algorithm Hash digest
SHA256 484600a275c9bf89152ea8ff6aaefe84d71b38656d5821e81f50bc880b4022b4
MD5 10284f288a8c67d8f90479f00e8ada6b
BLAKE2b-256 58e1ae4c59cd74db685d4741ff56dd0307e2eb6671e9771b4bc60886affea502

See more details on using hashes here.

File details

Details for the file containerregistry_ccwienk-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: containerregistry_ccwienk-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 111.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for containerregistry_ccwienk-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d9549bd493b514d28c77289940a36d715bcf5864f33d3b719a57842c7182488a
MD5 b2c8f5a44ffcb07aed710fadff678b60
BLAKE2b-256 275ab1622a201aabcf10b9e4f04c8716cf0026e2bf95f8d98c7a1e612a135518

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page