No project description provided
Project description
docker-image-size-limit
Installation
pip install docker-image-size-limit
Usage
We support just a single command:
$ disl your-image-name:label 300MiB
your-image-name:label exceeds 300MiB limit by 14.4 MiB
Options
You can specify your image as:
- Image name:
python
- Image name with tag:
python:3.6.6-alpine
You can specify your size as:
- Raw number of bytes:
1024
- Human-readable megabytes:
30 MB
or30 MiB
- Human-readable gigabytes:
1 GB
or1 GiB
- Any other size supported by
humanfriendly
Should I use it?
You can use this script instead:
LIMIT=1024
IMAGE='your-image-name:latest'
SIZE="$(docker image inspect "$IMAGE" --format='{{.Size}}')"
test "$SIZE" -gt "$LIMIT" && echo 'Limit exceeded'; false
But I prefer to reuse tools over
custom bash
scripts here and there.
License
MIT.
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
Close
Hashes for docker-image-size-limit-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4519684b1469db5e11b87915d363dcfcf185b062c25c7c4d82d0098be70ed44 |
|
MD5 | 5d69d54e4564cafa95b3e0052134cf1c |
|
BLAKE2b-256 | f04da7f65248458a8ac640689a16ac7b34b550f2d5406864e9bd49c5f7645d51 |
Close
Hashes for docker_image_size_limit-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cb81754c00808094e8efcaf10bd5e0a4eaa4f3ebe21f04c7d523130ae713a02 |
|
MD5 | 6beffd558d430d9ef97fd4400e9db96a |
|
BLAKE2b-256 | 338521bdb0fa23d923fb85a0b57dad8f4ff5fb5490096baf938364685596588a |