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

57 commits

Author SHA1 Message Date
Vincent Demeester
f664f6e4b1 Use RepoTags & RepoDigest in inspect
To be coherent with /images/json (images command)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-10-22 23:00:59 +02:00
Vincent Demeester
77da5d8feb Merge pull request from vbatts/export_image_times
graph: exported images times matching creation
2015-10-01 21:50:43 +01:00
Rozhnov Alexandr
e9e68fa2d2 Added tags list to /images/:id/json api.
It closes .

Signed-off-by: Rozhnov Alexandr <nox73@ya.ru>
2015-09-10 11:55:01 +03:00
Vincent Batts
7795b1c697 graph: exported images times matching creation
the image export, that is used in `docker save` previous has just had
the layers times (atimes, mtimes) be when the save was done.
```bash
vbatts@valse ~ (master) $ docker save busybox | tar tv
drwxr-xr-x 0/0               0 2015-09-03 22:22 6ce2e90b0bc7224de3db1f0d646fe8e2c4dd37f1793928287f6074bc451a57ea/
-rw-r--r-- 0/0               3 2015-09-03 22:22 6ce2e90b0bc7224de3db1f0d646fe8e2c4dd37f1793928287f6074bc451a57ea/VERSION
-rw-r--r-- 0/0            1405 2015-09-03 22:22 6ce2e90b0bc7224de3db1f0d646fe8e2c4dd37f1793928287f6074bc451a57ea/json
-rw-r--r-- 0/0         2643968 2015-09-03 22:22 6ce2e90b0bc7224de3db1f0d646fe8e2c4dd37f1793928287f6074bc451a57ea/layer.tar
drwxr-xr-x 0/0               0 2015-09-03 22:22 8c2e06607696bd4afb3d03b687e361cc43cf8ec1a4a725bc96e39f05ba97dd55/
-rw-r--r-- 0/0               3 2015-09-03 22:22 8c2e06607696bd4afb3d03b687e361cc43cf8ec1a4a725bc96e39f05ba97dd55/VERSION
-rw-r--r-- 0/0            1346 2015-09-03 22:22 8c2e06607696bd4afb3d03b687e361cc43cf8ec1a4a725bc96e39f05ba97dd55/json
-rw-r--r-- 0/0            1024 2015-09-03 22:22 8c2e06607696bd4afb3d03b687e361cc43cf8ec1a4a725bc96e39f05ba97dd55/layer.tar
drwxr-xr-x 0/0               0 2015-09-03 22:22 cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff/
-rw-r--r-- 0/0               3 2015-09-03 22:22 cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff/VERSION
-rw-r--r-- 0/0            1181 2015-09-03 22:22 cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff/json
-rw-r--r-- 0/0            1024 2015-09-03 22:22 cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff/layer.tar
-rw-r--r-- 0/0              90 2015-09-03 22:22 repositories
```

With this change, the layer's directory and artifact will have times
matching the image layer's created time. The "repositories" file is set
to epoch.
```bash
vbatts@valse ~ (master) $ docker save busybox | tar tv
drwxr-xr-x 0/0               0 2015-04-17 18:01 6ce2e90b0bc7224de3db1f0d646fe8e2c4dd37f1793928287f6074bc451a57ea/
-rw-r--r-- 0/0               3 2015-04-17 18:01 6ce2e90b0bc7224de3db1f0d646fe8e2c4dd37f1793928287f6074bc451a57ea/VERSION
-rw-r--r-- 0/0            1405 2015-04-17 18:01 6ce2e90b0bc7224de3db1f0d646fe8e2c4dd37f1793928287f6074bc451a57ea/json
-rw-r--r-- 0/0         2643968 2015-04-17 18:01 6ce2e90b0bc7224de3db1f0d646fe8e2c4dd37f1793928287f6074bc451a57ea/layer.tar
drwxr-xr-x 0/0               0 2015-04-17 18:01 8c2e06607696bd4afb3d03b687e361cc43cf8ec1a4a725bc96e39f05ba97dd55/
-rw-r--r-- 0/0               3 2015-04-17 18:01 8c2e06607696bd4afb3d03b687e361cc43cf8ec1a4a725bc96e39f05ba97dd55/VERSION
-rw-r--r-- 0/0            1346 2015-04-17 18:01 8c2e06607696bd4afb3d03b687e361cc43cf8ec1a4a725bc96e39f05ba97dd55/json
-rw-r--r-- 0/0            1024 2015-04-17 18:01 8c2e06607696bd4afb3d03b687e361cc43cf8ec1a4a725bc96e39f05ba97dd55/layer.tar
drwxr-xr-x 0/0               0 2015-04-17 18:01 cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff/
-rw-r--r-- 0/0               3 2015-04-17 18:01 cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff/VERSION
-rw-r--r-- 0/0            1181 2015-04-17 18:01 cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff/json
-rw-r--r-- 0/0            1024 2015-04-17 18:01 cf2616975b4a3cba083ca99bc3f0bf25f5f528c3c52be1596b30f60b0b1c37ff/layer.tar
-rw-r--r-- 0/0              90 1969-12-31 19:00 repositories
```

Side effect of this is that the tar stream from `docker save` is now
more deterministic.
```bash
vbatts@valse ~ (master) $ docker save busybox | sha1sum
baf03e30ef79ca4d9c5e512d3a1b873880f404ca  -
vbatts@valse ~ (master) $ docker save busybox | sha1sum
baf03e30ef79ca4d9c5e512d3a1b873880f404ca  -
vbatts@valse ~ (master) $ docker save busybox | sha1sum
baf03e30ef79ca4d9c5e512d3a1b873880f404ca  -
vbatts@valse ~ (master) $ docker save busybox | sha1sum
baf03e30ef79ca4d9c5e512d3a1b873880f404ca  -
```

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-09-03 22:19:10 -04:00
Zhang Wei
3d6617ffe7 fix golint warnings/errors on package api/types/
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-08-07 09:43:43 +08:00
Aaron Lehmann
d4836cd7ec Documentation improvements and code cleanups for graph package
Expand the godoc documentation for the graph package.

Centralize DefaultTag in the graphs/tag package instead of defining it
twice.

Remove some unnecessary "config" structs that are only used to pass
a few parameters to a function.

Simplify the GetParentsSize function - there's no reason for it to take
an accumulator argument.

Unexport some functions that aren't needed outside the package.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-30 14:27:10 -07:00
Srini Brahmaroutu
1d6e443119 /graph fix lin errors/warnings
Addresses 
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-07-29 20:59:36 +00:00
Antonio Murdaca
c9207bc0aa Format times in inspect command with a template as RFC3339Nano
In 1.6.2 we were decoding inspect API response into interface{}.
time.Time fields were JSON encoded as RFC3339Nano in the response
and when decoded into interface{} they were just strings so the inspect
template treated them as just strings.
From 1.7 we are decoding into types.ContainerJSON and when the template
gets executed it now gets a time.Time and it's formatted as
2015-07-22 05:02:38.091530369 +0000 UTC.
This patch brings back the old behavior by typing time.Time fields
as string so they gets formatted as they were encoded in JSON -- RCF3339Nano

Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-07-26 15:25:08 +02:00
John Howard
52f4d09ffb Windows: Graph driver implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-10 14:33:11 -07:00
Vivek Goyal
407a626be6 docker-inspect: Extend docker inspect to export image/container metadata related to graph driver
Export image/container metadata stored in graph driver. Right now 3 fields
DeviceId, DeviceSize and DeviceName are being exported from devicemapper.
Other graph drivers can export fields as they see fit.

This data can be used to mount the thin device outside of docker and tools
can look into image/container and do some kind of inspection.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-06-15 14:05:10 -04:00
Derek McGowan
2b58b677a5 Separate graph from image
Move graph related functions in image to graph package.
Consolidating graph functionality is the first step in refactoring graph into an image store model.
Subsequent refactors will involve breaking up graph into multiple types with a strongly defined interface.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-06-05 18:06:09 -07:00
Antonio Murdaca
fa2c68a89e Remove engine/job from graph
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-23 23:36:29 +02:00
Simei He
2a14b7dd35 remove job from image_export
Signed-off-by: He Simei <hesimei@zju.edu.cn>
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-23 10:54:25 -07:00
Simei He
d456401fe1 remove job from push
Signed-off-by: Simei He <hesimei@zju.edu.cn>

Signed-off-by: He Simei <hesimei@zju.edu.cn>
2015-04-23 21:21:56 +08:00
Simei He
70bb0d8ed7 remove job from load
Signed-off-by: Simei He <hesimei@zju.edu.cn>

Signed-off-by: He Simei <hesimei@zju.edu.cn>
2015-04-23 19:13:12 +08:00
Alexander Morozov
79a7fedcd8 Remove image_set engine job
It was unused

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-21 13:04:28 -07:00
Antonio Murdaca
d07fe18365 Remove job image_get
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-21 21:01:09 +02:00
Antonio Murdaca
ba0017595e Remove job image_tarlayer
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-21 19:59:45 +02:00
Doug Davis
b1d8ae3824 Merge pull request from ZJU-SEL/remove_job_from_tag
remove job from tag
2015-04-19 16:02:28 -04:00
Simei He
99f6309b97 remove job from tag
Signed-off-by: Simei He <hesimei@zju.edu.cn>
2015-04-19 18:36:56 +08:00
Simei He
6e38a53f96 remove job from pull and import
Closes 

Signed-off-by: Simei He <hesimei@zju.edu.cn>

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-17 09:55:02 -07:00
Hu Keping
5c7c3fea6c Remove Job from History API
a part of issue 

Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-04-10 21:37:56 +08:00
Doug Davis
d045b9776b Remove Job from docker images
Also removes engine.Table

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-08 19:33:01 -07:00
José Tomás Albornoz
4cf5a1c2aa Remove "stupid" wording
Signed-off-by: José Tomás Albornoz <jojo@eljojo.net>
2015-04-04 15:26:45 +02:00
Antonio Murdaca
6f4d847046 Replace aliased imports of logrus, fixes
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-26 23:22:04 +01:00
Antonio Murdaca
c79b9bab54 Remove engine.Status and replace it with standard go error
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-25 22:32:08 +01:00
Jessie Frazelle
81f74caee8 Merge pull request from shishir-a412ed/cleanup_cmd_tag
cleanup of docker tag command code
2015-02-06 16:34:48 -08:00
Tibor Vass
ee0b0464c6 Merge pull request from dmcgowan/v2-manifest-save-tarsum
V2 manifest save tarsum
2015-01-30 18:22:50 -05:00
Derek McGowan
403d981d70 Revert client signature
Supports multiple tag push with daemon signature

Fixes 

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-30 14:20:32 -08:00
Josh Hawn
3414307306 Remove Checksum field from image.Image struct
The checksum is now being stored in a separate file beside the image
JSON file.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-01-30 09:37:50 -08:00
Shishir Mahajan
573cd092a5 cleanup of docker tag command code
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2015-01-26 09:15:32 -05:00
Derek McGowan
188b56c836 Push flow
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-15 14:05:05 -08:00
Doug Davis
d942c59b69 Wrap strings that could look like ints in quotes
When we use the engine/env object we can run into a situation where
a string is passed in as the value but later on when we json serialize
the name/value pairs, because the string is made up of just numbers
it appears as an integer and not a string - meaning no quotes.  This
can cause parsing issues for clients.

I tried to find all spots where we call env.Set() and the type of the
name being set might end up having a value that could look like an int
(like author). In those cases I switched it to use env.SetJson() instead
because that will wrap it in quotes.

One interesting thing to note about the testcase that I modified is that
the escaped quotes should have been there all along and we were incorrectly
letting it thru. If you look at the metadata stored for that resource you
can see the quotes were escaped and we lost them during the serialization
steps because of the env.Set() stuff.  The use of env is probably not the
best way to do all of this.

Closes: 

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-12-15 05:10:49 -08:00
Josh Hawn
059e589c34 Compute TarSum on storage of image layer content
Now, newly created/imported layers will have the checksum of
the layer diff computed and stored in the image json file.

For now, it is not an error if the computed checksum does not
match an existing checksum, only a warning message is logged. The
eventual goal is to use the checksums in the image JSON to verify
the integrity of the layer contents when doing `docker load` or
`docker pull`, and error out if it does not match.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2014-11-05 10:17:55 -08:00
Josh Hawn
26184de8ab Remove jsonData argument from image.StoreImage
The argument specified the json data to save to disk when registering
a new image into the image graph. If it is nil, then the given image
is serialized to json and that is written by default. This default
behavior is sufficient if the given image was originally deserialzed
from this jsonData to begin with which has always been the case.

Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2014-11-03 17:39:21 -08:00
Alexandr Morozov
ee7dd44c01 Mass gofmt
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-24 15:11:48 -07:00
Alexandr Morozov
7c62cee51e Use logrus everywhere for logging
Fixed 

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-24 15:03:06 -07:00
Qiang Huang
ec000cbf30 graph: add VirtualSize for inspect output
Currently inspect output just shows Size info, and that usally be
very small and even 0 which is confusing.

Fixes 

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2014-09-23 08:42:32 +08:00
Alexandr Morozov
114838cbda
Some more style fixes
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-29 15:21:28 +04:00
Daehyeok.Mun
35df24c8e6 graph: change argument order of Register function
This commit is patch for following comment
FIXME: pass img as first argument

Signed-off-by: Daehyeok.Mun <daehyeok@gmail.com>
2014-08-28 20:06:07 +09:00
Josiah Kiehl
a02f67be5b Extract log utils into pkg/log
Docker-DCO-1.1-Signed-off-by: Josiah Kiehl <josiah@capoferro.net> (github: capoferro)
2014-08-13 15:18:15 -07:00
Solomon Hykes
6856a6b110 Move "pull" and "push" to graph/pull.go and graph/push.go
This is part of the ongoing effort to remove the deprecated server/
package, and generally cleanup and simplify the codebase.

Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-08 07:25:09 +00:00
Tibor Vass
af0781974d Check error returned by eng.Register() in TagStore.Install()
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2014-08-06 17:19:01 -04:00
Solomon Hykes
d787937957 Move "image_tag" and "tag" to graph/tag.go
Note: these 2 jobs should be merged into one. This was noted in a FIXME.

Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-06 17:18:51 -04:00
Solomon Hykes
fa27580cff Move "import" to graph/import.go
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-06 17:18:50 -04:00
Solomon Hykes
f2029f7be1 Move "load" to graph/load.go
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-06 17:18:50 -04:00
Solomon Hykes
77781440f1 Move "viz" to graph/viz.go
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-06 17:18:50 -04:00
Solomon Hykes
51dd68d659 Move "images" to graph/list.go
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-06 17:18:50 -04:00
Solomon Hykes
55235e121e Move "image_history" to graph/history.go
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-06 17:18:50 -04:00
Solomon Hykes
6e28d11d1f Move "image_export" to graph/export.go
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-06 17:18:50 -04:00