Commit Graph

136 Commits

Author SHA1 Message Date
2b9bc2685b Use proper scheme with static registry
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 44d54ba0c299540efbfa173bf484d541e857f4ac
Component: engine
2014-04-29 02:01:07 -07:00
119b7b20d7 Merge pull request #4607 from vbatts/vbatts-static_registry
static registry support
Upstream-commit: 8a5060dba47ef9d91470c16e8ec3a9db59e60695
Component: engine
2014-04-29 11:22:44 -07:00
c1aee2c6db Merge pull request #5199 from shin-/registry_mirrors_support
Added support for multiple endpoints in X-Docker-Endpoints header
Upstream-commit: 425b3156953191707f002fb36e5f14b0355e9a3c
Component: engine
2014-04-28 17:56:57 +03:00
d47df97157 static_registry: update the test for the new struct
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 7790a77b6afeda6f223202288a89f4b431f033a0
Component: engine
2014-04-25 20:01:25 -04:00
ee1f88fe1b Added support for multiple endpoints in X-Docker-Endpoints header
Docker-DCO-1.1-Signed-off-by: Joffrey F <joffrey@docker.com> (github: shin-)
Upstream-commit: 720f3447046355329b5ba5d850caca84328182d5
Component: engine
2014-04-18 17:42:54 +02:00
680490e66c allow dot in repo name
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: d61fce9af770f0adaf4f178a5217dd46a02dd201
Component: engine
2014-04-14 23:15:38 +00:00
25edfd6bbc Added specific error message when hitting 401 over HTTP on push
Docker-DCO-1.1-Signed-off-by: Joffrey F <joffrey@docker.com> (github: shin-)
Upstream-commit: 8b2bcd9a4bddf1b99ca201d81ac0a67c2b09fbe0
Component: engine
2014-04-08 17:07:29 +02:00
72f522b288 Payload checksum now match the checksum simple
Backported for backward compatibility.

Docker-DCO-1.1-Signed-off-by: Sam Alba <sam.alba@gmail.com> (github: samalba)
Upstream-commit: de9fba71721f71f86d53cf94504b10dcea80a5bd
Component: engine
2014-03-31 18:31:15 -07:00
9681336973 Inverted layer checksum and tarsum.
The checksum of the payload has to be computed on the Gzip'ed content.

Docker-DCO-1.1-Signed-off-by: Sam Alba <sam.alba@gmail.com> (github: samalba)
Upstream-commit: 3f0886c8c3084341e9ef454bf41445cfc22efca2
Component: engine
2014-03-31 17:56:25 -07:00
60e20b5d78 Docker-DCO-1.1-Signed-off-by: Ryan Thomas <rthomas@atlassian.com> (github: rthomas)
Upstream-commit: d6c2188cae85549a40193273cb9893acefadf863
Component: engine
2014-03-28 06:31:04 +11:00
b645a0b182 Docker-DCO-1.1-Signed-off-by: Ryan Thomas <rthomas@atlassian.com> (github: rthomas)
Upstream-commit: a5ccb5b28d7e24a379f77ab7619f296aa500c8dd
Component: engine
2014-03-25 14:45:11 +11:00
6ed3664799 Harmonize / across all name-related commands/Validate images names
Docker-DCO-1.1-Signed-off-by: Djibril Koné <kone.djibril@gmail.com> (github: enokd)
Upstream-commit: 43c3ee3ba154e2480191ed3743391810f23f29af
Component: engine
2014-03-21 00:40:58 +01:00
f7f8c4ef4e use mock for search
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 9a0d7fe0182da541cc99eab9a4930616792e95c3
Component: engine
2014-03-13 17:40:34 +00:00
9b38e7b5fb registry: Info collection
roll version and standalone information into the _ping. And to support
Headers they are checked after the JSON is loaded (if there is anything
to load). To stay backwards compatible, if the _ping contents are not
able to unmarshal to RegistryInfo, do not stop, but continue with the
same behavior.

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 2b855afaeedcab3117876815ec2f8d4450a742b5
Component: engine
2014-03-11 23:36:51 -04:00
d6ddc55723 registry: make certain headers optional
For a pull-only, static registry, there only a couple of headers that
need to be optional (that are presently required.
* X-Docker-Registry-Version
* X-Docker-Size
* X-Docker-Endpoints

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 2a2c694758d6a48125cc9adf446f2054b52db201
Component: engine
2014-03-11 10:08:44 -04:00
4fcd3ec7b6 Merge auth package within registry
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
Upstream-commit: 8d88ea0c15b7ce7fd2b0b695c498a7ffa0f2bc87
Component: engine
2014-03-10 17:16:58 -07:00
7ed3338517 Remove manual http cookie management
Since docker uses cookiejar it doesn't need to manage cookies manually
anymore.
Managing cookie was duplicating it.

Docker-DCO-1.1-Signed-off-by: Fabio Falci <fabiofalci@gmail.com> (github: fabiofalci)
Upstream-commit: df9b99aca0b8a65da866aa5696b9f45df3b92e50
Component: engine
2014-03-09 02:25:19 +00:00
f917ba6a35 Merge pull request #4270 from DevTable/fixregistryauth
Fix registry auth and remove other hidden ping commands from client code
Upstream-commit: 0eeb146398470bb586ce5b3f1dff28f2f4bbaa4e
Component: engine
2014-03-03 17:34:21 -08:00
2c83e8f464 registry: Fixed unexported field
Docker-DCO-1.1-Signed-off-by: Sam Alba <sam.alba@gmail.com> (github: samalba)
Upstream-commit: a0251223cdd7a52d6ae246d37363b9d78a4d8cc3
Component: engine
2014-02-25 16:06:04 -08:00
28b09e351d registry: Removed checksumPayload from exported fields
Docker-DCO-1.1-Signed-off-by: Sam Alba <sam@docker.com> (github: samalba)
Upstream-commit: 522c0765f11569feb1dbc7facfbb802e0f1fb84e
Component: engine
2014-02-24 12:40:33 -08:00
5561829e30 registry: Fixed tests
Docker-DCO-1.1-Signed-off-by: Sam Alba <sam@docker.com> (github: samalba)
Upstream-commit: f420bb29793f0196024d21121d0ef89d2c678bdf
Component: engine
2014-02-24 09:04:27 -08:00
f208199d26 registry: Added simple checksums (sha256) for layers
Docker-DCO-1.1-Signed-off-by: Sam Alba <sam@docker.com> (github: samalba)
Upstream-commit: 8d230cf89cfe3c6c5293d7807c1bffa1cf799d6b
Component: engine
2014-02-23 18:50:04 -08:00
733cdcbf96 Fix registry auth by storing the string passed on the command line, and allowing for credential selection by normalizing on hostname. Also, remove remote ping calls from CmdPush and CmdPull.
Docker-DCO-1.1-Signed-off-by: Jake Moshenko <jake@devtable.com> (github: jakedt)
Upstream-commit: 90b0cce07b4f68d8099903f7e1470f79541f45d0
Component: engine
2014-02-20 18:32:33 -05:00
3bf67918b9 Fix login prompt on push and pull because of error message
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 0fa9199f781ecd27469ca192496ce7b8e24980b1
Component: engine
2014-02-03 11:38:34 -08:00
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