Export docker image into tar file directly from registry API
Project description
docker-export
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-0.4.tar.gz
(22.7 kB
view details)
Built Distribution
File details
Details for the file docker_export-0.4.tar.gz
.
File metadata
- Download URL: docker_export-0.4.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c585c02d1d0514f2eed21177f7154d1753e0ace35cccb1ae54c54231f0bad66 |
|
MD5 | 8f3a5d69fb31c6857a5c95337965d5b8 |
|
BLAKE2b-256 | f17c7bf00d6b896589de71c597f23bd234d4e3164a5951b79c86cbfbda2cd7c0 |
File details
Details for the file docker_export-0.4-py3-none-any.whl
.
File metadata
- Download URL: docker_export-0.4-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97e2eed400a155221e914cf66cc0500c5aba9f068b9355c0186c8b3c0de64b73 |
|
MD5 | dbb80530e822264899df7597e24f072b |
|
BLAKE2b-256 | a698f30fd0c151d7c8d587e243a1806ea3dcf7efde7cee2b3c718ae564ad2460 |