Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
656fe85
build: add experimental buildkit base
tonistiigi Apr 18, 2018
0f97642
build: basic buildkit progress support
tonistiigi Apr 19, 2018
b19294e
system: add buildcache formatting
tonistiigi May 18, 2018
8cf213b
build: use a separate upload request for early progress
tonistiigi May 19, 2018
e0b3921
build: Add support for using context from stdin with buildkit
May 19, 2018
5314a8f
build: Add support for using dockerfile from stdin with buildkit
May 22, 2018
89e1024
build: error out if buildkit is on and stdin is used for both dockerf…
May 22, 2018
82f0e1e
build: fix `-f` handling with buildkit
May 23, 2018
640cbb8
build: fix output handling with buildkit (quiet option, redirects)
May 24, 2018
b2b3f9c
build: setting DOCKER_BUILDKIT environment variable to any non-empty …
Jun 5, 2018
584d59d
formatter: fix TestDiskUsageContextFormatWrite expected output
Jun 6, 2018
ed75f62
build: add experimental --no-console flag to support non-tty human-re…
Jun 9, 2018
15674d9
build: simplify Close logic in WriteTempDockerfile
Jun 9, 2018
5919e8a
build: fix lint issues + refactor
Jun 9, 2018
aef4209
build: skip moby.buildkit.trace Aux message to be future proof
Jun 9, 2018
8945270
vendor: update buildkit and fsutil
tonistiigi Jun 10, 2018
6c60bb4
vendor: update docker/docker to c752b0991e31ba9869ab6a0661af57e9423874fb
Jun 12, 2018
00792d1
build: ensure temporary folder is removed in error case
Jun 13, 2018
5a103e1
build: change --no-console to --console=[true|false|auto]
Jun 13, 2018
b3a5c15
build: address some review nits
Jun 13, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
build: simplify Close logic in WriteTempDockerfile
Signed-off-by: Tibor Vass <[email protected]>
  • Loading branch information
Tibor Vass committed Jun 13, 2018
commit 15674d9ee911d31a0e8889c78d00eb0154f09103
8 changes: 2 additions & 6 deletions cli/command/image/build/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,8 @@ func WriteTempDockerfile(rc io.ReadCloser) (string, error) {
if err != nil {
return "", err
}
_, err = io.Copy(f, rc)
if err != nil {
f.Close()
return "", err
}
if err := f.Close(); err != nil {
defer f.Close()
if _, err := io.Copy(f, rc); err != nil {
return "", err
}
return dockerfileDir, rc.Close()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If rc.Close() returns an error then the callers will leak tmpDir, since they don't clean it up in the error case (and it would be a little odd to expect them to do so).

The dir is also leaked on errors in in the os.Create above too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ijc Addressed.

Expand Down