toolkit: add docker

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2023-02-18 07:06:29 +01:00
parent c80fedbbae
commit 05bbe49fe1
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

View File

@ -20,6 +20,7 @@ import {Install} from './buildx/install';
import {Builder} from './buildx/builder';
import {BuildKit} from './buildkit/buildkit';
import {GitHub} from './github';
import {Docker} from './docker';
export interface ToolkitOpts {
/**
@ -32,6 +33,7 @@ export interface ToolkitOpts {
export class Toolkit {
public context: Context;
public github: GitHub;
public docker: Docker;
public buildx: Buildx;
public buildxInstall: Install;
public builder: Builder;
@ -40,7 +42,8 @@ export class Toolkit {
constructor(opts: ToolkitOpts = {}) {
this.context = new Context();
this.github = new GitHub({token: opts.githubToken});
this.buildx = new Buildx({context: this.context});
this.docker = Docker.getInstance();
this.buildx = new Buildx({context: this.context, standalone: !this.docker.available});
this.buildxInstall = new Install({context: this.context, standalone: this.buildx.standalone});
this.builder = new Builder({context: this.context, buildx: this.buildx});
this.buildkit = new BuildKit({context: this.context, buildx: this.buildx});