Skip to main content

Export docker image into tar file directly from registry API

Project description

docker-export

CodeFactor License: GPL v3 codecov PyPI version shields.io PyPI - Python Version

Export Docker Images (v2 manifests only) to a single .tar, without docker; Using Python and the registry's API.

Usages

Installation

docker-export is a Python3 software. You are advised to use it in a virtual environment to avoid installing software dependencies on your system.

python3 -m venv ./env  # creates a virtual python environment in ./env folder
./env/bin/pip install -U pip  # upgrade pip (package manager). recommended
./env/bin/pip install -U docker-export[all]  # install/upgrade docker-export inside virtualenv

# direct access to in-virtualenv docker-export binary, without shell-attachment
./env/bin/docker-export --help
# alias or link it for convenience
sudo ln -s $(pwd)/env/bin/docker-export /usr/local/bin/

# alternatively, attach virtualenv to shell
source env/bin/activate
docker-export --help
deactivate  # unloads virtualenv from shell

Command line

docker-export --platform linux/arm/v7 ghcr.io/kiwix/kiwix-tools:3.0.0 kiwix-tools.tar

Python module

import pathlib

from docker_export import Platform, Image, export

export(
    image=Image.parse("kiwix/kiwix-tools:3.3.0"),
    platform=Platform.auto(),
    to=pathlib.Path("kiwix-tools.tar"),
)

Using exported image

Exported images (tarball) are loaded into dockerd via:

docker load -i IMAGE.tar

# verify it's been properly added
docker images

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

docker_export-1.2.0.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docker_export-1.2.0-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file docker_export-1.2.0.tar.gz.

File metadata

  • Download URL: docker_export-1.2.0.tar.gz
  • Upload date:
  • Size: 28.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for docker_export-1.2.0.tar.gz
Algorithm Hash digest
SHA256 656a7f96c40768110fd8b891dd00c0d57e6ea409374270134525a8556d30e53e
MD5 d1a8418807ffd704a48ebd223f8fedb5
BLAKE2b-256 e993467622649d719203324061f5c80a80760c6f240b55ab9e09ffea7a180adf

See more details on using hashes here.

Provenance

The following attestation bundles were made for docker_export-1.2.0.tar.gz:

Publisher: Publish.yaml on offspot/docker-export

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file docker_export-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: docker_export-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for docker_export-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d0c9d1e6fb168ccebf55b230457ff025b6076d56dbb317d0a89e8f5adad6e4ee
MD5 8ed7aa16a25e03a11bf19e2495634c8f
BLAKE2b-256 5522c927ff2416d53a9f9f4080f7b44468a40a26b38d7763530f5dc458e868e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for docker_export-1.2.0-py3-none-any.whl:

Publisher: Publish.yaml on offspot/docker-export

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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