Code Monkey home page Code Monkey logo

analyze-local-images's Introduction

⚠️️ DISCLAIMER ⚠️

This project is...

  • not actively maintained
  • not actively supported and is not guaranteed to be compatible with all versions of Clair
  • intended for local usage only and does not follow the best practices for production usage of Clair

analyze-local-images

This is a basic tool that enables quick analysis of local Docker images with Clair.

Install

First install Go and glide and then run the following commands:

$ git clone [email protected]:coreos/analyze-local-images.git $HOME/analyze-local-images-gopath/src/github.com/coreos/analyze-local-images
$ export GOPATH=$HOME/analyze-local-images-gopath
$ cd $HOME/analyze-local-images-gopath/src/github.com/coreos/analyze-local-images
$ glide install
$ go install github.com/coreos/analyze-local-images

Usage

Clair is a local process or inside of a container running on my current machine

analyze-local-images <Docker Image>

Clair is running inside of container on a local VM (e.g. Docker For Mac)

analyze-local-images -endpoint "http://<CLAIR-IP-ADDRESS>:6060" -my-address "<MY-IP-ADDRESS>" <Docker Image>

Clair needs filesystem access to the image files. If you run Clair locally, this tool will store the files in the system's temporary folder and Clair will find them there. It means if Clair is running in Docker, the host's temporary folder must be mounted in the Clair's container. If you run Clair remotely, this tool will run a small HTTP server to let Clair downloading them. It listens on the port 9279 and allows a single host: Clair's IP address, extracted from the -endpoint parameter. The my-address parameters defines the IP address of the HTTP server that Clair will use to download the images. With boot2docker, these parameters would be -endpoint "http://192.168.99.100:6060" -my-address "192.168.99.1".

As it runs an HTTP server and not an HTTPS one, be sure to not expose sensitive data and container images.

analyze-local-images's People

Contributors

coolljt0725 avatar davidxia avatar fatalbanana avatar josephschorr avatar jzelinskie avatar liangchenye avatar mnuessler avatar quentin-m avatar ruokai-lai avatar stapelberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

analyze-local-images's Issues

Clair Usage - deprecated

Hi,

is there a free alternative to scan images by using the clair database, as this is deprecated?

Cheers,
Timo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.