Commit Graph

23 Commits

Author SHA1 Message Date
Shijiang Wei 98c1a412b4 make sure the value of the dangling filter is correct
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-10-16 22:09:32 +08:00
Vincent Demeester c71a99af11 Fix filter by label for docker images
Using Config.Labels to filter images on Labels.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-08-22 14:06:48 +02:00
Vincent Demeester 4fb88d2e11 Fix #8048 : make `docker images repository:tag` work
Make command like "docker images ubuntu:14.04" work and filter out the
image with the given tag.

Closes #8048.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-08-13 08:50:09 +02: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 1f61084d83 Fix uses of "int" where "int64" should be used instead
Some structures use int for sizes and UNIX timestamps. On some
platforms, int is 32 bits, so this can lead to the year 2038 issues and
overflows when dealing with large containers or layers.

Consistently use int64 to store sizes and UNIX timestamps in
api/types/types.go. Update related to code accordingly (i.e.
strconv.FormatInt instead of strconv.Itoa).

Use int64 in progressreader package to avoid integer overflow when
dealing with large quantities. Update related code accordingly.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-31 16:31:40 -07: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 #14756
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-07-29 20:59:36 +00:00
John Howard 9001ea26e7 Fixing Image struct to no longer use Graph.
Signed-off-by:  John Howard <jhoward@microsoft.com>
2015-07-20 13:59:53 -07:00
Roman Strashkin cc955ae73c added ability to iterate over all indexes and use index.Iterate() instead of ReadDir() to walk over the graph
Signed-off-by: Roman Strashkin <roman.strashkin@gmail.com>
2015-07-07 22:13:28 +03:00
John Howard 52f4d09ffb Windows: Graph driver implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-10 14:33:11 -07:00
Vincent Demeester 10e114fb95 Replace latest log by logrus
Related to #11618 and #11614

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-07-02 16:11:52 +02: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
Victor Vieux b261ce5fb0 Revert "Fix inconsistent date formats in API"
This reverts commit 945fc9d882.

Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-14 17:31:45 -07:00
Hu Keping 945fc9d882 Fix inconsistent date formats in API
Prior to this patch, the response of
- GET /images/json
- GET /containers/json
- GET /images/(name)/history

display the Created Time as UNIX format which doesn't make sense.

These should be more readable as CLI command `docker inspect` shows.

Due to the case that an older client with a newer version daemon, we
need the version check for now.

Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-05-14 18:58:55 +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
Doug Davis 065648a832 Last step in removing engine.Tabel from api/client/*
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-06 10:55:53 -07:00
Peter Choi ae907e7af1 Changed snake case naming to camelCase
Signed-off-by: Peter Choi <phkchoi89@gmail.com>
2015-03-26 15:05:45 -06: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
Andy Goldstein a2b0c9778f Add ability to refer to image by name + digest
Add ability to refer to an image by repository name and digest using the
format repository@digest. Works for pull, push, run, build, and rmi.

Signed-off-by: Andy Goldstein <agoldste@redhat.com>
2015-03-17 10:10:42 +00:00
Darren Shepherd abb5e9a077 Set labels on container create
Signed-off-by: Darren Shepherd <darren@rancher.com>
2015-03-13 10:02:04 -07:00
Victor Vieux c6309229a0 move test to the daemon
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-16 21:49:46 +00: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: #9602

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-12-15 05:10:49 -08: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