Tibor Vass
73823e5e56
Add transport package to support CancelRequest
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-05-18 23:31:42 -04:00
Tibor Vass
a01cc3ca77
registry: Refactor requestfactory to use http.RoundTrippers
...
This patch removes the need for requestFactories and decorators
by implementing http.RoundTripper transports instead.
It refactors some challenging-to-read code.
NewSession now takes an *http.Client that can already have a
custom Transport, it will add its own auth transport by wrapping
it.
The idea is that callers of http.Client should not bother
setting custom headers for every handler but instead it should
be transparent to the callers of a same context.
This patch is needed for future refactorings of registry,
namely refactoring of the v1 client code.
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-05-18 21:51:53 -04:00
Nuutti Kotivuori
642e6a3773
Prevent fallback to v1 registry for digest pulls
...
The intention of the user is to download a verified image if explicitly
pulling with a digest and falling back to v1 registry circumvents that
protection.
Signed-off-by: Nuutti Kotivuori <naked@iki.fi>
2015-05-18 08:26:26 +03: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
Tibor Vass
3985f17812
Merge pull request #13131 from Microsoft/10662-loadonwindows
...
Windows: Build load.go
2015-05-12 18:04:33 -07:00
Antonio Murdaca
6b700bdaca
Refactor pkg/stremformatter with custom constructors instead of passing a boolean
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-05-13 00:09:41 +02:00
John Howard
aed8f9f76e
Windows: Build load.go
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-05-12 14:26:57 -07:00
Antonio Murdaca
7284b08204
Remove API codepaths < 1.12
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-05-12 20:09:49 +02:00
Tianon Gravi
223d6de728
Move WriteFlusher out of utils into ioutils
...
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-05-08 12:33:33 -06:00
Jessie Frazelle
f6fa579d52
Merge pull request #12270 from burnison/11294-shortidfallback
...
Only use fallback to short IDs when obvious.
2015-05-07 17:02:58 -07:00
Jessie Frazelle
d34abea15b
Merge pull request #12976 from Microsoft/10662-graphfirstchange
...
Windows: First fix for graph\graph.go
2015-05-07 16:50:20 -07:00
Jessie Frazelle
237bd23af8
Merge pull request #13059 from burke/no-fsync-on-temp-archive
...
Remove fsync in archive.NewTempArchive
2015-05-07 16:16:52 -07:00
Burke Libbey
ec66daebc2
Don't fsync on V2 registry push tempfile creation
...
Signed-off-by: Burke Libbey <burke.libbey@shopify.com>
2015-05-07 14:49:38 -04:00
Alexander Morozov
7d38d33f01
Merge pull request #12977 from Microsoft/10662-graphloadfilepath
...
Windows: Filepath in graph\load.go
2015-05-06 15:01:49 -07:00
Brian Goff
a242ceaa09
Merge pull request #12975 from Microsoft/10662-graphexportfilepath
...
Windows: graph\export.go filepath fixes
2015-05-05 21:44:57 -04:00
John Howard
3b2c8f69fd
Windows: Fix filepath vs path in push.go
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-05-04 16:18:23 -07:00
John Howard
bb1ecde164
Windows: Filepath in graph\load.go
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-05-04 15:14:39 -07:00
John Howard
b30f14f06d
Windows: First fix for graph\graph.go
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-05-04 15:06:51 -07:00
John Howard
377ed712d3
Windows: graph\export.go filepath fixes
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-05-04 14:56:23 -07:00
Tianon Gravi
576985a1dc
Finally remove our copy of "archive/tar" now that Go 1.4 is the minimum!
...
IT'S ABOUT TIME. 🎉
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-05-01 16:01:10 -06:00
Antonio Murdaca
844538142d
Small if err cleaning
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-27 21:50:33 +02:00
Jessie Frazelle
531ec3cac9
Merge pull request #12532 from ankushagarwal/eliminate-json-marshal
...
Eliminate json.Marshal from graph/export.go and volumes/volume.go
2015-04-27 13:54:20 -05:00
Antonio Murdaca
26543e0309
Replace json.Unmarshal with json.Decoder().Decode()
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-26 15:02:01 +02:00
Ankush Agarwal
29a3bbf2b3
Eliminate json.Marshal from graph/export.go and volumes/volume.go
...
Fixes #12531
Fixes #12530
Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
2015-04-24 15:40:21 -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
Jessie Frazelle
68fc79f592
Merge pull request #12655 from jlhawn/fix_12281
...
Validate repo name before image pull
2015-04-23 13:12:12 -07:00
Alexander Morozov
9ed5bfb083
Merge pull request #12636 from duglin/MoveConfig
...
Move CLI config processing out from under registry dir
2015-04-23 11:50:31 -07:00
Josh Hawn
18f4688385
Validate repo name before image pull
...
Checks for reserved 'scratch' image name.
fixes #12281
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-04-23 11:44:46 -07: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
Doug Davis
bb9da6ba92
Move CLI config processing out from under registry dir
...
No logic changes should be in here, just moving things around.
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-23 10:18:38 -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
Brian Goff
ccbb93e1cd
Merge pull request #12611 from LK4D4/remove_eng_chain_pull
...
Remove chain of engine passing from builder to loadManifest
2015-04-21 19:19:56 -04:00
Alexander Morozov
a2f74aa4b4
Remove chain of engine passing from builder to loadManifest
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-21 14:55:23 -07:00
Alexander Morozov
7ba8c3b26f
Merge pull request #12567 from brahmaroutu/integration_test6_12255
...
moving integration tests to graph unit tests
2015-04-21 13:58:02 -07:00
Brian Goff
725ea8c09e
Merge pull request #12600 from LK4D4/remove_image_set
...
Remove image_set engine job
2015-04-21 16:51:46 -04:00
Brian Goff
b098a42559
Merge pull request #12564 from LK4D4/remove_jobs_trust
...
Remove engine from trust
2015-04-21 16:49:01 -04: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
Srini Brahmaroutu
29c5596176
moving integration tests to graph unit tests
...
Addresses #12255
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-04-20 21:08:45 +00:00
David Calavera
ae4063585e
Remove engine.Job from builder.CmdBuildConfig.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-04-20 13:37:06 -07:00
Alexander Morozov
9e50bf6270
Remove engine from trust
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-20 12:48:33 -07:00
Doug Davis
b1d8ae3824
Merge pull request #12358 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
Brian Goff
055c6dbaef
Merge pull request #12490 from LK4D4/carry_12396
...
remove job from pull and import
2015-04-17 15:26:30 -04:00
Simei He
6e38a53f96
remove job from pull and import
...
Closes #12396
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
David Calavera
767df67e31
Decode container configurations into typed structures.
...
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-04-15 10:22:07 -07:00
Antonio Murdaca
c30a55f14d
Refactor utils/utils, fixes #11923
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-14 01:37:36 +02:00
Ma Shimiao
f5a07f0c88
Add event log for push
...
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-04-13 09:41:15 +08:00
Tibor Vass
563041b5c4
Merge pull request #11478 from dmcgowan/v2-vendored-api
...
Use v2 api from distribution
2015-04-10 17:22:38 -04:00
Richard Burnison
8d1a500303
Only use fallback to short IDs when obvious.
...
As reported in #11294 , the Docker daemon will execute contains it
shouldn't run in the event that a requested tag is present in an image's
ID. This leads to the wrong image being started up silently.
This change reduces the risk of such a collision by using the short ID
iff the actual revOrTag looks like a short ID (not that it necessarily
is).
Signed-off-by: Richard Burnison <rburnison@ebay.com>
2015-04-10 13:20:44 -04:00
Brian Goff
0693e34d7e
Merge pull request #12260 from HuKeping/rmjob-history
...
Remove Job from History API
2015-04-10 09:53:05 -04:00
Hu Keping
5c7c3fea6c
Remove Job from History API
...
a part of issue #12151
Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-04-10 21:37:56 +08:00
David Young
bf57339527
Add comment column in docker history command output
...
Signed-off-by: David Young <yangboh@cn.ibm.com>
2015-04-09 21:29:41 -04: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
Alexander Morozov
c9eb37f975
Remove engine usage for events
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-07 08:43:18 -07:00
Phil Estes
dec48d6708
Merge pull request #12070 from duglin/RemoveTableCLI
...
Last step in removing engine.Table from api/client/*
2015-04-06 16:33:29 -04: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
Shishir Mahajan
7d0053d554
Applying: Fix for Issue 11285: warning message displayed when updating an existing image
...
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2015-04-06 09:05:03 -04: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
Doug Davis
0b2fa9c707
Remove engine.Table from docker history and docker rmi
...
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-03 08:31:30 -07:00
Michael Crosby
03d3d79b2b
Remove jobs from registry.Service
...
This makes `registry.Service` a first class type and does not use jobs
to interact with this type.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-03-31 16:38:04 -07:00
Derek McGowan
62009ef77e
Use vendored v2 registry api
...
Update registry package to use the v2 registry api from distribution. Update interfaces to directly take in digests.
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-03-31 15:02:27 -07:00
Derek McGowan
851c64725d
Compress layers on push to a v2 registry
...
When buffering to file add support for compressing the tar contents. Since digest should be computed while writing buffer, include digest creation during buffer.
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-03-30 12:15:15 -07:00
Lei Jitang
013fb87543
Fix error from daemon no such image even when the image exist
...
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-03-28 09:07:20 +08:00
Brian Goff
da5c863d20
Merge pull request #11788 from reikani/pchoi
...
Changed snake case naming to camelCase.
2015-03-26 23:55:50 -07:00
Brian Goff
756b8f2fde
Merge pull request #11841 from runcom/11762-replace-aliased-logrus-imports
...
Replace aliased imports of logrus
2015-03-26 16:49:01 -07:00
Antonio Murdaca
6f4d847046
Replace aliased imports of logrus, fixes #11762
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-26 23:22:04 +01: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
Michal Minar
3b8d4bb82b
Consider tag updated also in case repo does not exist
...
This patch causes `The image you are pulling has been verified` status
message to be produced also when the repository is pulled for the first
time.
Signed-off-by: Michal Minar <miminar@redhat.com>
2015-03-26 12:52:56 +01:00
bobby abbott
0cd6c05d81
Fixes hacks from progressreader refactor
...
related to #10959
Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-03-25 18:21:02 -07: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
Antonio Murdaca
b80fae7356
Refactor pkg/common, Fixes #11599
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-24 18:19:59 +01:00
Derek McGowan
770e9b6b81
Enable v2 default push
...
When pushing to the official registry, v2 push will be attempted first. If the v2 endpoint is unavailable, a push to v1 will occur. If a v2 push is started and failed, the push operation will fail. Pulling non-official images the official v2 registry is also enabled to pull the newly push images. When a pull of a v2 image fails, v1 will always be attempted.
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-03-20 11:09:33 -07:00
Josh Hawn
9ececa14ba
Add verification of image manifest digests
...
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-03-20 09:34:39 -07:00
Derek McGowan
514be385f7
Support push and pull of sha256
...
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-03-17 10:50:35 -07: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
Arnaud Porterie
b6ac111abf
Merge pull request #9882 from ibuildthecloud/labels
...
Proposal: One Meta Data to Rule Them All => Labels
2015-03-16 20:20:05 -07:00
Jessie Frazelle
2550c306eb
Merge pull request #11419 from dmcgowan/fix-test-pull-verified
...
Fix test pull verified
2015-03-16 14:23:59 -07:00
Derek McGowan
636037c363
Fix test pull verified
...
Update pull code to consider any layer download or new tag as an update.
Update hello-world frozen image to be explicitly tagged as frozen, to not interfere with pull tests. The hello-world is used by pull tests because of its small size and there is no other official image with such a size.
fixes #11383
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-03-16 12:22:00 -07: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
bobby abbott
12b278d354
Remove import to utils in progressreader
...
Added method in StreamFormatter to handle calls
from progressreader. Solves #10959
Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-03-11 00:50:27 -07:00
Derek McGowan
d172f1253a
Cleanup v2 push logic
...
Manifest is now generated during a v2 push, not relying on previously generated hashes. When pushing a layer, the hash is directly calculated from the tar contents which will be pushed. Computing the hash on push ensures that the hash contents always match what is seen by the registry. This also mitigates issues with tarsum differences and permits using pure SHA digests.
Additionally the new manifest function is moved to the unit tests since it is no longer called outside the tests.
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-03-09 18:33:15 -07:00
Arnaud Porterie
2e518bc831
Merge pull request #11123 from jlhawn/pull_tempfile_copy_log_error
...
Check for error when copying v2 image blob to temp
2015-03-09 11:14:03 -07:00
Arnaud Porterie
89bdaa35e0
Remove subdirectories MAINTAINERS files
...
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-03-06 18:21:51 -08:00
Josh Hawn
6564e0ad2f
Check for error when copying v2 image blob to temp
...
The call to io.Copy was not being checked for errors at a critical point in the
pull logic. This patch will log the error value if not nil.
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-03-06 18:03:39 -08:00
Arnaud Porterie
a59b6f4ce6
Merge pull request #10425 from dmcgowan/registry-maintainers
...
Add distribution maintainers to maintainers files
2015-03-06 17:37:12 -08:00
Dan Walsh
17abfc3ddc
pass --change changes to the import job
...
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-02-24 13:01:36 -05:00
Srini Brahmaroutu
7a9c944b82
Removing dependencies from pkg into Docker internal code
...
Closes #10922
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-02-23 18:43:10 +00:00
Alexander Morozov
15bf67a998
Merge pull request #10888 from dougm/parallel-load
...
Avoid parallel layer downloads in load command
2015-02-20 11:01:40 -08:00
Srini Brahmaroutu
6871b9b16a
Removing -X flag option and autogenerated code to create Dockerversion.go functionality
...
Addresses #9207
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-02-20 05:40:12 +00:00
Doug MacEachern
de35ef2ebe
Avoid parallel layer downloads in load command
...
Signed-off-by: Doug MacEachern <dougm@vmware.com>
2015-02-19 15:46:38 -08:00
Steve Francia
a0a27e6a58
Merge pull request #10520 from dmcgowan/v2-registry-fallback-logging
2015-02-19 17:20:34 -05:00
Steve Francia
47f6001416
Merge pull request #10696 from dmcgowan/remove-nonofficial-trust-check
2015-02-19 16:09:52 -05:00
Michael Crosby
9ea20f260c
Merge pull request #10571 from jfrazelle/8689-remove-all-aliases
...
Removes the feature to pull all image aliases.
2015-02-16 10:29:20 -08:00
Michael Crosby
3eb1939b69
Merge pull request #10694 from dmcgowan/remove-push-by-id
...
Remove push by ID
2015-02-12 11:25:38 -08:00
Vivek Goyal
064ff42d6d
docker-call-close-archive-in-push-v2-image
...
pushV2Image() calls TarLayer() which returns an archive. One needs to
Close() the archive once done otherwise it will leave mounted devices
if devicemapper graph driver is being used.
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-02-11 11:30:46 -05:00
Vivek Goyal
41bfa87b6c
manifest: Close archive once done using it
...
manifest code calls TarLayer() and gets archive. This archive needs to
be closed once caller is done using it to release the resrouces held
by archive. For the devicemapper graphdriver, archive keeps a device
mounted (device which is backing the layer). If archive.Close() is not
called, that device remains mounted and later deletion of device fails
leading to various other issues.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-02-11 11:30:45 -05:00