Vincent Batts
7790a77b6a
static_registry: update the test for the new struct
...
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
2014-04-25 20:01:25 -04:00
shin-
720f344704
Added support for multiple endpoints in X-Docker-Endpoints header
...
Docker-DCO-1.1-Signed-off-by: Joffrey F <joffrey@docker.com> (github: shin-)
2014-04-18 17:42:54 +02:00
Victor Vieux
d61fce9af7
allow dot in repo name
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-04-14 23:15:38 +00:00
shin-
8b2bcd9a4b
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-)
2014-04-08 17:07:29 +02:00
Sam Alba
de9fba7172
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)
2014-03-31 18:31:15 -07:00
Sam Alba
3f0886c8c3
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)
2014-03-31 17:56:25 -07:00
Ryan Thomas
d6c2188cae
Docker-DCO-1.1-Signed-off-by: Ryan Thomas <rthomas@atlassian.com> (github: rthomas)
2014-03-28 06:31:04 +11:00
Ryan Thomas
a5ccb5b28d
Docker-DCO-1.1-Signed-off-by: Ryan Thomas <rthomas@atlassian.com> (github: rthomas)
2014-03-25 14:45:11 +11:00
Djibril Koné
43c3ee3ba1
Harmonize / across all name-related commands/Validate images names
...
Docker-DCO-1.1-Signed-off-by: Djibril Koné <kone.djibril@gmail.com> (github: enokd)
2014-03-21 00:40:58 +01:00
Victor Vieux
9a0d7fe018
use mock for search
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-03-13 17:40:34 +00:00
Vincent Batts
2b855afaee
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)
2014-03-11 23:36:51 -04:00
Vincent Batts
2a2c694758
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)
2014-03-11 10:08:44 -04:00
Guillaume J. Charmes
8d88ea0c15
Merge auth package within registry
...
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
2014-03-10 17:16:58 -07:00
Fabio Falci
df9b99aca0
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)
2014-03-09 02:25:19 +00:00
Guillaume J. Charmes
0eeb146398
Merge pull request #4270 from DevTable/fixregistryauth
...
Fix registry auth and remove other hidden ping commands from client code
2014-03-03 17:34:21 -08:00
Sam Alba
a0251223cd
registry: Fixed unexported field
...
Docker-DCO-1.1-Signed-off-by: Sam Alba <sam.alba@gmail.com> (github: samalba)
2014-02-25 16:06:04 -08:00
Sam Alba
522c0765f1
registry: Removed checksumPayload from exported fields
...
Docker-DCO-1.1-Signed-off-by: Sam Alba <sam@docker.com> (github: samalba)
2014-02-24 12:40:33 -08:00
Sam Alba
f420bb2979
registry: Fixed tests
...
Docker-DCO-1.1-Signed-off-by: Sam Alba <sam@docker.com> (github: samalba)
2014-02-24 09:04:27 -08:00
Sam Alba
8d230cf89c
registry: Added simple checksums (sha256) for layers
...
Docker-DCO-1.1-Signed-off-by: Sam Alba <sam@docker.com> (github: samalba)
2014-02-23 18:50:04 -08:00
Jake Moshenko
90b0cce07b
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)
2014-02-20 18:32:33 -05:00
Michael Crosby
0fa9199f78
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)
2014-02-03 11:38:34 -08:00
Roberto G. Hashioka
2cfd696b9b
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)
2014-01-21 04:06:19 +00:00
Michael Crosby
a2aab7757e
Make sure new repositories can be pushed with multiple tags
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-01-20 13:39:35 -08:00
Victor Vieux
16ca6a1c12
move legacy stuff outside the job
...
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-13 16:20:05 -08:00
Michael Crosby
1d0aeae339
Merge pull request #3431 from shin-/ping_standalone_check
...
Check standalone header when pinging a registry server.
2014-01-07 10:33:07 -08:00
shin-
5e8912e0e8
Fixed registry unit tests
2014-01-06 21:04:44 +01:00
shin-
589515c717
Check standalone header when pinging a registry server. Standalone has to be true to use basic auth (in addition to previous requirements)
2014-01-02 17:51:42 +01:00
Victor Vieux
85f9b778f5
fix progressbar in docker push
2013-12-20 16:55:41 -08:00
shin-
3f92163989
Don't return req as result of setTokenAuth
2013-12-03 16:32:13 +01:00
shin-
3b5010e90b
missed one call to setTokenAuth
2013-12-03 16:32:13 +01:00
shin-
ec4863ae55
Factorized auth token setting
2013-12-03 16:32:13 +01:00
shin-
a02bc8a5db
gofmt
2013-12-03 16:32:13 +01:00
shin-
045989e3d8
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.
2013-12-03 16:32:13 +01:00
Andrews Medina
fe72f15e4a
go fmt.
...
result of `gofmt -w -s .` without vendors.
2013-11-29 22:20:59 -02:00
cressie176
fe727e2a87
Closing connection after ping
2013-11-29 12:07:20 +00:00
Victor Vieux
02b5202432
update docker search to reflect future changes of the api
2013-10-31 19:14:11 -07:00
Victor Vieux
8f39f0b57d
Removes \\n from debugf calls
2013-10-25 17:50:40 -07:00
Johan Euphrosine
d93023daa9
registry: fix content-type for PushImageJSONIndex
2013-10-22 11:56:48 -07:00
Jonathan Rudenberg
e906485b07
Fix some error cases where a HTTP body might not be closed
...
Refs #2126
2013-10-08 15:35:00 -04:00
Ken Cochrane
0f829bf5cf
fix the error message so it is the same as the regex issue #1999
2013-09-25 11:33:09 -04:00
Michael Crosby
5867f9e761
Modify repository name regex to match index
2013-09-19 20:25:00 -07:00
Guillaume J. Charmes
e836b0064b
Prevent panic upon error pulling registry
2013-09-16 16:18:25 -07:00
Marco Hennings
fcee6056dc
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.
2013-09-03 20:45:49 +02:00
shin-
0418702cfc
registry: removing opaqueRequest
2013-08-16 19:33:59 +02:00
Victor Vieux
d7979ef2d0
hot fix display in parallel pull and go fmt
2013-08-15 11:42:40 +00:00
Jonathan Rudenberg
4dc04d7690
Add GitHub usernames to MAINTAINERS
2013-08-09 21:16:44 -04:00
Michael Crosby
3d63087f78
Merge pull request #1481 from titanous/fix-sprint
...
Fix typo: fmt.Sprint -> fmt.Sprintf
2013-08-09 17:28:59 -07:00
Jonathan Rudenberg
3b23f02229
Fix typo: fmt.Sprint -> fmt.Sprintf
2013-08-09 19:52:05 -04:00
Guillaume J. Charmes
3e6e08ce00
Merge pull request #1362 from dotcloud/registry_test
...
* Registry: Registry unit tests + mock registry
2013-08-07 15:30:07 -07:00
Victor Vieux
b6c4b325a4
Merge pull request #1406 from dotcloud/1363-reduce_timeout-fix
...
Reduce connect and read timeout when pinging the registry (fixes issue #1363 )
2013-08-06 04:22:44 -07:00
shin-
8aa9985ad0
Adapted tests to latest registry changes
2013-08-05 20:28:05 +02:00
shin-
2c85b964e3
Cleanup
2013-08-05 19:07:23 +02:00
shin-
9159c819c3
Mock access logs don't show up in non-debug mode
2013-08-05 19:06:00 +02:00
shin-
484ba4a8c5
gofmt
2013-08-05 19:06:00 +02:00
shin-
97b7b173b9
New registry unit tests remade from scratch, using the mock registry
2013-08-05 19:06:00 +02:00
shin-
29f69211c9
Mock registry: Fixed a bug where the index validation path would return a 200 status code instead of the expected 204
2013-08-05 19:06:00 +02:00
shin-
553ce165c1
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()
2013-08-05 19:05:14 +02:00
Sam Alba
310ddec823
Disabled test server in the tests
2013-08-05 19:02:57 +02:00
Sam Alba
6926ba558f
Mocked registry: Added X-Docker-Size when fetching the layer
2013-08-05 19:02:57 +02:00
Sam Alba
97d1d6f5d2
Fixed mocked registry
2013-08-05 19:02:57 +02:00
Sam Alba
5f7abd5347
Implemented a Mocked version of the Registry server
2013-08-05 19:02:57 +02:00
Victor Vieux
1b08ab92d1
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
2013-08-05 08:50:12 -07:00
Victor Vieux
feda3db1dd
Merge pull request #1382 from monnand/650-http-utils
...
650 http utils and user agent field
2013-08-05 08:49:12 -07:00
Sam Alba
c22f2617ad
Always consider localhost as a domain name when parsing the FQN repos name
2013-08-04 17:59:12 -07:00
Sam Alba
c860945be2
Reduce connect and read timeout when pinging the registry (fixes issue #1363 )
2013-08-04 17:42:24 -07:00
Michael Crosby
dae585c6e4
Return JSONError for HTTPResponse error
2013-08-03 00:27:58 +00:00
Nan Monnand Deng
7dac26ce69
reqFactory in Registry
2013-08-02 03:08:08 -04:00
Michael Crosby
3043c26419
Return registy status code in error
...
Added Details map to the JSONMessage
2013-07-30 23:24:31 +00:00
Guillaume J. Charmes
5b27652ac6
Make sure the index also receives the checksums
2013-07-29 11:30:21 -07:00
Guillaume J. Charmes
e3f68b22d8
Handle extra-paremeter within checksum calculations
2013-07-29 11:30:17 -07:00
Guillaume J. Charmes
8ca7b0646e
Refactor checksum
2013-07-29 11:30:17 -07:00
Guillaume J. Charmes
3425c1b84c
Make sure the cookie is used in all registry queries
2013-07-25 12:31:23 -07:00
Nan Monnand Deng
ede1e6d475
Rename: VersionChecker->VersionInfo.
2013-07-23 17:05:13 -04:00
Nan Monnand Deng
cd209f406e
documentation.
2013-07-18 14:22:49 -04:00
Nan Monnand Deng
73e79a3310
reduce the number of string copy operations.
2013-07-10 18:59:43 -04:00
Nan Monnand Deng
34cf976866
format in the user agent header should follow RFC 2616
2013-07-10 18:59:43 -04:00
Nan Monnand Deng
e832b01349
Removed an unnecessary nil assignment
2013-07-10 18:56:49 -04:00
Nan Monnand Deng
26c8eae6fe
Removed an unnecessary error check.
2013-07-10 18:56:49 -04:00
Nan Monnand Deng
d40efc4648
added client's kernel version
2013-07-10 18:56:49 -04:00
Nan Monnand Deng
1bb8f60d5a
inserted setUserAgent in each HTTP request
2013-07-10 18:49:01 -04:00
Nan Monnand Deng
1d01189f04
Added version checker interface
2013-07-10 18:49:01 -04:00
Sam Alba
316c8328aa
Hardened repos name validation
2013-07-09 16:46:55 -07:00
Sam Alba
f44eac49fa
Fixed potential security issue (never try http on official index when polling the endpoint). Also fixed local repos name when pulling index.docker.io/foo/bar
2013-07-09 11:30:12 -07:00
Sam Alba
283ebf3ff9
fmt.Errorf instead of errors.New
2013-07-05 14:56:56 -07:00
Sam Alba
4c174e0bfb
Fixed ping URL
2013-07-05 14:55:48 -07:00
Sam Alba
57a6c83547
Allowing namespaces in standalone registry
2013-07-05 14:30:43 -07:00
Sam Alba
cfc7684b7d
Restoring old changeset lost by previous merge
2013-07-05 12:37:07 -07:00
Sam Alba
be49f0a118
Merging from master
2013-07-05 12:27:10 -07:00
Sam Alba
66a9d06d9f
Adding support for nicer URLs to support standalone registry (+ some registry code cleaning)
2013-07-05 12:20:58 -07:00
Caleb Spare
19121c16d9
Implement several golint suggestions, including:
...
* Removing type declarations where they're inferred
* Changing Url -> URL, Id -> ID in names
* Fixing snake-case names
2013-07-03 14:36:04 -07:00
Tobias Schwab
9632cf09bf
fix two obvious bugs???
2013-07-02 22:11:03 +00:00
Sam Alba
893c974b08
Resolve conflict
2013-06-28 12:32:41 -07:00
shin-
72befeef24
Fixed issue in registry.GetRemoteTags
2013-06-28 18:42:37 +02:00
Guillaume J. Charmes
57d751c377
Remove https prefix from registry
2013-06-28 18:19:58 +02:00
shin-
50075106b6
Rolled back of previous commit (skip cert verification)
2013-06-28 18:19:58 +02:00
shin-
1c817913ee
Skip certificate check (don't error out on self-signed certs)
2013-06-28 18:19:58 +02:00
shin-
de0a48bd6f
Tentative support for independent registries
2013-06-28 18:19:58 +02:00
Sam Alba
3175e56ad0
URL schemes of both Registry and Index are now consistent
2013-06-27 17:55:17 -07:00
Solomon Hykes
e43323221b
Merge branch 'master' into simpler-build-upload
...
Conflicts:
api.go
builder_client.go
commands.go
2013-06-20 14:19:09 -07:00
Victor Vieux
5f93aa0ecf
rebase master
2013-06-20 13:56:36 +00:00
shin-
0312bbc535
Use opaque requests when we need to preserve urlencoding in registry requests
2013-06-19 13:49:45 -07:00
Guillaume J. Charmes
a7e14a3065
hotfix: nil pointer uppon some registry error
2013-06-19 11:08:19 -07:00
Victor Vieux
fde82f448f
use go 1.1 cookiejar and revome ResetClient
2013-06-17 18:13:40 +00:00
Guillaume J. Charmes
60fd7d686d
Merge branch 'master' into improve_progressbar_pull
2013-06-14 12:01:40 -07:00
Guillaume J. Charmes
78e4a385f7
Merge branch 'master' into postupload-endpoints-header
...
Conflicts:
server.go
2013-06-14 11:50:58 -07:00
shin-
db3242e4bb
Send X-Docker-Endpoints header when validating the images upload with the index at the end of a push
2013-06-10 11:21:56 -07:00
Guillaume J. Charmes
f355d33b5f
Make the progressbar take the image size into consideration
2013-06-06 18:16:16 -07:00
Victor Vieux
c906239220
bump to master
2013-06-05 10:23:45 +00:00
Guillaume J. Charmes
c1ee9bf881
Merge pull request #808 from dotcloud/795-lintify
...
Cleanup source
2013-06-04 14:20:38 -07:00
Victor Vieux
fd224ee590
linted names
2013-06-04 18:00:22 +00:00
Victor Vieux
06b585ce8a
fix proxy
2013-06-04 15:44:27 +00:00
Victor Vieux
b6825f98c0
bump to master
2013-06-04 14:00:18 +00:00
Victor Vieux
86ada2fa5d
drop/omit
2013-06-04 13:51:12 +00:00
Sam Alba
cff3b37a61
Disabled HTTP keep-alive in the default HTTP client for Registry calls
2013-06-03 14:42:21 -07:00
Guillaume J. Charmes
82dd963e08
Minor changes in registry.go
2013-06-03 12:20:52 -07:00
Sam Alba
830c458fe7
Fixed missing Body.Close when doing some HTTP requests. It should improve some request issues.
2013-06-03 12:14:57 -07:00
Victor Vieux
49e656839f
move auth to the client WIP
2013-05-30 15:39:43 +00:00
Guillaume J. Charmes
08e5f12954
Merge pull request #739 from dotcloud/push_issue-1
...
- Registry: Cereate a new registry object for each request (~session)
2013-05-29 09:22:12 -07:00
Solomon Hykes
24ddfe3f25
Documented who decides what and how.
2013-05-28 19:39:09 -07:00
Guillaume J. Charmes
cd0de83917
Cereate a new registry object for each request (~session)
2013-05-28 17:12:24 -07:00
Victor Vieux
1f23b4caae
fix docker login when same username
2013-05-24 14:23:43 +00:00
Guillaume J. Charmes
08121c8f6b
Update Push to reflect the correct API
2013-05-16 14:33:29 -07:00
Guillaume J. Charmes
f29e5dc8a1
Remove hijack from api when not necessary
2013-05-16 12:09:06 -07:00
Guillaume J. Charmes
1b04ccf62c
Disable registry unit tests
2013-05-15 17:57:53 -07:00
Guillaume J. Charmes
10e19e4b97
Update tests to reflect new AuthConfig
2013-05-15 17:31:11 -07:00
Guillaume J. Charmes
95dd6d31a4
Move authConfig from runtime to registry
2013-05-15 17:17:33 -07:00
Guillaume J. Charmes
bb85ce9aff
Allow to change login
2013-05-15 13:39:24 -07:00
Guillaume J. Charmes
dc9d6c1c1f
Upload images only when necessary
2013-05-15 13:22:57 -07:00
Guillaume J. Charmes
97880a223e
Move httpClient within registry object
2013-05-15 19:22:08 +00:00
Guillaume J. Charmes
398a6317a0
Remove stdout from registry
2013-05-15 18:50:52 +00:00
Guillaume J. Charmes
49b61af1f8
Refactor registry Push
2013-05-15 18:30:40 +00:00
Guillaume J. Charmes
828d1aa507
Begin to implement push with new project structure
2013-05-15 03:27:15 +00:00
Guillaume J. Charmes
9bb3dc9843
Split registry into subpackage
2013-05-15 01:41:39 +00:00