Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
*.log
.*/
*/**

**/.idea/
**/__pycache__/
**/.pytest_cache/
**/venv/
**/.env
**/*.lock
**/mirror_cn.py

*.egg-info/
*.log
output/
out/
./test*.py
*.egg-info
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
# docker-drag
# docker-pull
This repository contains Python scripts for interacting with Docker Hub or other registries, without needing the Docker client itself.

It relies on the Docker registry [HTTPS API v2](https://docs.docker.com/registry/spec/api/).

## Use aria2c as downloader

You need to install `aria2c` manually.

```sh
# use pixi as package manager
pixi global install aria2c
# install docker-pull
uv pip install docker_pull[aria2]@git+https://github.com/aclon314/docker-pull.git
# example
docker-pull busybox
```

> Because some huge layers (>5GB) could easily failed to download, and docker/podman DON'T support resume download(though they support cached layers if the layers are 100% downloaded).

## Pull a Docker image in HTTPS

`python docker_pull.py hello-world`
Expand Down
17 changes: 17 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""
Usage:
```python
puller = DockerPull(
args.image,
output_path=args.output_path,
registry_username=args.username,
registry_password=args.password,
)
puller.save_image(skip=args.skip, keep_tmp=args.verbose)
```
"""

from .docker_pull import (
DockerImage,
DockerPull,
)
Loading