mirror of
https://github.com/redhat-actions/buildah-build.git
synced 2025-04-15 07:21:23 +00:00
Run buildah config command before copy command (#71)
Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
parent
a9a026b165
commit
2ee55183af
4 changed files with 4 additions and 5 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
@ -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>;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue