Documentation ¶
Index ¶
- Constants
- Variables
- func Analyse(image Image) clair.ImageAnalysis
- func AuthenticateResponse(dockerResponse *http.Response, request *http.Request) error
- func BearerAuthParams(r *http.Response) map[string]string
- func Docker0InterfaceIP() (string, error)
- func FromHistory(im *Image) error
- func LocalServerIP() (string, error)
- func Login(registry string) (bool, error)
- func Prepare(im *Image) error
- func Push(image Image) error
- func TmpLocal() string
- type Authentication
- type Image
- type Layer
Constants ¶
const DockerHub = "registry-1.docker.io"
Variables ¶
var IsLocal = false
Functions ¶
func AuthenticateResponse ¶
func BearerAuthParams ¶
BearerAuthParams parse Bearer Token on Www-Authenticate header
func Docker0InterfaceIP ¶
Docker0InterfaceIP return the docker0 interface ip by running `ip route show | grep docker0 | awk {print $9}`
func FromHistory ¶
FromHistory populate image.FSLayers with the layer from `docker history` command
func LocalServerIP ¶
LocalServerIP return the local hyperclair server IP
Types ¶
type Authentication ¶
type Authentication struct {
Username, Password string
}
var User Authentication
type Image ¶
Image represent Image Manifest from Docker image, including the registry URL
func Parse ¶
Parse is used to parse a docker image command
Example: "register.com:5080/wemanity-belgium/alpine" "register.com:5080/wemanity-belgium/alpine:latest" "register.com:5080/alpine" "register.com/wemanity-belgium/alpine" "register.com/alpine" "register.com/wemanity-belgium/alpine:latest" "alpine" "wemanity-belgium/alpine" "wemanity-belgium/alpine:latest"
func (Image) BlobsURI ¶
BlobsURI run Blobs URI as <registry>/<imageName>/blobs/<digest> eg: "http://registry:5000/v2/jgsqware/ubuntu-git/blobs/sha256:13be4a52fdee2f6c44948b99b5b65ec703b1ca76c1ab5d2d90ae9bf18347082e"