1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

74 commits

Author SHA1 Message Date
Alexander Larsson
f198ee525a Properly close archives
All archive that are created from somewhere generally have to be closed, because
at some point there is a file or a pipe or something that backs them. So, we
make archive.Archive a ReadCloser. However, code consuming archives does not
typically close them so we add an archive.ArchiveReader and use that when we're
only reading.

We then change all the Tar/Archive places to create ReadClosers, and to properly
close them everywhere.

As an added bonus we can use ReadCloserWrapper rather than EofReader in several places,
which is good as EofReader doesn't always work right. For instance, many compression
schemes like gzip knows it is EOF before having read the EOF from the stream, so the
EofCloser never sees an EOF.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-02-14 13:46:17 +01:00
Solomon Hykes
6393c38339 Move the canonical run configuration objects to a sub-package
* Config is now runconfig.Config
    * HostConfig is now runconfig.HostConfig
    * MergeConfig is now runconfig.Merge
    * CompareConfig is now runconfig.Compare
    * ParseRun is now runconfig.Parse
    * ContainerConfigFromJob is now runconfig.ContainerConfigFromJob
    * ContainerHostConfigFromJob is now runconfig.ContainerHostConfigFromJob

This facilitates refactoring commands.go and shrinks the core.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-11 20:18:46 -08:00
Michael Crosby
d277a4c0f8 Do not call Put twice and do not call it on defer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-03 16:14:02 -08:00
Michael Crosby
9b7054fd0b Do not generate all numberic truncated ids
Fixes 
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-31 17:37:13 -08:00
Alexander Larsson
bcaf6c2359 Add Put() to graphdriver API and use it
This makes all users of Put() have a corresponding call
to Get() which means we will be able to track whether
any particular ID is in use and if not unmount it.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-01-21 11:25:37 +01:00
Guillaume J. Charmes
f9359f59a8
Add dynamic os/arch detection to Images 2013-12-20 08:20:08 -08:00
Michael Crosby
697707e4af Save layersize on pull
Do not display size and virtual size on the cli.
Only display virtual size on the cli
2013-12-05 14:03:23 -08:00
Guillaume J. Charmes
19df6c32c0
Merge branch 'master' into use_utc_time
Conflicts:
	image.go
2013-11-25 19:01:13 -08:00
Guillaume J. Charmes
806abe90ba Use UTC for time 2013-11-21 16:43:36 -08:00
Michael Crosby
f7c2a00557 Merge pull request from unclejack/fix_layer_size_computation
Fix layer size computation: handle hard links correctly
2013-11-21 16:10:24 -08:00
Michael Crosby
4e0c76b321 Ensure that only the layers are compressed and not mnt points 2013-11-20 15:37:26 -08:00
Michael Crosby
8fdbf46afb Fix image size calc on initial save 2013-11-20 14:51:04 -08:00
Guillaume J. Charmes
f6629bbbd5 Merge pull request from crosbymichael/limit-dm
Prohibit more than 42 layers in the core
2013-11-19 15:42:00 -08:00
Guillaume J. Charmes
28d4cbbc59
Merge branch 'master' into creack-merge-master
Conflicts:
	api_params.go
	graph.go
	graph_test.go
	image.go
	integration/api_test.go
	integration/container_test.go
	integration/runtime_test.go
	runtime.go
2013-11-19 14:58:12 -08:00
unclejack
ac821f2446 fix layer size computation: handle hard links
This change makes docker compute layer size correctly.

The old code isn't taking hard links into account. Layers could
seem like they're up to 1-1.5x larger than they really were.
2013-11-19 13:37:54 +02:00
Michael Crosby
af753cbad8 Prohibit more than 42 layers in the core
We need to do this because we still support aufs
and users on other drivers can push incompat images
to the registory that aufs users cannot use.
2013-11-19 00:51:16 -08:00
Guillaume J. Charmes
5e941f1ca0
Lintify code with confidence=1 2013-11-18 16:24:11 -08:00
Guillaume J. Charmes
7cf60da388
Merge branch 'master' into shykes-0.6.5-dm-plugin
Conflicts:
	utils.go
	utils_test.go
2013-11-14 14:02:44 -08:00
Michael Crosby
5d9723002b Allow drivers to implement ApplyDiff in Differ interface 2013-11-11 19:09:57 -08:00
Sven Dowideit
b3974abe4f make all image ID and container ID API responses use the Long ID (Closes ) 2013-11-09 12:16:49 +10:00
Solomon Hykes
1764cf1990 Fix a bug which caused Graph.Register to fail when Graph.Mktemp() returns an existing directory. 2013-11-08 02:13:11 +00:00
Solomon Hykes
f2bab1557c Simplify graphdriver interface: Create, Get. No more external mounting or Dir/Image interface 2013-11-07 22:38:50 +00:00
Michael Crosby
ed572b457d Finalize driver interfaces 2013-11-04 20:51:12 -08:00
Solomon Hykes
98c3693acf Integrate devmapper and aufs into the common "graphdriver" framework.
aufs is still enabled by default, no mechanism for switching drivers
yet.
2013-11-04 17:28:35 +00:00
Michael Crosby
699a1074fb Initial work on moving aufs to a subpackage 2013-10-31 18:07:54 -07:00
Michael Crosby
96d1e9bb5a Move archive.go to sub package 2013-10-31 16:57:45 -07:00
Victor Vieux
8f39f0b57d Removes \\n from debugf calls 2013-10-25 17:50:40 -07:00
Guillaume J. Charmes
f6fa353dd8 Merge pull request from sridatta/new-clean-init
* Runtime: Fix to "Inject dockerinit at /.dockerinit"
2013-08-05 13:23:22 -07:00
Guillaume J. Charmes
0f134b4bf8 Remove unused parameter 2013-07-29 11:30:17 -07:00
Guillaume J. Charmes
0badda9f15 Refactor the image size storage 2013-07-29 11:30:17 -07:00
Guillaume J. Charmes
8ca7b0646e Refactor checksum 2013-07-29 11:30:17 -07:00
Victor Vieux
1c509f4350 use 0755 instead of 0700 2013-07-25 15:45:15 +00:00
Solomon Hykes
5d8efc107d + Runtime: inject dockerinit at /.dockerinit instead of overwriting /sbin/init. This makes it possible to run /sbin/init inside a container. 2013-07-17 17:13:34 -07:00
Guillaume J. Charmes
08a87d4b3b Fix - Remove bufio from Untar 2013-07-08 13:42:17 -07:00
Solomon Hykes
290b1973a9 Fix a bug which caused creation of empty images (and volumes) to crash. FIxes . 2013-06-22 12:29:42 -07:00
Victor Vieux
ddf5a1940f Merge branch 'master' into 22-add_sizes_images_and_containers-feature 2013-06-14 10:05:06 +00:00
Victor Vieux
00cf2a1fa2 fix virtual size on images 2013-06-14 10:05:01 +00:00
Victor Vieux
bf63cb9045 bump to master again 2013-06-05 16:01:36 +00:00
Victor Vieux
f67ea78cce move xino stuff to /dev/shm 2013-06-05 12:59:05 +00:00
Victor Vieux
fd224ee590 linted names 2013-06-04 18:00:22 +00:00
Victor Vieux
86ada2fa5d drop/omit 2013-06-04 13:51:12 +00:00
unclejack
2cf92abf0e add arch field to image struct 2013-05-24 21:41:30 +03:00
Victor Vieux
6fce89e60b bump to master 2013-05-22 13:41:29 +00:00
Guillaume J. Charmes
9bb3dc9843 Split registry into subpackage 2013-05-15 01:41:39 +00:00
Guillaume J. Charmes
2e69e1727b Create a subpackage for utils 2013-05-14 22:37:35 +00:00
Victor Vieux
a91b710961 add sizes in images and containers 2013-05-13 15:14:20 +02:00
Guillaume J. Charmes
44b33b44aa Factorize the checksums functions 2013-05-08 22:37:33 -07:00
Guillaume J. Charmes
aaaf3f0726 Store the actual archive when commit 2013-05-08 19:08:11 -07:00
Guillaume J. Charmes
0e23b4e10e Store the checksums when pulling a repository 2013-05-08 16:27:35 -07:00
Guillaume J. Charmes
8ff1765674 Make the checksum async within commit 2013-05-08 12:01:12 -07:00