refactor: docker -> container
This commit is contained in:
parent
e231121082
commit
73139e1b91
@ -204,12 +204,12 @@ func MatchImagePkg(km config.KernelMask) (pkgs []string, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func DockerEnvs(km config.KernelMask) (envs []string) {
|
func ContainerEnvs(km config.KernelMask) (envs []string) {
|
||||||
envs = append(envs, "DEBIAN_FRONTEND=noninteractive")
|
envs = append(envs, "DEBIAN_FRONTEND=noninteractive")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func DockerCommands(km config.KernelMask) (commands []string) {
|
func ContainerCommands(km config.KernelMask) (commands []string) {
|
||||||
release := releaseFromString(km.DistroRelease)
|
release := releaseFromString(km.DistroRelease)
|
||||||
|
|
||||||
var snapshot string
|
var snapshot string
|
||||||
|
@ -290,10 +290,10 @@ func GenerateBaseDockerImage(registry string, commands []config.DockerCommand,
|
|||||||
}
|
}
|
||||||
d += fmt.Sprintf("RUN yum -y install %s\n", packages)
|
d += fmt.Sprintf("RUN yum -y install %s\n", packages)
|
||||||
case config.Debian:
|
case config.Debian:
|
||||||
for _, e := range debian.DockerEnvs(sk) {
|
for _, e := range debian.ContainerEnvs(sk) {
|
||||||
d += "ENV " + e + "\n"
|
d += "ENV " + e + "\n"
|
||||||
}
|
}
|
||||||
for _, c := range debian.DockerCommands(sk) {
|
for _, c := range debian.ContainerCommands(sk) {
|
||||||
d += "RUN " + c + "\n"
|
d += "RUN " + c + "\n"
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user