diff --git a/.buildkite/scripts/steps/artifacts/docker_context.sh b/.buildkite/scripts/steps/artifacts/docker_context.sh index de90621ada2d9..ad09e00124ab1 100755 --- a/.buildkite/scripts/steps/artifacts/docker_context.sh +++ b/.buildkite/scripts/steps/artifacts/docker_context.sh @@ -23,11 +23,7 @@ case $KIBANA_DOCKER_CONTEXT in cloud) DOCKER_CONTEXT_FILE="kibana-cloud-$FULL_VERSION-docker-build-context.tar.gz" ;; - ubi8) - DOCKER_CONTEXT_FILE="kibana-ubi8-$FULL_VERSION-docker-build-context.tar.gz" - ;; ubi) - # Currently ubi9. After ubi8 we're moving to a version agnostic filename DOCKER_CONTEXT_FILE="kibana-ubi-$FULL_VERSION-docker-build-context.tar.gz" ;; ironbank) diff --git a/src/dev/build/tasks/os_packages/create_os_package_tasks.ts b/src/dev/build/tasks/os_packages/create_os_package_tasks.ts index 8563c19f9d538..7cb9697364c75 100644 --- a/src/dev/build/tasks/os_packages/create_os_package_tasks.ts +++ b/src/dev/build/tasks/os_packages/create_os_package_tasks.ts @@ -109,13 +109,7 @@ export const CreateDockerUBI: Task = { async run(config, log, build) { await runDockerGenerator(config, log, build, { architecture: 'x64', - baseImage: 'ubi8', - context: false, - image: true, - }); - await runDockerGenerator(config, log, build, { - architecture: 'x64', - baseImage: 'ubi9', + baseImage: 'ubi', context: false, image: true, }); @@ -154,12 +148,7 @@ export const CreateDockerContexts: Task = { dockerBuildDate, }); await runDockerGenerator(config, log, build, { - baseImage: 'ubi8', - context: true, - image: false, - }); - await runDockerGenerator(config, log, build, { - baseImage: 'ubi9', + baseImage: 'ubi', context: true, image: false, }); diff --git a/src/dev/build/tasks/os_packages/docker_generator/run.ts b/src/dev/build/tasks/os_packages/docker_generator/run.ts index eb7a03a9e933f..16c48ad492187 100644 --- a/src/dev/build/tasks/os_packages/docker_generator/run.ts +++ b/src/dev/build/tasks/os_packages/docker_generator/run.ts @@ -29,7 +29,7 @@ export async function runDockerGenerator( build: Build, flags: { architecture?: string; - baseImage: 'none' | 'ubi9' | 'ubi8' | 'ubuntu'; + baseImage: 'none' | 'ubi' | 'ubuntu'; context: boolean; image: boolean; ironbank?: boolean; @@ -40,12 +40,10 @@ export async function runDockerGenerator( ) { let baseImageName = ''; if (flags.baseImage === 'ubuntu') baseImageName = 'ubuntu:20.04'; - if (flags.baseImage === 'ubi8') baseImageName = 'docker.elastic.co/ubi8/ubi-minimal:latest'; - if (flags.baseImage === 'ubi9') baseImageName = 'docker.elastic.co/ubi9/ubi-minimal:latest'; + if (flags.baseImage === 'ubi') baseImageName = 'docker.elastic.co/ubi9/ubi-minimal:latest'; let imageFlavor = ''; - if (flags.baseImage === 'ubi8') imageFlavor += `-ubi8`; - if (flags.baseImage === 'ubi9') imageFlavor += `-ubi`; + if (flags.baseImage === 'ubi') imageFlavor += `-ubi`; if (flags.ironbank) imageFlavor += '-ironbank'; if (flags.cloud) imageFlavor += '-cloud'; if (flags.serverless) imageFlavor += '-serverless'; diff --git a/src/dev/build/tasks/os_packages/docker_generator/template_context.ts b/src/dev/build/tasks/os_packages/docker_generator/template_context.ts index 61609203edcc0..edd0aed87e281 100644 --- a/src/dev/build/tasks/os_packages/docker_generator/template_context.ts +++ b/src/dev/build/tasks/os_packages/docker_generator/template_context.ts @@ -24,7 +24,7 @@ export interface TemplateContext { dockerBuildDate: string; usePublicArtifact?: boolean; publicArtifactSubdomain: string; - baseImage: 'none' | 'ubi8' | 'ubi9' | 'ubuntu'; + baseImage: 'none' | 'ubi' | 'ubuntu'; baseImageName: string; cloud?: boolean; serverless?: boolean; diff --git a/src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts b/src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts index 456a09ccc3db3..57fc4d93a760a 100755 --- a/src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts +++ b/src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts @@ -16,8 +16,8 @@ function generator(options: TemplateContext) { const dir = options.ironbank ? 'ironbank' : 'base'; const template = readFileSync(resolve(__dirname, dir, './Dockerfile')); return Mustache.render(template.toString(), { - packageManager: options.baseImage.includes('ubi') ? 'microdnf' : 'apt-get', - ubi: options.baseImage.includes('ubi'), + packageManager: options.baseImage === 'ubi' ? 'microdnf' : 'apt-get', + ubi: options.baseImage === 'ubi', ubuntu: options.baseImage === 'ubuntu', opensslLegacyProvider: !(options.cloud || options.serverless), ...options,