docker-export


Namedocker-export JSON
Version 1.0.1 PyPI version JSON
download
home_page
SummaryExport docker image into tar file directly from registry API
upload_time2023-08-11 14:23:39
maintainer
docs_urlNone
author
requires_python>=3.8
licenseGPL-3.0-or-later
keywords docker image kiwix oci
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # docker-export

[![CodeFactor](https://www.codefactor.io/repository/github/offspot/docker-export/badge)](https://www.codefactor.io/repository/github/offspot/docker-export)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![codecov](https://codecov.io/gh/offspot/docker-export/branch/main/graph/badge.svg)](https://codecov.io/gh/offspot/docker-export)
[![PyPI version shields.io](https://img.shields.io/pypi/v/docker-export.svg)](https://pypi.org/project/docker-export/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/docker-export.svg)](https://pypi.org/project/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.


```bash
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

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

### Python module

```py
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:

```sh
docker load -i IMAGE.tar

# verify it's been properly added
docker images
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "docker-export",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "docker,image,kiwix,oci",
    "author": "",
    "author_email": "Kiwix <dev@kiwix.org>",
    "download_url": "https://files.pythonhosted.org/packages/d0/1d/05fa811b4d7dc29be14ee2e0a33dbbb4f76f11282568d9ee2e3735b6b9de/docker_export-1.0.1.tar.gz",
    "platform": null,
    "description": "# docker-export\n\n[![CodeFactor](https://www.codefactor.io/repository/github/offspot/docker-export/badge)](https://www.codefactor.io/repository/github/offspot/docker-export)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![codecov](https://codecov.io/gh/offspot/docker-export/branch/main/graph/badge.svg)](https://codecov.io/gh/offspot/docker-export)\n[![PyPI version shields.io](https://img.shields.io/pypi/v/docker-export.svg)](https://pypi.org/project/docker-export/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/docker-export.svg)](https://pypi.org/project/docker-export)\n\nExport Docker Images (**v2 manifests only**) to a single `.tar`, without `docker`;\nUsing Python and the registry's API.\n\n## Usages\n\n### Installation\n\n`docker-export` is a Python3 software. You are advised to use it in a\nvirtual environment to avoid installing software dependencies on your\nsystem.\n\n\n```bash\npython3 -m venv ./env  # creates a virtual python environment in ./env folder\n./env/bin/pip install -U pip  # upgrade pip (package manager). recommended\n./env/bin/pip install -U docker-export[all]  # install/upgrade docker-export inside virtualenv\n\n# direct access to in-virtualenv docker-export binary, without shell-attachment\n./env/bin/docker-export --help\n# alias or link it for convenience\nsudo ln -s $(pwd)/env/bin/docker-export /usr/local/bin/\n\n# alternatively, attach virtualenv to shell\nsource env/bin/activate\ndocker-export --help\ndeactivate  # unloads virtualenv from shell\n```\n\n\n### Command line\n\n```sh\ndocker-export --platform linux/arm/v7 ghcr.io/kiwix/kiwix-tools:3.0.0 kiwix-tools.tar\n```\n\n### Python module\n\n```py\nimport pathlib\n\nfrom docker_export import Platform, Image, export\n\nexport(\n    image=Image.parse(\"kiwix/kiwix-tools:3.3.0\"),\n    platform=Platform.auto(),\n    to=pathlib.Path(\"kiwix-tools.tar\"),\n)\n```\n\n### Using exported image\n\nExported images (tarball) are loaded into dockerd via:\n\n```sh\ndocker load -i IMAGE.tar\n\n# verify it's been properly added\ndocker images\n```\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "Export docker image into tar file directly from registry API",
    "version": "1.0.1",
    "project_urls": {
        "Donate": "https://www.kiwix.org/en/support-us/",
        "Homepage": "https://github.com/offspot/docker-export"
    },
    "split_keywords": [
        "docker",
        "image",
        "kiwix",
        "oci"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f0af7ca2848ab58ecf7353438c459bb019bbbffa650b4bbbeccf3205897d8163",
                "md5": "46ad1d05282f8b66b3a04985e11f188f",
                "sha256": "84a6bbce481662c4661c73f93c75c9d135c0a7272ed5d7ba7aec02dadf40d0c5"
            },
            "downloads": -1,
            "filename": "docker_export-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "46ad1d05282f8b66b3a04985e11f188f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 22279,
            "upload_time": "2023-08-11T14:23:38",
            "upload_time_iso_8601": "2023-08-11T14:23:38.367669Z",
            "url": "https://files.pythonhosted.org/packages/f0/af/7ca2848ab58ecf7353438c459bb019bbbffa650b4bbbeccf3205897d8163/docker_export-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d01d05fa811b4d7dc29be14ee2e0a33dbbb4f76f11282568d9ee2e3735b6b9de",
                "md5": "eff85346698abdde376e4c081f13a505",
                "sha256": "3637cd752f96298897924b135706d773d7f97bd8bb6f7b89303557cf7545226c"
            },
            "downloads": -1,
            "filename": "docker_export-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "eff85346698abdde376e4c081f13a505",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 28443,
            "upload_time": "2023-08-11T14:23:39",
            "upload_time_iso_8601": "2023-08-11T14:23:39.464906Z",
            "url": "https://files.pythonhosted.org/packages/d0/1d/05fa811b4d7dc29be14ee2e0a33dbbb4f76f11282568d9ee2e3735b6b9de/docker_export-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-11 14:23:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "offspot",
    "github_project": "docker-export",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "docker-export"
}
        
Elapsed time: 1.70471s