mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
parent
152243fb83
commit
c169e29c2c
5 changed files with 9 additions and 30 deletions
|
@ -19,11 +19,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)
|
||||
|
|
|
@ -78,13 +78,7 @@ export const CreateDockerUBI: Task = {
|
|||
await runDockerGenerator(config, log, build, {
|
||||
architecture: 'x64',
|
||||
context: false,
|
||||
ubi8: true,
|
||||
image: true,
|
||||
});
|
||||
await runDockerGenerator(config, log, build, {
|
||||
architecture: 'x64',
|
||||
context: false,
|
||||
ubi9: true,
|
||||
ubi: true,
|
||||
image: true,
|
||||
});
|
||||
},
|
||||
|
@ -122,12 +116,7 @@ export const CreateDockerContexts: Task = {
|
|||
dockerBuildDate,
|
||||
});
|
||||
await runDockerGenerator(config, log, build, {
|
||||
ubi8: true,
|
||||
context: true,
|
||||
image: false,
|
||||
});
|
||||
await runDockerGenerator(config, log, build, {
|
||||
ubi9: true,
|
||||
ubi: true,
|
||||
context: true,
|
||||
image: false,
|
||||
});
|
||||
|
|
|
@ -30,8 +30,7 @@ export async function runDockerGenerator(
|
|||
architecture?: string;
|
||||
context: boolean;
|
||||
image: boolean;
|
||||
ubi8?: boolean;
|
||||
ubi9?: boolean;
|
||||
ubi?: boolean;
|
||||
ubuntu?: boolean;
|
||||
ironbank?: boolean;
|
||||
cloud?: boolean;
|
||||
|
@ -40,12 +39,10 @@ export async function runDockerGenerator(
|
|||
) {
|
||||
let baseOSImage = '';
|
||||
if (flags.ubuntu) baseOSImage = 'ubuntu:20.04';
|
||||
if (flags.ubi8) baseOSImage = 'docker.elastic.co/ubi8/ubi-minimal:latest';
|
||||
if (flags.ubi9) baseOSImage = 'docker.elastic.co/ubi9/ubi-minimal:latest';
|
||||
if (flags.ubi) baseOSImage = 'docker.elastic.co/ubi9/ubi-minimal:latest';
|
||||
|
||||
let imageFlavor = '';
|
||||
if (flags.ubi8) imageFlavor += '-ubi8';
|
||||
if (flags.ubi9) imageFlavor += '-ubi';
|
||||
if (flags.ubi) imageFlavor += '-ubi';
|
||||
if (flags.ironbank) imageFlavor += '-ironbank';
|
||||
if (flags.cloud) imageFlavor += '-cloud';
|
||||
|
||||
|
@ -91,8 +88,7 @@ export async function runDockerGenerator(
|
|||
dockerCrossCompile,
|
||||
baseOSImage,
|
||||
dockerBuildDate,
|
||||
ubi8: flags.ubi8,
|
||||
ubi9: flags.ubi9,
|
||||
ubi: flags.ubi,
|
||||
ubuntu: flags.ubuntu,
|
||||
cloud: flags.cloud,
|
||||
metricbeatTarball,
|
||||
|
|
|
@ -22,8 +22,7 @@ export interface TemplateContext {
|
|||
dockerBuildDate: string;
|
||||
usePublicArtifact?: boolean;
|
||||
publicArtifactSubdomain: string;
|
||||
ubi8?: boolean;
|
||||
ubi9?: boolean;
|
||||
ubi?: boolean;
|
||||
ubuntu?: boolean;
|
||||
cloud?: boolean;
|
||||
metricbeatTarball?: string;
|
||||
|
|
|
@ -15,11 +15,10 @@ import { TemplateContext } from '../template_context';
|
|||
function generator(options: TemplateContext) {
|
||||
const dir = options.ironbank ? 'ironbank' : 'base';
|
||||
const template = readFileSync(resolve(__dirname, dir, './Dockerfile'));
|
||||
const ubi = Boolean(options.ubi8 || options.ubi9);
|
||||
return Mustache.render(template.toString(), {
|
||||
packageManager: ubi ? 'microdnf' : 'apt-get',
|
||||
packageManager: options.ubi ? 'microdnf' : 'apt-get',
|
||||
opensslLegacyProvider: !options.cloud,
|
||||
ubi,
|
||||
ubi: options.ubi,
|
||||
...options,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue