Пример #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))
}