Commit Graph

202 Commits

Author SHA1 Message Date
1b58e19e34 Fix login command
Signed-off-by: Tibor Vass <teabee89@gmail.com>
Upstream-commit: 05c18a2434ab7bd68a86c87fe866bc7107ac1941
Component: engine
2014-10-30 19:44:44 -04:00
6d16ddef35 Do not verify certificate when using --insecure-registry on an HTTPS registry
Signed-off-by: Tibor Vass <teabee89@gmail.com>

Conflicts:
	registry/registry.go
	registry/registry_test.go
	registry/service.go
	registry/session.go

Conflicts:
	registry/endpoint.go
	registry/registry.go
Upstream-commit: 6a1ff022b0744213ed588d9c16dbb13ce055eda6
Component: engine
2014-10-30 19:44:09 -04:00
ff11c586b2 Don't hard code true for auth job
Signed-off-by: Michael Crosby <michael@docker.com>

Conflicts:
	registry/service.go
Upstream-commit: afade4236d3f15704653132c364d6e7ccc975f8b
Component: engine
2014-10-30 19:41:55 -04:00
2339e91d29 Refactor IsSecure change
Fix issue with restoring the tag store and setting static configuration
from the daemon. i.e. the field on the TagStore struct must be made
internal or the json.Unmarshal in restore will overwrite the insecure
registries to be an empty struct.

Signed-off-by: Michael Crosby <michael@docker.com>

Conflicts:
	graph/pull.go
	graph/push.go
	graph/tags.go
Upstream-commit: f29b2e48ebfb171f58375b6e355910fc2192aceb
Component: engine
2014-10-30 19:41:55 -04:00
6b54bde512 make http usage for registry explicit
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)

Conflicts:
	daemon/config.go
	daemon/daemon.go
	graph/pull.go
	graph/push.go
	graph/tags.go
	registry/registry.go
	registry/service.go
Upstream-commit: 380c8320a78dc16da65d9d13004422ac5a0cca53
Component: engine
2014-10-30 19:41:55 -04:00
6c8d4b4efb Merge pull request #8387 from vbatts/vbatts-registry_test_enpoint
registry/endpoint: make it testable
Upstream-commit: 265a89a605ad6cdbd6abb85804644f4fd3f30050
Component: engine
2014-10-29 13:36:17 -07:00
2bfa151ffc Merge pull request #8669 from monsterzz/8668-dualstack-registry
Use dual-stack Dialer when talking to registy
Upstream-commit: 565340c90c2e3402369224450807a047481d9efa
Component: engine
2014-10-29 12:03:12 -07:00
fbef49310d Fix error on successful login.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 35703d4f0c79e936bbff1804167ae9e8dde9b76c
Component: engine
2014-10-28 17:42:03 -07:00
5db49e8c8b excluding unused transformation to []byte
Signed-off-by: Igor Dolzhikov <bluesriverz@gmail.com>
Upstream-commit: b65eb8d215576516b1d4bbb537968f08bbc8ff0e
Component: engine
2014-10-28 01:04:36 +06:00
bad39206ea Mass gofmt
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: ee7dd44c017458c8fe0be8e09569b1238366dca3
Component: engine
2014-10-24 15:11:48 -07:00
2d56e3cbc6 Use logrus everywhere for logging
Fixed #8761

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 7c62cee51edc91634046b4faa6c6f1841cd53ec1
Component: engine
2014-10-24 15:03:06 -07:00
5224a151c8 registry/endpoint: make it testable
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 3eba719400d5016aa0cbecbed1e222f810237b5b
Component: engine
2014-10-24 16:27:17 -04:00
d1d44d2d21 Merge pull request #8423 from unclejack/lint_changes
lint changes part 1
Upstream-commit: 9df3e45ba985a6ed7e9a07b308d56d694d1c13ad
Component: engine
2014-10-21 12:15:58 -04:00
db8dd3c6e0 Use dual-stack Dialer when talking to registy
Signed-off-by: Gleb M. Borisov <borisov.gleb@gmail.com>
Upstream-commit: fdd2abe7b34f15fbe5ec64309e9d700ba2e66e65
Component: engine
2014-10-21 03:59:11 +04:00
87dffd42be On Red Hat Registry Servers we return 404 on certification errors.
We do this to prevent leakage of information, we don't want people
to be able to probe for existing content.

According to RFC 2616, "This status code (404) is commonly used when the server does not
wish to reveal exactly why the request has been refused, or when no other response i
is applicable."

https://www.ietf.org/rfc/rfc2616.txt

10.4.4 403 Forbidden

   The server understood the request, but is refusing to fulfill it.
   Authorization will not help and the request SHOULD NOT be repeated.
   If the request method was not HEAD and the server wishes to make
   public why the request has not been fulfilled, it SHOULD describe the
   reason for the refusal in the entity.  If the server does not wish to
   make this information available to the client, the status code 404
   (Not Found) can be used instead.

10.4.5 404 Not Found

   The server has not found anything matching the Request-URI. No
   indication is given of whether the condition is temporary or
   permanent. The 410 (Gone) status code SHOULD be used if the server
   knows, through some internally configurable mechanism, that an old
   resource is permanently unavailable and has no forwarding address.
   This status code is commonly used when the server does not wish to
   reveal exactly why the request has been refused, or when no other
   response is applicable.

When docker is running through its certificates, it should continue
trying with a new certificate even if it gets back a 404 error code.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 69fe3e1a3493e53acb2da7220764bd3807415ea2
Component: engine
2014-10-20 13:20:48 -04:00
8091e3851f Avoid fallback to SSL protocols < TLS1.0
Signed-off-by: Tibor Vass <teabee89@gmail.com>

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
Upstream-commit: 7a062b2b8f7751fbb926e6ddc9f7df8a1b281eb6
Component: engine
2014-10-15 22:39:51 -04:00
0ae83cbb52 Support tarsum dev version to fix issue with mtime
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 73a9089306ac1ed25c594e54c9b2a11a0ac8e610
Component: engine
2014-10-10 16:04:29 -07:00
5ab2b8482f Update manifest format to rename blobsums and use arrays of dictionaries
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 15d5c7f10f56faeaa04f6374341e1cfd3e03cab1
Component: engine
2014-10-10 16:04:29 -07:00
045011f555 Use direct registry url
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: a152f37674df3f2a31e60cbfb764fa348333e805
Component: engine
2014-10-10 16:04:28 -07:00
3baf5d2249 registry: lint
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: ae3b59c1715840ba322fbe19002994e717b10b48
Component: engine
2014-10-06 22:34:39 +03:00
1510f709b8 Add comment for permission and fix wrong format variable
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 22e59009e491dc8b32b512e0d2297662d278af45
Component: engine
2014-10-02 17:41:57 -07:00
4d78f5d6d8 Add provenance pull flow for official images
Add support for pulling signed images from a version 2 registry.
Only official images within the library namespace will be pull from the
new registry and check the build signature.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 7c88e8f13d9f0c68de6da0cd467a541231304dd5
Component: engine
2014-10-01 18:26:06 -07:00
082c35423e registry: getting Endpoint ironned out
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 61c6f206b073159c5463a083e0d04e5934351dfe
Component: engine
2014-10-01 13:19:40 -07:00
8a28fc553b Replace get.docker.io -> get.docker.com and test.docker.io -> test.docker.com
Signed-off-by: Tibor Vass <teabee89@gmail.com>
Upstream-commit: 808257654a4147ad9b54cfeddc5d0ad236c26e3f
Component: engine
2014-09-24 18:53:27 -04:00
b4607092ee Refactor all pre-compiled regexp to package level vars
Addresses #8057

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: 4119c9d7d955757092adc3410da8d75f972bd3c1
Component: engine
2014-09-16 12:57:44 -04:00
5f275ccb1b TarSum: versioning
This introduces Versions for TarSum checksums.
Fixes: https://github.com/docker/docker/issues/7526

It preserves current functionality and abstracts the interface for
future flexibility of hashing algorithms. As a POC, the VersionDev
Tarsum does not include the mtime in the checksum calculation, and would
solve https://github.com/docker/docker/issues/7387 though this is not a
settled Version is subject to change until a version number is assigned.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 747f89cd327db9d50251b17797c4d825162226d0
Component: engine
2014-09-10 15:41:52 -04:00
0ece639e47 Merge pull request #7862 from Gandi/bugfixes/segfault-registry-session
Fix SEGFAULT if dns resolv error
Upstream-commit: 7bb5ec3be6f3f52cd1aa65e4be20a6d6526a1d3a
Component: engine
2014-09-08 11:38:34 -07:00
6dc15f86be Merge pull request #7609 from ewindisch/max_imgname
Restrict length of repository names
Upstream-commit: 18edea2a6f5b01e38e3189dbec54566ad4a67f4f
Component: engine
2014-09-08 11:06:54 -07:00
64908e2dd5 Fix SEGFAULT if dns resolv error
Per registry.doRequest, res and client might be nil in case of error
For example, dns resolution errors, /etc/docker/certs.d perms, failed
loading of x509 cert ...
This will make res.StatusCode and res.Body SEGFAULT.

Signed-off-by: Arthur Gautier <baloo@gandi.net>
Upstream-commit: 3e6c69e5a1dbb428c4a62656f96cfe77c19986f9
Component: engine
2014-09-05 13:40:06 +02:00
e62472c6f3 registry/session: fix panic in GetRemoteImageLayer
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 9c413e3e6f1c6bd6abada707c442862049d29743
Component: engine
2014-09-03 17:26:56 +03:00
94a36f4c63 Restrict repository names from matching hexadecimal strings
To avoid conflicting with layer IDs, repository names must
not be tagged with names that collide with hexadecimal strings.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: 0bd1c05e5c36799e0740a155092be0c9c417f175
Component: engine
2014-08-27 13:46:10 -04:00
0f8e8a7de5 Merge pull request #7740 from LK4D4/registry_style
Style fixes for registry/registry.go
Upstream-commit: 1385b2d2935c0d20e6406a80c62615a8c4cdbcc9
Component: engine
2014-08-26 18:02:11 -07:00
b5fb241c16 Style fixes for registry/registry.go
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 45a2923874a9b1f70674e627d0d112851d5982a8
Component: engine
2014-08-26 12:28:40 +04:00
579f334a23 fix return values in registry mock service
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: e81b68692408ef717c2228986cc74102cae55772
Component: engine
2014-08-25 10:29:38 -07:00
06081e86de Expand hostname before passing it to NewRegistry()
Signed-off-by: Daniel Menet <membership@sontags.ch>
Upstream-commit: 676308b853a43bb7be4838e937ab4effff670b1a
Component: engine
2014-08-16 14:25:46 +02:00
bc706dc232 Enable docker search on private docker registry.
The cli interface works similar to other registry related commands:

  docker search foo

... searches for foo on the official hub

  docker search localhost:5000/foo

... does the same for the private reg at localhost:5000

Signed-off-by: Daniel Menet <membership@sontags.ch>
Upstream-commit: 3231033a80451adff73b53554e27fbabfebb4a4f
Component: engine
2014-08-16 14:24:32 +02:00
b8d5783511 move utils.Fataler to pkg/log.Fataler
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: ac63d925d2618e700d117c5d9e402ccc0c5cecc8
Component: engine
2014-08-13 15:32:41 -07:00
4737f7cea5 Extract log utils into pkg/log
Docker-DCO-1.1-Signed-off-by: Josiah Kiehl <josiah@capoferro.net> (github: capoferro)
Upstream-commit: a02f67be5b17da63d475e6f35956c1e72c3b2e7b
Component: engine
2014-08-13 15:18:15 -07:00
955bae5653 registry.Registry -> registry.Session
renaming this struct to more clearly be session, as that is what it
handles.

Splitting out files for easier readability.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 752dd707ac09cdcd88307b28aa9e39ac7c763b44
Component: engine
2014-08-13 09:27:43 -04:00
be277e6761 Merge pull request #7324 from erikh/move_tarsum
Move tarsum to pkg/
Upstream-commit: 531f5907d64ff56b0beea1de11d65885e29ee5ad
Component: engine
2014-07-31 16:56:24 -04:00
8be33461d7 Remove CheckSum from utils; replace with a TeeReader
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: ef6b78f7db890a79b40484fd892ff486017ff2e9
Component: engine
2014-07-30 11:23:43 -07:00
5a8e5fe7dc utils/tarsum* -> pkg/tarsum
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 1219e458d105461fd7de23fa4b04a1233f61f8a4
Component: engine
2014-07-30 06:42:12 -07:00
e25f77248d Move parsing functions to pkg/parsers and the specific kernel handling
functions to pkg/parsers/kernel, and parsing filters to
pkg/parsers/filter. Adjust imports and package references.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 4398108433121ce2ac9942e607da20fa1680871a
Component: engine
2014-07-29 13:09:10 -07:00
b7f9603931 move resumablerequestreader to pkg
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: c0517857f64d1148d02809e3ba3dd39bf8322ed3
Component: engine
2014-07-29 16:30:45 +03:00
6ae4c9014c update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: b3ee9ac74e171e00f14027e39278013629e681b8
Component: engine
2014-07-24 22:19:50 +00:00
a8f0d4ce31 Merge pull request #6727 from unclejack/improve_bytes_range
Improve layer downloading
Upstream-commit: 683038bf57ce56c2f8eb433eb9bd00b2c17cae92
Component: engine
2014-07-23 15:31:25 -04:00
0f53a7cb8b Merge pull request #7146 from dmp42/master
Joining registry maintainers
Upstream-commit: b7ff33f73c258d8c2a8ffba8f6abb46114328a58
Component: engine
2014-07-21 17:02:52 -07:00
f24b5ec2fa Joining registry maintainers
Docker-DCO-1.1-Signed-off-by: Olivier Gambier <olivier@docker.com> (github: dmp42)
Upstream-commit: ebc05cbbea55d6a77f1ba159b7df4c4a9c6468f3
Component: engine
2014-07-22 01:50:32 +02:00
903a38086f Merge pull request #7050 from Aigeruth/fix/push_image_layer_registry_content_type
Add Content-Type header in PushImageLayerRegistry
Upstream-commit: b752e7402aa635b858c8559ae17080f66816bf92
Component: engine
2014-07-21 15:07:01 -04:00
43007a03a7 get layer: remove HEAD req & pass down response
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: c47ebe7a351bc639028cd48aed9d2fa2310a2a65
Component: engine
2014-07-21 20:21:18 +03:00