Commit graph

33 commits

Author SHA1 Message Date
Stefan J. Wernli
1c1d0c5f6f Fixing Tar functions to support Windows long paths.
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
2015-08-11 16:07:36 -07:00
Lei Jitang
fb58e0d9c2 Enable golint in pkg/arcive
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-08-04 09:52:54 +08:00
John Howard
786c3fafa0 Tidy platform common bits in diff
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-30 13:04:49 -07:00
John Howard
95594939be Windows: Daemon build is broken
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-29 20:08:51 -07:00
Vincent Batts
f0512440f7 archive, chrootarchive: split out decompression
In `ApplyLayer` and `Untar`, the stream is magically decompressed. Since
this is not able to be toggled, rather than break this ./pkg/ API, add
an `ApplyUncompressedLayer` and `UntarUncompressed` that does not
magically decompress the layer stream.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-07-28 16:36:38 -04:00
Arnaud Porterie
879067d69e Enable validate-lint as part of CI
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-07-22 15:23:34 -07:00
John Howard
65cbc7cb25 Windows: Docker build starting to work
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-06-17 10:41:28 -07:00
unclejack
bfdf63d37c linting changes
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-06-17 01:16:57 +03:00
Alexander Morozov
0b830276db Merge pull request #13231 from Microsoft/10662-chrootarchive
Windows: chrootarchive refactor
2015-06-03 09:54:42 -07:00
John Howard
b973596a91 Windows: Undo 908db518 for Windows daemon
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-05-28 12:04:09 -07:00
John Howard
d025345cdd Windows: chrootarchive refactor
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-05-20 08:56:42 -07:00
Phil Estes
1a59c1698e Merge pull request #12360 from yestin/11601-supplement-tests-part-2
Improve test accuracy for pkg/chrootarchive (part 2)
2015-04-14 21:00:12 -04:00
Megan Kostick
967f4dc067 Fix vet warning in archive.go
Signed-off-by: Megan Kostick <mkostick@us.ibm.com>
2015-04-14 09:13:50 -07:00
Yestin Sun
6ae14a2625 Improve test accuracy for pkg/chrootarchive (part 2)
Check test correctness of untar by comparing destination with
source. For part 2, it checkes hashes of source and destination
files or the target files of symbolic links.

This is a supplement to the #11601 fix.

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2015-04-13 21:46:14 -07:00
Evan Hazlett
86168f3594 Merge pull request #12204 from yestin/11601-supplement-tests-part-1
Improve test accuracy for pkg/chrootarchive (part 1)
2015-04-13 16:14:18 -04:00
Phil Estes
70210e11f2 Send archive options via pipe in chrootarchive
After finding our initial thinking on env. space versus arg list space
was wrong, we need to solve this by using a pipe between the caller and
child to marshall the (potentially very large) options array to the
archiver.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-04-12 21:16:54 -04:00
Yestin Sun
f16c4275d2 Improve test accuracy for pkg/chrootarchive (part 1)
Check test correctness of untar by comparing destination with
source. For part one, it only compares the directories.

This is a supplement to the #11601 fix.

Signed-off-by: Yestin Sun <yestin.sun@polyera.com>
2015-04-08 14:07:31 -07:00
Yestin Sun
219034eabe Add more tests for pkg/chrootarchive
Fixes issue #11601

Change-Id: Ifc1dbcc59cc4dc581ed43fc8fbe43fbaec4ccad0
Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2015-03-24 18:23:28 -07:00
Alexander Morozov
3d26fc868b Merge pull request #10439 from estesp/10426-fix-arg-list-too-long
Pass excludes/options to tar unarchiver via environment versus cmd line
2015-02-20 23:48:55 -08:00
Phil Estes
2c7172b274 Pass excludes/options to tar unarchiver via environment
Fixes #10426

Because of the ability to easily overload the shell max argument list
length once the image count is several hundred, `docker load` will
start to fail because of this as it passes an excludes list of all
images in the graph.  This patch uses an environment variable with the
json marshalled through it to get around the arg length limitation.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-02-19 17:53:39 -08:00
Jason Sommer
eba8586d2b Fixed relative filepath check
Signed-off-by: Jason Sommer <jsdirv@gmail.com>
2015-02-16 20:38:52 -06:00
Ian Babrou
eec1af54d1 Not doing extra assertion for io.Closer
Signed-off-by: Ian Babrou <ibobrik@gmail.com>
2015-01-22 10:36:20 +03:00
Doug Davis
f8ec68ef67 Have .dockerignore support Dockerfile/.dockerignore
If .dockerignore mentions either then the client will send them to the
daemon but the daemon will erase them after the Dockerfile has been parsed
to simulate them never being sent in the first place.

an events test kept failing for me so I tried to fix that too

Closes #8330

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-01-06 10:57:48 -08:00
Josh Hawn
c57c03f841 Refactor to optimize storage driver ApplyDiff()
To avoid an expensive call to archive.ChangesDirs() which walks two directory
trees and compares every entry, archive.ApplyLayer() has been extended to
also return the size of the layer changes.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2014-12-17 21:54:23 -08:00
Alexander Morozov
6b772e6532 Fix vet errors about unkeyed fields
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2014-12-12 10:44:59 -08:00
Michael Crosby
cd74be68b8 Flush stdin from within chroot archive
This makes sure that we don't buffer in memory and that we also flush
stdin from diff as well as untar.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Conflicts:
	pkg/chrootarchive/diff.go
2014-12-09 14:56:17 -05:00
Lewis Marshall
a8124280d2 Fix chroot untar for zero padded archive from slow reader
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2014-12-09 14:56:16 -05:00
Michael Crosby
1036313f03 Decompress archive before streaming the unpack in a chroot
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Conflicts:
	pkg/archive/archive.go
	pkg/chrootarchive/archive.go
2014-12-09 14:56:16 -05:00
Michael Crosby
79b559bc05 Update chroot apply layer to handle decompression outside chroot
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Conflicts:
	pkg/archive/diff.go
	pkg/chrootarchive/archive.go
2014-12-09 14:56:16 -05:00
unclejack
cdf5a07698 pkg/chrootarchive: provide TMPDIR for ApplyLayer
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-24 11:51:37 -05:00
unclejack
d729913f31 don't call reexec.Init from chrootarchive
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-11 23:20:16 +02:00
Tibor Vass
57f40e0735 pkg/chrootarchive: pass TarOptions via CLI arg
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2014-11-11 23:20:09 +02:00
unclejack
2f3002a00b add pkg/chrootarchive and use it on the daemon
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-11 23:20:02 +02:00