Skip to main content

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anchorecli-0.1.0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

anchorecli-0.1.0-py2-none-any.whl (18.6 kB view details)

Uploaded Python 2

File details

Details for the file anchorecli-0.1.0.tar.gz.

File metadata

  • Download URL: anchorecli-0.1.0.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for anchorecli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 df13bc2c72d7e1068e1a17502c0fc13cc078d3a17285634c0689b35e611079a7
MD5 6716ee04493f95d42f0616c5e2a5818a
BLAKE2b-256 d2cc79cb6b77c04c77d88506cde55640e91d297b19ade71de28a0f30458a41a4

See more details on using hashes here.

File details

Details for the file anchorecli-0.1.0-py2-none-any.whl.

File metadata

File hashes

Hashes for anchorecli-0.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 703777c83e3912b56c310f3580e86cd740be272477bd53a7c6efc45c39d129d3
MD5 86e4563f41c6c8b053cb774f5379d0db
BLAKE2b-256 a06e1acc698179dc720dfbfad0eb1fb0f49ace5b4c8905aaef5b8239379c9e2a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page