Skip to content

Commit d998421

Browse files
authored
Merge pull request #39 from crazy-max/buildkit-ctn-prefix
buildx: make containerNamePrefix static and public
2 parents 5e8f679 + 33b4390 commit d998421

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/buildkit/buildkit.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export interface BuildKitOpts {
3333
export class BuildKit {
3434
private readonly context: Context;
3535
private readonly buildx: Buildx;
36-
private containerNamePrefix = 'buildx_buildkit_';
3736

3837
public readonly config: Config;
3938

@@ -67,7 +66,7 @@ export class BuildKit {
6766

6867
private async getVersionWithinImage(nodeName: string): Promise<string> {
6968
return exec
70-
.getExecOutput(`docker`, ['inspect', '--format', '{{.Config.Image}}', `${this.containerNamePrefix}${nodeName}`], {
69+
.getExecOutput(`docker`, ['inspect', '--format', '{{.Config.Image}}', `${Buildx.containerNamePrefix}${nodeName}`], {
7170
ignoreReturnCode: true,
7271
silent: true
7372
})

src/buildx/buildx.ts

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export class Buildx {
3636

3737
public readonly inputs: Inputs;
3838
public readonly standalone: boolean;
39+
public static readonly containerNamePrefix = 'buildx_buildkit_';
3940

4041
constructor(opts: BuildxOpts) {
4142
this.context = opts.context;

0 commit comments

Comments
 (0)