Anchore Service CLI
Project description
Overview
The Anchore CLI provides a command line interface on top of the Anchore Engine REST API.
Using the Anchore CLI users can manage and inspect images, policies, subscriptions and registries.
Installing Anchore CLI from source
The Anchore CLI can be installed from source using the Python pip utility
git clone https://github.com/anchore/anchore-cli
cd anchore-cli
pip install --user --upgrade .
Or can be installed from the installed form source from the Python PyPI package repository.
Installing Anchore CLI on CentOS and Red Hat Enterprise Linux
yum install epel-release
yum install python-pip
pip install anchorecli
Installing Anchore CLI on Debian and Ubuntu
apt-get update
apt-get install python-pip
pip install anchorecli
Installing Anchore CLI on Mac OS / OS X
Use Python’s pip package manager:
sudo easy_install pip
pip install --user anchorecli
export PATH=${PATH}:${HOME}/Library/Python/2.7/bin
To ensure anchore-cli is readily available in subsequent terminal sessions, remember to add that last line to your shell profile (.bash_profile or equivalent).
To update anchore-cli later:
pip install --user --upgrade anchorecli
Configuring the Anchore CLI
By default the Anchore CLI will try to connect to the Anchore Engine at http://localhost/v1 with no authentication. The username, password and URL for the server can be passed to the Anchore CLI as command line arguments.
--u TEXT Username eg. admin
--p TEXT Password eg. foobar
--url TEXT Service URL eg. http://localhost:8228/v1
Rather than passing these parameters for every call to the cli they can be stores as environment variables.
ANCHORE_CLI_URL=http://myserver.example.com:8228/v1
ANCHORE_CLI_USER=admin
ANCHORE_CLI_PASS=foobar
Command line examples
Add an image to the Anchore Engine
anchore-cli image add docker.io/library/debian:latest
List images analyzed by the Anchore Engine
anchore-cli image list
Get a specific image and see when its status goes to analyzed
anchore-cli image get docker.io/library/debian:latest
Perform a vulnerability scan on an image
anchore-cli image vuln docker.io/library/debian:latest os
List operating system packages present in an image
anchore-cli image content docker.io/library/debian:latest os
Subscribe to receive webhook notifications when new CVEs are added to an update
anchore-cli subscription activate vuln_update docker.io/library/debian:latest
More Information
For further details on use of the Anchore CLI with the Anchore Engine please refer to the Anchore Engine Wiki
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
File details
Details for the file anchorecli-0.2.4.tar.gz
.
File metadata
- Download URL: anchorecli-0.2.4.tar.gz
- Upload date:
- Size: 25.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.6.0 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.19.4 CPython/2.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09a47dfe0da40caebd5696a09d980a7819285304e7d400f6ef365f65a163af13 |
|
MD5 | 7481731a61194b6bbf2df682c03d5b3f |
|
BLAKE2b-256 | ad3b3787355af0436891e3e8815be7774d10845a012e5b93374674add2c14979 |
File details
Details for the file anchorecli-0.2.4-py2-none-any.whl
.
File metadata
- Download URL: anchorecli-0.2.4-py2-none-any.whl
- Upload date:
- Size: 29.1 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.6.0 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.19.4 CPython/2.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4944c078fe956109813e7e10f9d3c0e2e17f44708af3b22b069587a90cea3f65 |
|
MD5 | 412b19b56d223caf87a2f5223a8fb586 |
|
BLAKE2b-256 | a53c981e9d226ee7ee1de32eae21b0b5e35adffa15be8cc9f6e7084641d2e84b |