Export docker image into tar file directly from registry API
Project description
docker-export
Export Docker Images 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"),
)
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.2.tar.gz
(21.7 kB
view hashes)
Built Distribution
Close
Hashes for docker_export-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88d2e761e543cab2df256c23585c6a8d79c3e64da0a49e6d7158faddcde9b6bb |
|
MD5 | 8ffc0f081b5cd6edb4e90d1deac69356 |
|
BLAKE2b-256 | b7d478d954647d721c51413996ea06f0398680adf1ea785b3e9add2d87424d46 |