Commit graph

12598 commits

Author SHA1 Message Date
Derek McGowan
d094eb6f7f Get token on each request
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2015-01-15 14:05:05 -08:00
Derek McGowan
7d61255f57 Allow private V2 registry endpoints
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2015-01-15 14:05:05 -08:00
Derek McGowan
0336b0cdaa Update push and pull to registry 2.1 specification
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2015-01-15 14:05:05 -08:00
Stephen J Day
dbb4b03bfc Remove dependencies on registry packages
Because docker core cannot vendor non-master Go dependencies, we need to remove
dependencies on registry package. The definition of digest.Digest has been
changed to a string and the regular expressions have been ported from
docker-registry/common library.

We'll likely change this be dependent on the registry in the future when the
API stabilizies and use of the master branch becomes the norm.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-01-15 14:05:05 -08:00
Stephen J Day
a0f92a26d9 Registry V2 HTTP route and error code definitions
This package, ported from next-generation docker regsitry, includes route and
error definitions. These facilitate compliant V2 client implementation. The
portions of the HTTP API that are included in this package are considered to be
locked down and should only be changed through a careful change proposal.
Descriptor definitions package layout may change without affecting API behavior
until the exported Go API is ready to be locked down.

When the new registry stabilizes and becomes the master branch, this package
can be vendored from the registry.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-01-15 14:05:05 -08:00
Josh Hawn
e23362597d Update token response handling
Registry authorization token is now taken from the response body rather than
the repsonse header.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-01-15 14:05:05 -08:00
Derek McGowan
e9b590d85e Update push to use mount blob endpoint
Using mount blob prevents repushing images which have already been uploaded

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-15 14:05:05 -08:00
Derek McGowan
3e4fd00544 Use tarsum dev version to fix mtime issue
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-15 14:05:05 -08:00
Derek McGowan
bcc0a343bb Update manifest format for push
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-15 14:05:05 -08:00
Derek McGowan
188b56c836 Push flow
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-15 14:05:05 -08:00
Derek McGowan
ac8d964b28 Add trust key creation on client
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-15 14:04:14 -08:00
Josh Hawn
41e20cecb9 Adds support for v2 registry login
summary of changes:

registry/auth.go
  - More logging around the login functions
  - split Login() out to handle different code paths for v1 (unchanged logic)
    and v2 (does not currently do account creation)
  - handling for either basic or token based login attempts
registry/authchallenge.go
  - New File
  - credit to Brian Bland <brian.bland@docker.com> (github: BrianBland)
  - handles parsing of WWW-Authenticate response headers
registry/endpoint.go
  - EVEN MOAR LOGGING
  - Many edits throught to make the coad less dense. Sparse code is more
    readable code.
  - slit Ping() out to handle different code paths for v1 (unchanged logic)
    and v2.
  - Updated Endpoint struct type to include an entry for authorization
    challenges discovered during ping of a v2 registry.
  - If registry endpoint version is unknown, v2 code path is first attempted,
    then fallback to v1 upon failure.
registry/service.go
  - STILL MOAR LOGGING
  - simplified the logic around starting the 'auth' job.
registry/session.go
  - updated use of a registry.Endpoint struct field.
registry/token.go
  - New File
  - Handles getting token from the parameters of a token auth challenge.
  - Modified from function written by Brian Bland (see above credit).
registry/types.go
  - Removed 'DefaultAPIVersion' in lieu of 'APIVersionUnknown = 0'`

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-01-15 14:04:14 -08:00
Michael Crosby
3837c08022 Merge pull request #10109 from ankushagarwal/imagespec-typo
Fix typos in image spec v1
2015-01-15 08:58:29 -08:00
Ankush Agarwal
82bfb3852e Typo creating -> created
Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
2015-01-14 23:02:17 -08:00
Jessie Frazelle
ae493e721e Merge pull request #10110 from jfrazelle/fix-vfs-issue
ignore vfs from graphdriver warning
2015-01-14 19:54:17 -08:00
Jessica Frazelle
f88066fd43 ignore vfs from warning
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-14 17:28:50 -08:00
Ankush Agarwal
034466d356 Typo image -> container
Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
2015-01-14 17:18:11 -08:00
Jessie Frazelle
640e0fc578 Merge pull request #9881 from tianon/json-array-of-strings
Adjust builder to validate that JSON in Dockerfiles are arrays of strings and nothing else to match how we describe them to people (and what all our existing tests already assumed)
2015-01-14 17:13:51 -08:00
Jessie Frazelle
eaecf741f0 Merge pull request #10108 from tiborvass/carry-9989
[Carry] Fix a panic where RUN [] would be supplied
2015-01-14 17:12:59 -08:00
Michael Crosby
c126a2303f Merge pull request #10106 from icecrime/win_integration_tests
Fix some Windows integration tests
2015-01-14 17:04:49 -08:00
Victor Vieux
27f69b0777 Merge pull request #10107 from jfrazelle/9328-fix-try-start-paused-container
Error should show when trying to start a paused container.
2015-01-14 17:02:23 -08:00
Tibor Vass
3183af8b19 builder: use len() > 0 instead of != nil
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2015-01-14 16:55:56 -08:00
Erik Hollensbe
39343b8618 Fix a panic where RUN [] would be supplied.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2015-01-14 16:55:56 -08:00
Jessica Frazelle
02246d2d9f Error should show when trying to start a paused container.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-14 16:49:08 -08:00
Arnaud Porterie
e1ef33449f Take DOCKER_TEST_HOST into account
Tests no longer make the assumption that the daemon can be accessed
through unix:///var/run/docker.sock.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-01-14 16:14:27 -08:00
Alexander Morozov
95c0f07966 Merge pull request #10093 from crosbymichael/readonly-containers
Add --read-only for read only container rootfs
2015-01-14 15:56:51 -08:00
Michael Crosby
409407091a Add --readonly for read only container rootfs
Add a --readonly flag to allow the container's root filesystem to be
mounted as readonly.  This can be used in combination with volumes to
force a container's process to only write to locations that will be
persisted.  This is useful in many cases where the admin controls where
they would like developers to write files and error on any other
locations.

Closes #7923
Closes #8752

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-14 15:41:31 -08:00
Michael Crosby
3118ccc6bc Merge pull request #10101 from LK4D4/fix_vet_errors
Fix vet errors
2015-01-14 15:18:20 -08:00
Michael Crosby
73bf350d3d Merge pull request #10102 from jfrazelle/windows-fix
Add build constraint for windows
2015-01-14 15:15:46 -08:00
Jessica Frazelle
798215af24 Add build constraint.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-14 14:40:07 -08:00
Alexander Morozov
a75b02fe72 Fix format calls as suggested by vet
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-14 14:12:03 -08:00
Alexander Morozov
bb96e53b0f Fix vet error about passing Mutex by value
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-14 14:03:00 -08:00
Alexander Morozov
5ce60217f1 Calming vet about type aliases from other package
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-14 14:01:36 -08:00
Victor Vieux
f67c6d313b Merge pull request #10082 from jfrazelle/10081-fix-renaming
Renaming a container with an invalid name should fail
2015-01-14 13:12:36 -08:00
Jessica Frazelle
a92281637f Renaming a container with an invalid name should fail
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-14 12:54:23 -08:00
Michael Crosby
37b69408f8 Merge pull request #10056 from coolljt0725/add_link_accept_ID
Add --link accept container ID
2015-01-14 12:50:10 -08:00
Michael Crosby
71ab2efbfa Merge pull request #9836 from SvenDowideit/transcluded-no-sudo-note
Add a note that remote and Boot2Docker users should not type sudo
2015-01-14 12:44:53 -08:00
Jessie Frazelle
95fea08f7a Merge pull request #10072 from LK4D4/fix_mutable_net_files
Rewrite TestRunMutableNetworkFiles to avoid races
2015-01-14 11:48:46 -08:00
Tibor Vass
7d80fd6ca6 Merge pull request #10092 from docker/revert-10087-proper-netgo-thanks-rsc
Revert new netgo
2015-01-14 10:15:14 -08:00
Jessie Frazelle
e7cfb1c28b Revert "Add proper "netgo" compiling, thanks to rsc ♥"
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jfrazelle@users.noreply.github.com> (github: jfrazelle)
2015-01-14 09:55:35 -08:00
Jessie Frazelle
5136b11514 Merge pull request #10075 from LK4D4/test_for_maxcount
Test for restarting count
2015-01-14 09:17:02 -08:00
Jessie Frazelle
355415d823 Merge pull request #10086 from tianon/properly-fix-daemon-kill-on-failure
Properly fix "daemon kill" on test failure
2015-01-14 09:13:32 -08:00
Jessie Frazelle
c05e7c4135 Merge pull request #10087 from tianon/proper-netgo-thanks-rsc
Add proper "netgo" compiling, thanks to rsc ♥
2015-01-14 09:09:18 -08:00
Lei Jitang
2292167b02 Add tests for --link
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-01-14 15:25:58 +08:00
Tianon Gravi
b5aba426d4 Add proper "netgo" compiling, thanks to rsc ♥
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-01-13 21:35:21 -07:00
Alexander Morozov
79d30364c9 Test for restarting count
This test is for #10058
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-13 20:28:44 -08:00
Tianon Gravi
c18fdc3704 Properly fix "daemon kill" on test failure
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-01-13 21:12:07 -07:00
Sven Dowideit
d5df948829 Add a note that remote and Boot2Docker users should not type sudo
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
2015-01-13 21:40:14 -05:00
Jessie Frazelle
c9dab702be Merge pull request #10076 from MalteJ/ipv6-docs
IPv6 docs: The ARP cache is called NDP neighbor cache in IPv6
2015-01-13 17:05:28 -08:00
Michael Crosby
e90df7c8d2 Merge pull request #10077 from crosbymichael/parallel-image-check
Parallel image lookup
2015-01-13 17:02:49 -08:00