예제 #1
0
// GetRoleDevImageName generates a docker image name to be used as a dev role image
func GetRoleDevImageName(repository string, role *model.Role, version string) string {
	return util.SanitizeDockerName(fmt.Sprintf("%s-%s:%s",
		repository,
		role.Name,
		version,
	))
}
예제 #2
0
func (c *Compilator) getPackageContainerName(pkg *model.Package) string {
	// The "-gkp" closer marker ensures that no package name is a
	// prefix of any other package. This ensures that the
	// "strings.HasPrefix" in "func (d *ImageManager)
	// RemoveVolumes" will not misidentify another package's
	// volumes as its own. Example which made trouble without
	// this: "nginx" vs. ngix_webdav".
	return util.SanitizeDockerName(fmt.Sprintf("%s-%s-%s-pkg-%s-gkp", c.baseCompilationContainerName(), pkg.Release.Name, pkg.Release.Version, pkg.Name))
}
예제 #3
0
// GetBaseImageName generates a docker image name to be used as a role image base
func GetBaseImageName(repository, fissileVersion string) string {
	return util.SanitizeDockerName(fmt.Sprintf("%s-role-base:%s", repository, fissileVersion))
}
예제 #4
0
// GetRolePackageImageName generates a docker image name for the amalgamation for a role image
func (p *PackagesImageBuilder) GetRolePackageImageName(roleManifest *model.RoleManifest) string {
	return util.SanitizeDockerName(fmt.Sprintf("%s-role-packages:%s",
		p.repository,
		roleManifest.GetRoleManifestDevPackageVersion(p.fissileVersion),
	))
}
예제 #5
0
// BaseImageName returns the name of the compilation base image
func (c *Compilator) BaseImageName() string {
	return util.SanitizeDockerName(fmt.Sprintf("%s:%s", c.baseCompilationImageRepository(), c.baseCompilationImageTag()))
}
예제 #6
0
// BaseCompilationImageTag will return the compilation image tag
func (c *Compilator) baseCompilationImageTag() string {
	return util.SanitizeDockerName(fmt.Sprintf("%s", c.fissileVersion))
}
예제 #7
0
// baseCompilationContainerName will return the compilation container's name
func (c *Compilator) baseCompilationContainerName() string {
	return util.SanitizeDockerName(fmt.Sprintf("%s-%s", c.baseCompilationImageRepository(), c.fissileVersion))
}