Tools for archiving files to docker hub
Project description
Layerstash
Layerstash is a tool designed to store large files as image layers in container registries such as GHCR or Docker Hub. Files exceeding 5GB will be uploaded and downloaded as separate ~5GB image layers.
Tag schema: <BASE_TAG>-<CHUNK_NUMBER>
Why does this exist?
While most storage providers (Google Drive, OneDrive, Dropbox, AWS, etc) charge for storage above a certain low minimum, Docker Hub (disclaimer) and GHCR (disclaimer) provide unlimited storage for free accounts.
In my personal testing, I have stored a total of 1.8TB in a public repository on Docker Hub androsh7/archive.
Legal Disclaimer
Layerstash is not affiliated with or endorsed by Docker, GitHub, or any container registry provider. Users are responsible for complying with the Terms of Service and acceptable use policies of any registry they interact with. Registry providers may impose rate limits, storage limits, or account restrictions at their discretion.
Security Disclaimer
Data is stored as-is inside container image layers. Do not upload secrets or sensitive data unless it is encrypted beforehand.
Download
usage: layerstash download [-h] [--version] [--log-level {trace,debug,info,warning,critical}] -r REPOSITORY -t BASE_TAG --registry {docker,ghcr} -o OUTFILE [-u USERNAME] [-p TOKEN]
options:
-h, --help show this help message and exit
--log-level {trace,debug,info,warning,critical}
Set the application log level
-r, --repository REPOSITORY
Name of the remote repository, i.e., androsh7/archive
-t, --base-tag BASE_TAG
The base tag, i.e., "python-ftp" , each chunk will have "-<INDEX>" appended to the end
--registry {docker,ghcr}
The registry to use ('docker', 'ghcr'), default: "docker"
-o, --outfile OUTFILE
The file to write the downloaded chunks to
-u, --username USERNAME
Docker username
-p, --token TOKEN Docker PAT token
Examples:
# Download without authentication (only possible for public repositories)
layerstash download -r androsh7/archive -t python-ftp -o python-ftp.tar
# Download with authentication
layerstash download -r androsh7/archive -t python-ftp -o python-ftp.tar -u androsh7 -p docker_pat_23492dx1c75812375dx82375
Note: Downloads can be resumed by rerunning the same command
Upload
usage: layerstash upload [-h] [--version] [--log-level {trace,debug,info,warning,critical}] -r REPOSITORY -t BASE_TAG --registry {docker,ghcr} -i INFILE [--overwrite] -u USERNAME
-p TOKEN
options:
-h, --help show this help message and exit
--log-level {trace,debug,info,warning,critical}
Set the application log level
-r, --repository REPOSITORY
Name of the remote repository, i.e., androsh7/archive
-t, --base-tag BASE_TAG
The base tag, i.e., "python-ftp" , each chunk will have "-<INDEX>" appended to the end
--registry {docker,ghcr}
The registry to use ('docker', 'ghcr'), default: "docker"
-i, --infile INFILE The file to upload
--overwrite Overwrite existing images if they have a different hash
-u, --username USERNAME
Docker username
-p, --token TOKEN Docker PAT token
Examples:
# Docker upload
layerstash upload -r androsh7/archive -t python-ftp -i python-ftp.tar -u androsh7 -p docker_pat_23492dx1c75812375dx82375
# GHCR upload
layerstash upload --registry ghcr -r androsh7/archive -t python-ftp -i python-ftp.tar -u androsh7 -p docker_pat_23492dx1c75812375dx82375
Development
To run the repository locally:
git clone https://github.com/androsh7/layerstash
cd layerstash
python3 -m venv .venv # Recommended to use python3.13
pip install -e .[dev]
python3 layerstash/main.py
To build the executables, use the build.py script:
usage: build.py [-h] [--windows] [--linux] [--build-all]
options:
-h, --help show this help message and exit
--windows Build the Windows executable
--linux Build the Linux executable
--build-all Build the Windows and Linux executable
Project details
Release history Release notifications | RSS feed
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 layerstash-1.0.0.tar.gz.
File metadata
- Download URL: layerstash-1.0.0.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
598764a71592d4b4f232411473df7f887fa746661a32f5844260b0c789f0fb91
|
|
| MD5 |
0d3c4d3a68d12c90ab41fd5d4e00a170
|
|
| BLAKE2b-256 |
355bcdf351632ac793f720a453b57cfa9fb27358d4b03562ab706493f1fd0516
|
Provenance
The following attestation bundles were made for layerstash-1.0.0.tar.gz:
Publisher:
publish.yml on Androsh7/layerstash
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
layerstash-1.0.0.tar.gz -
Subject digest:
598764a71592d4b4f232411473df7f887fa746661a32f5844260b0c789f0fb91 - Sigstore transparency entry: 1376332356
- Sigstore integration time:
-
Permalink:
Androsh7/layerstash@aa62214c675c28f93d1eb4b642ef14ac04521abf -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Androsh7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@aa62214c675c28f93d1eb4b642ef14ac04521abf -
Trigger Event:
push
-
Statement type:
File details
Details for the file layerstash-1.0.0-py3-none-any.whl.
File metadata
- Download URL: layerstash-1.0.0-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cba0e5280de05309b03dfcd8e16bea421ae746bd9fe456a830480763917768d7
|
|
| MD5 |
9458927930b457416d8ce46d7e5d8a73
|
|
| BLAKE2b-256 |
60fac9af4108f87351b19a2f36e2e6cdd86f3e6baf0af623fd118f5792781326
|
Provenance
The following attestation bundles were made for layerstash-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on Androsh7/layerstash
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
layerstash-1.0.0-py3-none-any.whl -
Subject digest:
cba0e5280de05309b03dfcd8e16bea421ae746bd9fe456a830480763917768d7 - Sigstore transparency entry: 1376332379
- Sigstore integration time:
-
Permalink:
Androsh7/layerstash@aa62214c675c28f93d1eb4b642ef14ac04521abf -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Androsh7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@aa62214c675c28f93d1eb4b642ef14ac04521abf -
Trigger Event:
push
-
Statement type: