From 068f344e032ad4489a88665adec683e06ad6f3c7 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Tue, 11 Apr 2017 14:06:51 -0400 Subject: [PATCH] Remove unused Builder.Cancel() Signed-off-by: Daniel Nephin --- builder/dockerfile/builder.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/builder/dockerfile/builder.go b/builder/dockerfile/builder.go index 76e0dcf998..6f7f20d7d1 100644 --- a/builder/dockerfile/builder.go +++ b/builder/dockerfile/builder.go @@ -50,7 +50,6 @@ type Builder struct { docker builder.Backend context builder.Context clientCtx context.Context - cancel context.CancelFunc runConfig *container.Config // runconfig for cmd, run, entrypoint etc. flags *BFlags @@ -113,10 +112,8 @@ func NewBuilder(clientCtx context.Context, config *types.ImageBuildOptions, back if config == nil { config = new(types.ImageBuildOptions) } - ctx, cancel := context.WithCancel(clientCtx) b = &Builder{ - clientCtx: ctx, - cancel: cancel, + clientCtx: clientCtx, options: config, Stdout: os.Stdout, Stderr: os.Stderr, @@ -313,11 +310,6 @@ func (b *Builder) hasFromImage() bool { return b.image != "" || b.noBaseImage } -// Cancel cancels an ongoing Dockerfile build. -func (b *Builder) Cancel() { - b.cancel() -} - // BuildFromConfig builds directly from `changes`, treating it as if it were the contents of a Dockerfile // It will: // - Call parse.Parse() to get an AST root for the concatenated Dockerfile entries.