Documentation ¶
Index ¶
- Constants
- func Clone(remoteURL string, root string) (string, error)
- func NewImageReference(path string) (*image.Reference, error)
- func NormalizeImageTag(img string) string
- type Scanner
- func (s *Scanner) GetGitCommitID(ctx context.Context, cmdDir string) (string, error)
- func (s *Scanner) NewImageDependencies(img string, runtime string, buildtimes []string) (*image.Dependencies, error)
- func (s *Scanner) ObtainSourceCode(ctx context.Context, context string) (workingDir string, sha string, err error)
- func (s *Scanner) Scan(ctx context.Context) (deps []*image.Dependencies, err error)
- func (s *Scanner) ScanForDependencies(workingDir string, dockerfile string, buildArgs []string, pushTo []string) (deps []*image.Dependencies, err error)
Constants ¶
View Source
const (
// DockerHubRegistry is the docker hub registry
DockerHubRegistry = "registry.hub.docker.com"
)
Variables ¶
This section is empty.
Functions ¶
func Clone ¶
Clone clones a repository into a newly created directory, returning the resulting directory name.
func NewImageReference ¶
NewImageReference parses a path of a image and creates a ImageReference object
func NormalizeImageTag ¶
NormalizeImageTag adds "latest" to the image if the specified image has no tag and it's not referenced by digest.
Types ¶
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner scans Dockerfiles.
func NewScanner ¶
func NewScanner(pm *procmanager.ProcManager, context string, dockerfile string, destination string, buildArgs []string, tags []string, debug bool) (*Scanner, error)
NewScanner creates a new Scanner.
func (*Scanner) GetGitCommitID ¶
GetGitCommitID queries git for the latest commit.
func (*Scanner) NewImageDependencies ¶
func (s *Scanner) NewImageDependencies(img string, runtime string, buildtimes []string) (*image.Dependencies, error)
NewImageDependencies creates Dependencies with no references registered
func (*Scanner) ObtainSourceCode ¶
func (s *Scanner) ObtainSourceCode(ctx context.Context, context string) (workingDir string, sha string, err error)
ObtainSourceCode obtains the source code from the specified context.
func (*Scanner) ScanForDependencies ¶
func (s *Scanner) ScanForDependencies(workingDir string, dockerfile string, buildArgs []string, pushTo []string) (deps []*image.Dependencies, err error)
ScanForDependencies scans for base image dependencies.
Click to show internal directories.
Click to hide internal directories.