Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorType ¶
type ErrorType int
ErrorType ...
type ImagePullError ¶
ImagePullError ...
func (ImagePullError) Error ¶
func (ipe ImagePullError) Error() string
func (*ImagePullError) String ¶
func (ipe *ImagePullError) String() string
type ImagePuller ¶
type ImagePuller struct {
// contains filtered or unexported fields
}
ImagePuller contains the http Docker client and the secured Docker registry credentials
func NewImagePuller ¶
func NewImagePuller(registries []*common.RegistryAuth) *ImagePuller
NewImagePuller returns the Image puller type
func (*ImagePuller) CreateImageInLocalDocker ¶
func (ip *ImagePuller) CreateImageInLocalDocker(image imageInterface.Image) error
CreateImageInLocalDocker could also be implemented using curl: this example hits ... ? the default registry? docker hub?
curl --unix-socket /var/run/docker.sock -X POST http://localhost/images/create?fromImage=alpine
this example hits the kipp registry:
curl --unix-socket /var/run/docker.sock -X POST http://localhost/images/create\?fromImage\=registry.kipp.blackducksoftware.com%2Fblackducksoftware%2Fhub-jobrunner%3A4.5.0
func (*ImagePuller) PullImage ¶
func (ip *ImagePuller) PullImage(image imageInterface.Image) error
PullImage gives us access to a docker image by:
- hitting a docker create endpoint (?)
- pulling down the newly created image and saving as a tarball
It does this by accessing the host's docker daemon, locally, over the docker socket. This gives us a window into any images that are local.
func (*ImagePuller) SaveImageToTar ¶
func (ip *ImagePuller) SaveImageToTar(image imageInterface.Image) error
SaveImageToTar -- part of what it does is to issue an http request similar to the following:
curl --unix-socket /var/run/docker.sock -X GET http://localhost/images/openshift%2Forigin-docker-registry%3Av3.6.1/get
Click to show internal directories.
Click to hide internal directories.