Commit graph

1585 commits

Author SHA1 Message Date
Arthur Baars
d3d40a8807 GCS driver: fix retry function
Signed-off-by: Arthur Baars <arthur@semmle.com>
2016-01-06 17:57:22 +00:00
Stephen Day
74d719d83f Merge pull request #1249 from k4leung4/print-error-msg
Print error for failed HTTP auth request.
2016-01-05 12:23:05 -08:00
Stephen Day
f277c660ae Merge pull request #1316 from dmcgowan/fix-janky-integration-tests
Fix broken daemon startup with master
2016-01-04 17:51:51 -08:00
Derek McGowan
8d1c44f148 Fix broken daemon startup with master
Since the daemon flag was deprecated and replaced by the daemon subcommand, the run engine should use the subcommand and only the flag for older versions

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-01-04 16:32:12 -08:00
Sven Dowideit
a580dae06f Merge pull request #1310 from thaJeztah/fix-hugo-linting
docs: mark manifest as "draft"
2016-01-04 18:44:11 +10:00
Stephen Day
0e73b8a37f Merge pull request #1097 from hopkings2008/master
use the scheme and host from x-forward-proto and x-forward-host if the…
2015-12-30 16:35:20 -08:00
Sebastiaan van Stijn
ef006ca1a1 docs: mark manifest as "draft"
Markdown linter produced an error on this page;

    running markdownlint
    ERROR (registry/spec/manifest-v2-2.md) frontmatter: Unexpected non-whitespace char: # Image Manifest Version 2, Schema 2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2015-12-30 20:56:02 +01:00
Stephen Day
00b983b837 Merge pull request #1304 from BrianBland/fsDriverRelaxedPermissions
Relaxes filesystem driver permissions to 0777 (dirs) and 0666 (files)
2015-12-29 19:06:45 -08:00
Stephen Day
e63ad1e3d6 Merge pull request #1306 from stevvooe/from-bytes-algorithm
digest: make FromBytes available on digest.Algorithm
2015-12-29 18:59:47 -08:00
Stephen Day
0404e5a622 Merge pull request #1307 from stevvooe/panic-on-unavailable
digest: panic on unavailable hash algorithm
2015-12-29 18:47:02 -08:00
Stephen Day
2259d9c09b Merge pull request #1302 from liusdu/arm64
update panicwrap package to fix building error on aarch64 platform
2015-12-29 18:44:36 -08:00
Kenny Leung
7ff5042c1e Merge branch 'print-error-msg' of https://github.com/k4leung4/distribution into print-error-msg
Changed to use typed error instead of formatted string.
Added tests for new public method.

Signed-off-by: Kenny Leung <kleung@google.com>
2015-12-29 16:26:13 -08:00
Stephen J Day
95bee1895a digest: panic on unavailable hash algorithm
After running into a few nil pointer errors during development, it is clear
that having this function return nil when a hash is not available is the wrong
approach. Nearly every time, this lack of availability was due to a missing
import statement for the hash. This is always a programming error.

To avoid future confusion, we now appropriately panic when the hash function is
not imported by the application. More dynamic uses of the package should call
Algorithm.Available() before calling Algorithm.Hash() to avoid this panic.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-12-29 15:24:32 -08:00
Stephen J Day
4646282448 digest: make FromBytes available on digest.Algorithm
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-12-29 15:16:56 -08:00
Brian Bland
05d1abbcb4 Merge pull request #1303 from BrianBland/fixDisabledStorageRedirects
Serve blobs when a storage driver supports redirects but are disabled
2015-12-29 13:28:45 -08:00
Kenny Leung
c28278f7a2 Print error for failed HTTP auth request.
Signed-off-by: Kenny Leung <kleung@google.com>
2015-12-29 11:39:20 -08:00
Liu Hua
5b550f919f update panicwrap package to fix building error on aarch64 platform
Linux on aarch64 lacks of dup2, uses dup3 instead

Signed-off-by: Liu Hua <sdu.liu@huawei.com>
2015-12-29 19:11:59 +00:00
Brian Bland
f19deba809 Relaxes filesystem driver permissions to 0777 (dirs) and 0666 (files)
Leaves any further permissions restrictions to the process umask

Signed-off-by: Brian Bland <brian.bland@docker.com>
2015-12-28 15:22:28 -08:00
Brian Bland
cf487a7911 Serve blobs when a storage driver supports redirects but are disabled
Fixes issue where an error was returned instead of serving the blob

Signed-off-by: Brian Bland <brian.bland@docker.com>
2015-12-28 11:08:39 -08:00
yuzou
d724bb1d24 use the scheme and host from x-forward-proto and x-forward-host if they exits and correct the scheme for Location header during image upload
Signed-off-by: yuzou <zouyu7@huawei.com>
2015-12-28 17:28:32 +08:00
Olivier Gambier
e02a0b0399 Merge pull request #1244 from carsonoid/carsonoid-nginx-doc-patch
Update nginx.md
2015-12-22 10:25:10 -08:00
Olivier Gambier
236c19fa30 Merge pull request #1255 from donhcd/convergeSwiftDocs
Help converge disagreeing swift docs
2015-12-22 10:23:13 -08:00
Olivier Gambier
29213af431 Merge pull request #1294 from rhcarvalho/patch-1
Fix godoc
2015-12-22 10:15:51 -08:00
Rodolfo Carvalho
e0fe14618f Fix godoc
`RepositoryNameTotalLengthMax` doesn't exist anymore.

Signed-off-by: Rodolfo Carvalho <rhcarvalho@gmail.com>
2015-12-22 12:26:05 +01:00
Olivier Gambier
9604f0843d Merge pull request #1290 from BrianBland/crossPackageCoverage
Enables cross-package code coverage reporting
2015-12-21 17:49:45 -08:00
Brian Bland
aaab336edc Enables cross-package code coverage reporting
Signed-off-by: Brian Bland <brian.bland@docker.com>
2015-12-21 17:09:38 -08:00
Olivier Gambier
c56d49b111 Merge pull request #1289 from BrianBland/codecov
Adds codecov coverage reporting to circle.yml
2015-12-21 11:41:12 -08:00
Brian Bland
dd0d28d541 Adds codecov coverage reporting to circle.yml
Signed-off-by: Brian Bland <brian.bland@docker.com>
2015-12-21 10:55:49 -08:00
Olivier Gambier
6b3908878f Merge pull request #1286 from thaJeztah/update-links
Update links to documentation
2015-12-20 21:20:49 -08:00
Sebastiaan van Stijn
bacfea16bb Update links to documentation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2015-12-21 01:22:01 +01:00
Donald Huang
eb654589db help converge disagreeing swift docs
Signed-off-by: Donald Huang <don.hcd@gmail.com>
2015-12-20 23:22:19 +00:00
Stephen Day
ed3346eeb0 Merge pull request #1068 from aaronlehmann/manifest-proposal
docs/spec: Proposal for new manifest format
2015-12-18 16:25:14 -08:00
Aaron Lehmann
2e3f4934a7 docs/spec: Proposal for new manifest format
This is a follow-on to PR #62, and it borrows much of the format
from #993, but uses specific formats for the image manifest and manifest
list (fat manifest) instead of a combined generic format.

The intent of this proposed manifest format is to allow multi-arch, and
allow for full content-addressability of images in the Docker engine.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-12-18 12:26:02 -08:00
Richard Scothern
67d3675d55 Merge pull request #1268 from RichardScothern/manifest-refactor-impl
Implementation of the Manifest Service API refactor.
2015-12-17 17:32:55 -08:00
Richard Scothern
cb6f002350 Implementation of the Manifest Service API refactor.
Add a generic Manifest interface to represent manifests in the registry and
remove references to schema specific manifests.

Add a ManifestBuilder to construct Manifest objects. Concrete manifest builders
will exist for each manifest type and implementations will contain manifest
specific data used to build a manifest.

Remove Signatures() from Repository interface.

Signatures are relevant only to schema1 manifests.  Move access to the signature
store inside the schema1 manifestStore.  Add some API tests to verify
signature roundtripping.

schema1
-------

Change the way data is stored in schema1.Manifest to enable Payload() to be used
to return complete Manifest JSON from the HTTP handler without knowledge of the
schema1 protocol.

tags
----

Move tag functionality to a seperate TagService and update ManifestService
to use the new interfaces.  Implement a driver based tagService to be backward
compatible with the current tag service.

Add a proxyTagService to enable the registry to get a digest for remote manifests
from a tag.

manifest store
--------------

Remove revision store and move all signing functionality into the signed manifeststore.

manifest registration
---------------------

Add a mechanism to register manifest media types and to allow different manifest
types to be Unmarshalled correctly.

client
------

Add ManifestServiceOptions to client functions to allow tags to be passed into Put and
Get for building correct registry URLs.  Change functional arguments to be an interface type
to allow passing data without mutating shared state.

Signed-off-by: Richard Scothern <richard.scothern@gmail.com>

Signed-off-by: Richard Scothern <richard.scothern@docker.com>
2015-12-17 17:09:14 -08:00
Stephen Day
7f41cd7587 Merge pull request #1257 from aaronlehmann/remove-extra-stat
Remove unnecessary stat from blob Get method
2015-12-17 14:10:12 -08:00
Stephen Day
9162760443 Merge pull request #1271 from aaronlehmann/remove-tarsum
Remove tarsum support for digest package
2015-12-16 14:24:11 -08:00
Aaron Lehmann
4c850e7165 Remove tarsum support for digest package
tarsum is not actually used by the registry. Remove support for it.

Convert numerous uses in unit tests to SHA256.

Update docs to remove mentions of tarsums (which were often inaccurate).

Remove tarsum dependency.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-12-15 17:22:18 -08:00
Stephen Day
200cbe8b8e Merge pull request #1264 from aaronlehmann/hash-errors
Simplify digest.FromBytes calling convention
2015-12-15 16:50:50 -08:00
Richard Scothern
9a06c58d70 Merge pull request #1258 from thaJeztah/fix-docs-headers
Fix headers in documentation
2015-12-15 14:55:00 -08:00
Olivier Gambier
bf09bb1314 Merge pull request #1267 from gabriellhrn/typo
Fix typo in docs/configuration.md
2015-12-15 10:22:07 -08:00
gabriell nascimento
74255cd4f2 Fix typo in docs/configuration.md
Signed-off-by: Gabriell Nascimento <gabriellhrn@gmail.com>
2015-12-15 16:14:13 -02:00
Aaron Lehmann
31047c8113 Simplify digest.FromBytes calling convention
The current implementation of digest.FromBytes returns an error. This
error can never be non-nil, but its presence in the function signature
means each call site needs error handling code for an error that is
always nil.

I verified that none of the hash.Hash implementations in the standard
library can return an error on Write. Nor can any of the hash.Hash
implementations vendored in distribution.

This commit changes digest.FromBytes not to return an error. If Write
returns an error, it will panic, but as discussed above, this should
never happen.

This commit also avoids using a bytes.Reader to feed data into the hash
function in FromBytes. This makes the hypothetical case that would panic
a bit more explicit, and should also be more performant.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-12-14 14:30:51 -08:00
Stephen Day
23e4099973 Merge pull request #1245 from carsonoid/carsonoid-nginx-doc-patch-2
Fix incorrectly interpolated config setting
2015-12-14 12:19:43 -08:00
Sebastiaan van Stijn
129c9a22f7 Fix headers in documentation
These headers were rendered as body text
because there was no space, but a "tab" after
the `#`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2015-12-12 01:39:51 +01:00
Aaron Lehmann
be1f4114c7 Remove unnecessary stat from blob Get method
This calls Stat before Open, which should be unnecessary because Open
can handle the case of a nonexistent blob. Removing the Stat saves a
round trip.

This is similar to the removal of stat in Open in #1226.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-12-11 15:13:03 -08:00
Richard Scothern
e6c60e79c5 Merge pull request #1253 from RichardScothern/go-1.5.2
Update go version to 1.5.2
2015-12-09 11:52:51 -08:00
Richard Scothern
a67000a814 Update go version to 1.5.2
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
2015-12-09 11:33:18 -08:00
Richard Scothern
afa4448f38 Merge pull request #1250 from RichardScothern/AUTHORS
Update AUTHORS for release
2015-12-09 11:18:37 -08:00
Richard Scothern
5ffa6564b8 Update AUTHORS and .mailmap for release
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
2015-12-09 10:16:50 -08:00