rename engine.#Build to engine.#Dockerfile

Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
Richard Jones
2022-01-12 14:00:39 -07:00
parent ecc45543a0
commit 729013ae91
23 changed files with 24 additions and 18 deletions

View File

@@ -22,13 +22,13 @@ import (
)
func init() {
Register("Build", func() Task { return &buildTask{} })
Register("Dockerfile", func() Task { return &dockerfileTask{} })
}
type buildTask struct {
type dockerfileTask struct {
}
func (t *buildTask) Run(ctx context.Context, pctx *plancontext.Context, s solver.Solver, v *compiler.Value) (*compiler.Value, error) {
func (t *dockerfileTask) Run(ctx context.Context, pctx *plancontext.Context, s solver.Solver, v *compiler.Value) (*compiler.Value, error) {
frontend, err := v.Lookup("frontend").String()
if err != nil {
return nil, err
@@ -42,7 +42,7 @@ func (t *buildTask) Run(ctx context.Context, pctx *plancontext.Context, s solver
}
}
func (t *buildTask) dockerfile(ctx context.Context, pctx *plancontext.Context, s solver.Solver, v *compiler.Value) (*compiler.Value, error) {
func (t *dockerfileTask) dockerfile(ctx context.Context, pctx *plancontext.Context, s solver.Solver, v *compiler.Value) (*compiler.Value, error) {
lg := log.Ctx(ctx)
// Read auth info
@@ -144,7 +144,7 @@ func (t *buildTask) dockerfile(ctx context.Context, pctx *plancontext.Context, s
})
}
func (t *buildTask) dockerBuildOpts(v *compiler.Value, pctx *plancontext.Context) (map[string]string, error) {
func (t *dockerfileTask) dockerBuildOpts(v *compiler.Value, pctx *plancontext.Context) (map[string]string, error) {
opts := map[string]string{}
if dockerfilePath := v.Lookup("dockerfile.path"); dockerfilePath.Exists() {