ecr-cli
Goodbye docker login & a long registry URL for Amazon ECR :)
Requirements
Python
CPython 2,7, 3,4, 3.5, 3.6
Docker
API version >= 1.21
Installation
$ pip install ecr-cli
ECR Configuration file
If you place a file in YAML format with the filename .ecr.yml in the same directory as Dockerfile, profile name, region name, registry ID and tag can be set.
Key name |
Value |
Description |
|---|---|---|
profile_name |
str |
Use a specific profile from your credential file. |
region_name |
str |
The region to use. Overrides config/env settings. |
registry_id |
str |
AWS account ID that correspond to a Amazon ECR registry that you want to log in to. |
tags |
seq of str |
Name and optionally a tag in the ‘name:tag’ format. |
.ecr.yml example:
profile_name: null
region_name: us-west-2
registry_id: null
tags:
- java/amazonlinux-oracle-java:latest
- java/amazonlinux-oracle-java:2017.12-8u162
NOTE: Command line options override settings in this file.
Usage
Usage: ecr [OPTIONS] COMMAND [ARGS]...
Options:
--profile TEXT Use a specific profile from your credential file.
--region TEXT The region to use. Overrides config/env settings.
--registry-id TEXT AWS account ID that correspond to a Amazon ECR registry that you want to log in to.
--debug / --no-debug Turn on debug logging.
-h, --help Show this message and exit.
Commands:
build Build an image from a Dockerfile.
pull Pull an image or a repository from a Amazon ECR registry
push Push an image or a repository to a Amazon ECR registry.
Build
Usage: ecr build [OPTIONS] PATH
Build an image from a Dockerfile.
Options:
-t, --tag TEXT Name and optionally a tag in the `name:tag` format.
--dockerfile PATH Name of the Dockerfile (Default is `PATH/Dockerfile`).
--configfile PATH Name of the ECR configuration file (Default is `PATH/.ecr.yml`).
--cache / --no-cache Use cache when building the image.
--rm / --no-rm Remove intermediate containers after a successful build.
--force-rm / --no-force-rm Always remove intermediate containers.
--pull / --no-pull Always attempt to pull a newer version of the image.
--squash / --no-squash Squash newly built layers into a single new layer.
--push / --no-push Push an image or a repository to a Amazon ECR registry after a successful build.
--quiet / --no-quiet Suppress the standard output.
--no-profile Forcibly disable the ECR configuration file profile.
-h, --help Show this message and exit.
Push
Usage: ecr push [OPTIONS] NAME...
Push an image or a repository to a Amazon ECR registry.
Options:
--quiet / --no-quiet Suppress the standard output.
-h, --help Show this message and exit.
Pull
Usage: ecr pull [OPTIONS] NAME...
Pull an image or a repository from a Amazon ECR registry
Options:
--quiet / --no-quiet Suppress the standard output.
-h, --help Show this message and exit.
Authentication
Support Boto3 credentials.
Testing
TODO
TODO
Progress bar can not be reset :(
Vacuum command
Tests
Metadata
Release files for ecr-cli 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ecr-cli-0.0.8.tar.gz | 6.8 kB | Without provenance | Details for ecr-cli-0.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ecr_cli-0.0.8-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for ecr_cli-0.0.8-py2.py3-none-any.whl |
Total release size: 15.3 kB
Release files / ecr-cli-0.0.8.tar.gz
| Download URL | ecr-cli-0.0.8.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7254317ea5ac5c34d41b04899bcd6bada9dc703ef5643cd8ae2b81bd732e49e9
|
|
BLAKE2b-256 checksum How to use checksums |
6fa9e6d2cfa6a0608ad6dcec9d718112db24707dbc19390d4c1a74f099a252ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / ecr_cli-0.0.8-py2.py3-none-any.whl
| Download URL | ecr_cli-0.0.8-py2.py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
1af8e864bba75b3aaffdfc6bf4f1d9c96118475696f0c12c8f9b691f11ba7d6b
|
|
BLAKE2b-256 checksum How to use checksums |
097dfc81c232b276662c6abcb5c7b86cef8bacddea55b808eaed71d3e19bf6dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for ecr-cli 0.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.