Commit Graph

112 Commits

Author SHA1 Message Date
2b1cc6e037 Added missing attributes to api search calls:
- Added an argument to the call() method in order to control the auth sharing
- Enabled it only for search. Pulls and pushes were enabled already.
- Grouped a few variable declarations

Docker-DCO-1.1-Signed-off-by: Roberto Hashioka <roberto.hashioka@docker.com> (github: rogaha)
Upstream-commit: 2cfd696b9bacda67468a0a2ef93d61258781e8bc
Component: engine
2014-01-21 04:06:19 +00:00
4963d0d960 Make sure new repositories can be pushed with multiple tags
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: a2aab7757e236a895abf7b06836d8e3b84236429
Component: engine
2014-01-20 13:39:35 -08:00
a8444009df move legacy stuff outside the job
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 16ca6a1c12ffe9a02da4e823646bee6461ffbad5
Component: engine
2014-01-13 16:20:05 -08:00
29b6e8dfe9 Merge pull request #3431 from shin-/ping_standalone_check
Check standalone header when pinging a registry server.
Upstream-commit: 1d0aeae339aefb7f242035332ed553794b9dab01
Component: engine
2014-01-07 10:33:07 -08:00
656cb5bac1 Fixed registry unit tests
Upstream-commit: 5e8912e0e8537c526ee4f162bdade2656c2fa803
Component: engine
2014-01-06 21:04:44 +01:00
f5b039d329 Check standalone header when pinging a registry server. Standalone has to be true to use basic auth (in addition to previous requirements)
Upstream-commit: 589515c717616f3c2e0278ad787d21b4ab07b994
Component: engine
2014-01-02 17:51:42 +01:00
6071fba45d fix progressbar in docker push
Upstream-commit: 85f9b778f54a823566dd5d81e0e0a9875a64569d
Component: engine
2013-12-20 16:55:41 -08:00
3959a8a4bc Don't return req as result of setTokenAuth
Upstream-commit: 3f921639894d3eca72c9ae105d3ad4f386651caa
Component: engine
2013-12-03 16:32:13 +01:00
14f5d29204 missed one call to setTokenAuth
Upstream-commit: 3b5010e90bd51ba3630f48091ed70111d26dd31a
Component: engine
2013-12-03 16:32:13 +01:00
c52437abda Factorized auth token setting
Upstream-commit: ec4863ae5582d8e7a9dccb57d7f5f3e21c2481ef
Component: engine
2013-12-03 16:32:13 +01:00
99feeadcbb gofmt
Upstream-commit: a02bc8a5dbca763a2a245cf0ca17ff5a21d5b52b
Component: engine
2013-12-03 16:32:13 +01:00
37888fa7b4 Use basic auth for private registries when over HTTPS.
RequestFactory is no longer a singleton (can be different for different instances of Registry)
Registry now has an indexEndpoint member
Registry methods that needed the indexEndpoint parameter no longer do so
Registry methods will only use token auth where applicable if basic auth is not enabled.
Upstream-commit: 045989e3d824f577cd90a6386b66a5814e703766
Component: engine
2013-12-03 16:32:13 +01:00
94c476ace9 go fmt.
result of `gofmt -w -s .` without vendors.
Upstream-commit: fe72f15e4ab25cc6e96c76d2da2c379569756843
Component: engine
2013-11-29 22:20:59 -02:00
08c53cdcf1 Closing connection after ping
Upstream-commit: fe727e2a87fa086d728664c396fd44f4be6d6afd
Component: engine
2013-11-29 12:07:20 +00:00
dfa410640a update docker search to reflect future changes of the api
Upstream-commit: 02b52024328996e2028d7d953ef6a9c1e2e50744
Component: engine
2013-10-31 19:14:11 -07:00
f817417133 Removes \\n from debugf calls
Upstream-commit: 8f39f0b57da8d06386ff915511ee4d5dd55352f6
Component: engine
2013-10-25 17:50:40 -07:00
92782b4f08 registry: fix content-type for PushImageJSONIndex
Upstream-commit: d93023daa9db2b6d38f7eefc8611e8226d75bbaf
Component: engine
2013-10-22 11:56:48 -07:00
6dfdc03073 Fix some error cases where a HTTP body might not be closed
Refs #2126
Upstream-commit: e906485b07fbf32a2c38495651d907af6b229962
Component: engine
2013-10-08 15:35:00 -04:00
d2ca23a4cb fix the error message so it is the same as the regex issue #1999
Upstream-commit: 0f829bf5cf6fd05c89a8f2aac47e5eec9143b150
Component: engine
2013-09-25 11:33:09 -04:00
b28da4e1a8 Modify repository name regex to match index
Upstream-commit: 5867f9e7614e5761fdee1f5b6a607ef4f8311d7f
Component: engine
2013-09-19 20:25:00 -07:00
e26a79ce37 Prevent panic upon error pulling registry
Upstream-commit: e836b0064bc18300ca9213c749f464e52ca9d001
Component: engine
2013-09-16 16:18:25 -07:00
e60a2a9f3c Login against private registry
To improve the use of docker with a private registry the login
command is extended with a parameter for the server address.

While implementing i noticed that two problems hindered authentication to a
private registry:

1. the resolve of the authentication did not match during push
   because the looked up key was for example localhost:8080 but
   the stored one would have been https://localhost:8080

   Besides The lookup needs to still work if the https->http fallback
   is used

2. During pull of an image no authentication is sent, which
   means all repositories are expected to be private.

These points are fixed now. The changes are implemented in
a way to be compatible to existing behavior both in the
API as also with the private registry.

Update:

- login does not require the full url any more, you can login
  to the repository prefix:

  example:
  docker logon localhost:8080

Fixed corner corner cases:

- When login is done during pull and push the registry endpoint is used and
  not the central index

- When Remote sends a 401 during pull, it is now correctly delegating to
  CmdLogin

- After a Login is done pull and push are using the newly entered login data,
  and not the previous ones. This one seems to be also broken in master, too.

- Auth config is now transfered in a parameter instead of the body when
  /images/create is called.
Upstream-commit: fcee6056dc50de7698772a3049cdfa1eb0f2416f
Component: engine
2013-09-03 20:45:49 +02:00
a51aec19e0 registry: removing opaqueRequest
Upstream-commit: 0418702cfc69f3d748c7c8b00da467154944b540
Component: engine
2013-08-16 19:33:59 +02:00
6fda0862e2 hot fix display in parallel pull and go fmt
Upstream-commit: d7979ef2d0044dc7def9238f0a1aed909f0590bb
Component: engine
2013-08-15 11:42:40 +00:00
33c7b64d8e Add GitHub usernames to MAINTAINERS
Upstream-commit: 4dc04d7690a4d634d9afd93821bb8e78620c5f9f
Component: engine
2013-08-09 21:16:44 -04:00
51ecc0b473 Merge pull request #1481 from titanous/fix-sprint
Fix typo: fmt.Sprint -> fmt.Sprintf
Upstream-commit: 3d63087f78ff2ace86d5ea0331e32418914438b8
Component: engine
2013-08-09 17:28:59 -07:00
204241346e Fix typo: fmt.Sprint -> fmt.Sprintf
Upstream-commit: 3b23f02229fd3f4928934f317d41b8f497cec9a9
Component: engine
2013-08-09 19:52:05 -04:00
26c9729379 Merge pull request #1362 from dotcloud/registry_test
* Registry: Registry unit tests + mock registry
Upstream-commit: 3e6e08ce00eb7e90a5302683b71d6aaf826083ca
Component: engine
2013-08-07 15:30:07 -07:00
8b07d34a9b Merge pull request #1406 from dotcloud/1363-reduce_timeout-fix
Reduce connect and read timeout when pinging the registry (fixes issue #1363)
Upstream-commit: b6c4b325a446f9eb5829af3d6a7d0222cf0f22b6
Component: engine
2013-08-06 04:22:44 -07:00
54865cc8e5 Adapted tests to latest registry changes
Upstream-commit: 8aa9985ad07f71fa9bd3b31dde81c0da6d0dc655
Component: engine
2013-08-05 20:28:05 +02:00
67eddf7cb1 Cleanup
Upstream-commit: 2c85b964e3be0f7ca3ff513b855f7bd26b936cc9
Component: engine
2013-08-05 19:07:23 +02:00
4c19fdff39 Mock access logs don't show up in non-debug mode
Upstream-commit: 9159c819c3baf33844f0cc38a4baa0c6674e8b9a
Component: engine
2013-08-05 19:06:00 +02:00
779219a1f1 gofmt
Upstream-commit: 484ba4a8c5cd4c06330bdd5fb58f98f07619e2aa
Component: engine
2013-08-05 19:06:00 +02:00
d6b8f8b07e New registry unit tests remade from scratch, using the mock registry
Upstream-commit: 97b7b173b999c7422a3b045c3ceffa331a7239ca
Component: engine
2013-08-05 19:06:00 +02:00
4d1189a20d Mock registry: Fixed a bug where the index validation path would return a 200 status code instead of the expected 204
Upstream-commit: 29f69211c957a62f13b10036a579191a920f62a7
Component: engine
2013-08-05 19:06:00 +02:00
64f23d891d registry: Fixed a bug where token and cookie info wouldn't be sent when using LookupRemoteImage(). Fixed a bug where no error would be reported when getting a non-200 status code in GetRemoteImageLayer()
Upstream-commit: 553ce165c1235542d3a5dd526c063c7a4b9904f4
Component: engine
2013-08-05 19:05:14 +02:00
4732ba2be6 Disabled test server in the tests
Upstream-commit: 310ddec823cbeadf694c396b27b5610474f05bcc
Component: engine
2013-08-05 19:02:57 +02:00
8bf1856b5c Mocked registry: Added X-Docker-Size when fetching the layer
Upstream-commit: 6926ba558f14da4e48ff5c409a5e78f1e9e0e991
Component: engine
2013-08-05 19:02:57 +02:00
90a0202ee8 Fixed mocked registry
Upstream-commit: 97d1d6f5d20c1475b7cdfcecdf4eeba08de888bd
Component: engine
2013-08-05 19:02:57 +02:00
31aa6c5787 Implemented a Mocked version of the Registry server
Upstream-commit: 5f7abd5347fc28ff36b59a03a90dceee22e16606
Component: engine
2013-08-05 19:02:57 +02:00
438461c454 Merge pull request #1408 from dotcloud/1407-localhost_is_a_domain-fix
Always consider localhost as a domain name when parsing the FQN repos name
Upstream-commit: 1b08ab92d15765f961cb48fa764e8719a7486baf
Component: engine
2013-08-05 08:50:12 -07:00
c5da071b25 Merge pull request #1382 from monnand/650-http-utils
650 http utils and user agent field
Upstream-commit: feda3db1dd1c76d2866c2a628e28a4999b5b88da
Component: engine
2013-08-05 08:49:12 -07:00
193eaad413 Always consider localhost as a domain name when parsing the FQN repos name
Upstream-commit: c22f2617ad8ed2450d4d9dbb6e6ec39da4e51f2f
Component: engine
2013-08-04 17:59:12 -07:00
026e661083 Reduce connect and read timeout when pinging the registry (fixes issue #1363)
Upstream-commit: c860945be25c7768ee456b5a71524631ec0dddbd
Component: engine
2013-08-04 17:42:24 -07:00
3029f070e6 Return JSONError for HTTPResponse error
Upstream-commit: dae585c6e4c19817b2dbd106171728a0bb564ccc
Component: engine
2013-08-03 00:27:58 +00:00
63124b5509 reqFactory in Registry
Upstream-commit: 7dac26ce69b442d55122caa2897572d3ac8255fa
Component: engine
2013-08-02 03:08:08 -04:00
7aa4663949 Return registy status code in error
Added Details map to the JSONMessage
Upstream-commit: 3043c2641990d94298c6377b7ef14709263a4709
Component: engine
2013-07-30 23:24:31 +00:00
753746a54d Make sure the index also receives the checksums
Upstream-commit: 5b27652ac6eaf1bc4c2a16e51919ec4272a58fd6
Component: engine
2013-07-29 11:30:21 -07:00
0d6f4c9ed4 Handle extra-paremeter within checksum calculations
Upstream-commit: e3f68b22d8f0635a8c08ab56721e56dbe570a49a
Component: engine
2013-07-29 11:30:17 -07:00
e9895c9839 Refactor checksum
Upstream-commit: 8ca7b0646e6c4346075656f46847f53c2e868a3d
Component: engine
2013-07-29 11:30:17 -07:00