Run buildah config command before copy command (#71)

Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
Divyanshu Agrawal 2021-09-02 16:25:57 +05:30 committed by GitHub
parent a9a026b165
commit 2ee55183af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 5 deletions

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -23,8 +23,8 @@ interface Buildah {
useOCI: boolean, arch: string, layers: string, extraArgs: string[]
): Promise<CommandResult>;
from(baseImage: string): Promise<CommandResult>;
copy(container: string, contentToCopy: string[]): Promise<CommandResult | undefined>;
config(container: string, setting: BuildahConfigSettings): Promise<CommandResult>;
copy(container: string, contentToCopy: string[]): Promise<CommandResult | undefined>;
commit(container: string, newImageName: string, useOCI: boolean): Promise<CommandResult>;
}

View file

@ -99,8 +99,6 @@ async function doBuildFromScratch(
const container = await cli.from(baseImage);
const containerId = container.output.replace("\n", "");
await cli.copy(containerId, content);
const newImageConfig: BuildahConfigSettings = {
entrypoint,
port,
@ -109,6 +107,7 @@ async function doBuildFromScratch(
arch,
};
await cli.config(containerId, newImageConfig);
await cli.copy(containerId, content);
await cli.commit(containerId, newImage, useOCI);
}