diff --git a/docker/build.gradle b/docker/build.gradle index 535dd4562c..09fb2ba8e6 100644 --- a/docker/build.gradle +++ b/docker/build.gradle @@ -33,25 +33,25 @@ shadowJar { } enum ImageVariant { - UBUNTU_ZULU("zulu", "Dockerfile", "1.8"), - UBUNTU_ZULU_11("zulu", "Dockerfile11", "11"), - AL_CORRETTO("corretto", "DockerfileAL", "1.8"), + UBUNTU_ZULU("Dockerfile", "1.8", "zulu-openjdk8"), + UBUNTU_ZULU_11("Dockerfile11", "11", "zulu-openjdk11"), + AL_CORRETTO("DockerfileAL", "1.8", "amazonlinux2"), OFFICIAL(UBUNTU_ZULU) - String knownAs String dockerFile String javaVersion + String baseImgaeFullName ImageVariant(ImageVariant other) { - this.knownAs = other.knownAs this.dockerFile = other.dockerFile this.javaVersion = other.javaVersion + this.baseImgaeFullName = other.baseImgaeFullName } - ImageVariant(String knownAs, String dockerFile, String javaVersion) { - this.knownAs = knownAs + ImageVariant(String dockerFile, String javaVersion, String baseImgaeFullName) { this.dockerFile = dockerFile this.javaVersion = javaVersion + this.baseImgaeFullName = baseImgaeFullName } static final String getRepository(Project project) { @@ -59,7 +59,7 @@ enum ImageVariant { } Set buildTags(Project project) { - return ["${project.version.toString().toLowerCase()}-${knownAs}-${javaVersion}"].stream().map { + return ["${project.version.toString().toLowerCase()}-${baseImgaeFullName}"].stream().map { toAppend -> "${getRepository(project)}:${toAppend}".toString() }.map(Identifier.&fromCompoundString).collect(Collectors.toSet()) }