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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docker_export-1.1.0.tar.gz.
File metadata
- Download URL: docker_export-1.1.0.tar.gz
- Upload date:
- Size: 28.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff215da057dc3ac18a6e6a63eec2d43df4b5824d03b77fdf4c3cb95601ccc8d3
|
|
| MD5 |
a5e1c96344c63639c1c94d04f5c99652
|
|
| BLAKE2b-256 |
43ac34a1c8ace3d09fdcec9008b7b4f5fb51aed3a7a6556f4c5ad14b1ed729f6
|
File details
Details for the file docker_export-1.1.0-py3-none-any.whl.
File metadata
- Download URL: docker_export-1.1.0-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a3358a306cc4fcbe63a6a83676b1521c34c387528f7ed2a2383f789a073b2a1
|
|
| MD5 |
e1562aae743de61110d6e27479ee9f7e
|
|
| BLAKE2b-256 |
3cac0e838cb44432838b88bfe84c44db569ce8acfd2faa56fcf69d49168664a7
|