Commit Graph

141 Commits

Author SHA1 Message Date
1ca090efba Add push fallback to v1 for the official registry
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 7d62943178e803663b4939666377b75a21d3e537
Component: engine
2015-01-30 14:37:44 -08:00
e6f8a05595 Merge pull request #10433 from guoxiuyan/Fix_typo
Fix a minor typo
Upstream-commit: d400ac756cae9c937089f9f20bcc75826e99ea67
Component: engine
2015-01-28 20:57:35 -08:00
5dbf91e768 Fix a minor typo
Signed-off-by: Guo Xiuyan <guoxiuyan@huawei.com>
Upstream-commit: 07d190a61c60cff2f20186e700abca46f18d35ac
Component: engine
2015-01-29 10:15:56 +08:00
480c2d788f Buffer tar file on v2 push
fixes #10312
fixes #10306

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 629815b42472635c87ec6ce9ed4ec37019ae4ffa
Component: engine
2015-01-27 18:11:05 -08:00
0388864ff5 Merge pull request #10322 from dmcgowan/v2-manifest-tarsum-cache
V2 manifest tarsum cache
Upstream-commit: b3402f34b2049a0e82a061640f04c707b8cca99b
Component: engine
2015-01-27 16:40:49 -08:00
6c59418704 Use layer checksum if calculated during manifest creation
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: ab589b442d55597de74201729ba893977ea73b7f
Component: engine
2015-01-27 10:21:35 -08:00
a3cfeb1217 Merge pull request #10361 from dmcgowan/v2-registry-errors
Better error messaging and logging for v2 registry requests
Upstream-commit: 70ea474de9bb7474d8859a05e98d21f98a05c7eb
Component: engine
2015-01-26 15:38:22 -08:00
e63f5dfefb Better error messaging and logging for v2 registry requests
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: d277714614f62dba276227f70cc2a47eac6e02e7
Component: engine
2015-01-26 14:00:51 -08:00
c82f5400cc Merge pull request #10327 from dmcgowan/progress-reader-fix
Revert progressreader to not defer close
Upstream-commit: db6ecffc69ce0367623ee7d4686e54128af16470
Component: engine
2015-01-26 13:07:12 -08:00
3bf93236d1 Allow empty layer configs in manifests
Before the V2 registry changes, images with no config could be pushed.
This change fixes a regression that made those images not able to be
pushed to a registry.

Signed-off-by: Euan Kemp <euank@euank.com>
Upstream-commit: d477d42dd3e6a98f82c6ed2abb1dfeeb2782539f
Component: engine
2015-01-24 14:27:37 -08:00
45af1fde18 Revert progressreader to not defer close
When progress reader closes it overwrites the progress line with the full progress bar, replaces the completed message.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 0091c490dd31b9b9a5248cacaaf1f515ff26a5e7
Component: engine
2015-01-23 17:24:05 -08:00
1c5b6614c3 Make debugs logs suck less.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: c49cd3d2a51ad6d2304c24f7b609cde804a0d6c5
Component: engine
2015-01-23 13:20:29 -08:00
e1654ed3ab Merge pull request #10259 from jfrazelle/wording-of-image-verification
Change the wording of image verification warning.
Upstream-commit: 211513156dc1ace48e630b4bf4ea0fcfdc8d9abf
Component: engine
2015-01-22 11:14:28 -08:00
4f2ab4bd87 Merge pull request #10244 from dmcgowan/registry-panic-fix
Fix write after close on http response
Upstream-commit: ef33efc9b9879a8397288b1bd54d8f3fd2460e56
Component: engine
2015-01-22 10:23:11 -08:00
72b2fe27b4 Change the wording of image verification warning.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: c97d8b1233bc17a9e58ce97473329ab5de59969a
Component: engine
2015-01-21 18:07:10 -08:00
366e7721bb Warn about tech preview of checksums.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 1820003078eeae6ab25e2440669c490caff59b57
Component: engine
2015-01-21 16:25:01 -08:00
bde8dbe0df Ensure that progress reader is closed after usage
Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 4e4a5b25328566efad9ade3e7e0737ba48c090ab
Component: engine
2015-01-21 15:14:01 -08:00
865afbd584 Merge pull request #10196 from bobrik/unused-compression-arg
Removed unused compression arg in Graph.TempLayerArchive()
Upstream-commit: fd6bd8090927bbaf37682fe079a39a2fdb0f74a9
Component: engine
2015-01-21 09:27:32 -08:00
31756f48b3 Merge pull request #9970 from shishir-a412ed/docker_load_issue
Implementation of docker load command, load the tar ball directly into /var/lib/docker/graph
Upstream-commit: 092d52281d20e3456677ac11d781abf1cd0bdd8f
Component: engine
2015-01-20 14:15:41 -05:00
76f28ab081 Merge pull request #10128 from vieux/filters_image
Server-side restriction of allowed image filters
Upstream-commit: cb9db04fd72cf31b3df802fe19a0cff4cf682438
Component: engine
2015-01-19 13:24:03 -08:00
ababe319b7 removed unused compression arg in Graph.TempLayerArchive()
Signed-off-by: Ian Babrou <ibobrik@gmail.com>
Upstream-commit: b682d7cde619c61eace60811296c26f70e94c6b4
Component: engine
2015-01-19 23:38:51 +03:00
72f0caa64c Implementation of docker load command: Untarr the incoming tar stream directly into /var/lib/docker/tmp without creating the tar ball
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 315260203c3a683fe7e93aa6c937128d38d52ae4
Component: engine
2015-01-19 15:09:02 -05:00
b329952e86 move test to the daemon
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: c6309229a0f5e3d8ee18d7ce80d1d0bd1d193e07
Component: engine
2015-01-16 21:49:46 +00:00
45e09641f7 Remove session backup
The v2 session code will no longer update the indexEndpoint value, therefore it is not necessary to save and restore the value for use with v1.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: f11f3f6203da596f50eec0edc3c5dfb8c93bc271
Component: engine
2015-01-15 14:05:06 -08:00
5598d30646 Cleanup v2 session to require endpoint
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 9c6f8e14398e794cbe20504556c22a1c83260bd8
Component: engine
2015-01-15 14:05:06 -08:00
5fc27fb46a Refactor push and pull to move code out of cmd function
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 750b41ced42bda0ccda405c1aa7c43ded5821e40
Component: engine
2015-01-15 14:05:06 -08:00
5cfb6b6d7e Fix integration test failures
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 9a38aa0279ccae5aeded854a9cbbd7e398088ab2
Component: engine
2015-01-15 14:05:06 -08:00
dce0c9eeca Update push to sign with the daemon's key when no manifest is given
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 8ceb9d20d66097b90ca3a529da258669ef6b8412
Component: engine
2015-01-15 14:05:06 -08:00
07ca876ccc Refactor from feedback
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 25945a40c4f352a754cbd8dba9c846c7539fe463
Component: engine
2015-01-15 14:05:06 -08:00
c13d2851b8 Add Tarsum Calculation during v2 Pull operation
While the v2 pull operation is writing the body of the layer blob to disk
it now computes the tarsum checksum of the archive before extracting it to
the backend storage driver. If the checksum does not match that from the
image manifest an error is raised.

Also adds more debug logging to the pull operation and fixes existing test
cases which were failing. Adds a reverse lookup constructor to the tarsum
package so that you can get a tarsum object using a checksum label.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 213e3d116642431adbe634d39740eddc5a81e063
Component: engine
2015-01-15 14:05:05 -08:00
21c36fbac8 Allow private V2 registry endpoints
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 7d61255f578bae7dc5c2a5d44c50bf32bbc9f568
Component: engine
2015-01-15 14:05:05 -08:00
bd2dadaee1 Update push and pull to registry 2.1 specification
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 0336b0cdaa74ac03003c4a933eb866fb0cec8125
Component: engine
2015-01-15 14:05:05 -08:00
6614616033 Update push to use mount blob endpoint
Using mount blob prevents repushing images which have already been uploaded

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: e9b590d85e9c622316b8be71004737f63e6b9503
Component: engine
2015-01-15 14:05:05 -08:00
eaeb1f3166 Use tarsum dev version to fix mtime issue
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 3e4fd005449448ab85c917a5d27ca584b260309c
Component: engine
2015-01-15 14:05:05 -08:00
321425170a Update manifest format for push
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: bcc0a343bb9c75443238e614e4c2da5f707aef8d
Component: engine
2015-01-15 14:05:05 -08:00
6a46693a7d Push flow
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 188b56c836e49e3c888e1e27e4e26b5cc0f1caaa
Component: engine
2015-01-15 14:05:05 -08:00
dc1c238ed6 Use channels and set workers to make image lookup safe
This refactors the starting work by the prior commits to make this safe
for access.  A maximum of 5 worker go routines are started to lookup
images on the endpoint.  Another go routine consumes the images that are
required to be pushed into a map for quick lookups.  The map is required
because the pushing of the image json and layer have to be done in the
correct order or the registry will explode in fire.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 476cf1b906ca14cc3ce1347f1aa479713fa6ce6e
Component: engine
2015-01-13 15:52:44 -08:00
0f5c9b554c Replace custom waiting code with a WaitGroup
Signed-off-by: Ian Calvert <ianjcalvert@gmail.com>
Upstream-commit: 33286589291a56fe0a4728f8b45ad3feb5494226
Component: engine
2015-01-13 15:32:47 -08:00
1f4175ede8 Run the remote image presence checks in parallel
Signed-off-by: Ian Calvert <ianjcalvert@gmail.com>
Upstream-commit: 90c5ff4f06b8672cd2b427d120a8988bfc9f1de7
Component: engine
2015-01-13 15:32:47 -08:00
5aa04a56fb Deprecating ResolveRepositoryName
Passing RepositoryInfo to ResolveAuthConfig, pullRepository, and pushRepository

Moving --registry-mirror configuration to registry config

Created resolve_repository job

Repo names with 'index.docker.io' or 'docker.io' are now synonymous with omitting an index name.

Adding test for RepositoryInfo

Adding tests for opts.StringSetOpts and registry.ValidateMirror

Fixing search term use of repoInfo

Adding integration tests for registry mirror configuration

Normalizing LookupImage image name to match LocalName parsing rules

Normalizing repository LocalName to avoid multiple references to an official image

Removing errorOut use in tests

Removing TODO comment

gofmt changes

golint comments cleanup.  renaming RegistryOptions => registry.Options, and RegistryServiceConfig => registry.ServiceConfig

Splitting out builtins.Registry and registry.NewService calls

Stray whitespace cleanup

Moving integration tests for Mirrors and InsecureRegistries into TestNewIndexInfo unit test

Factoring out ValidateRepositoryName from NewRepositoryInfo

Removing unused IndexServerURL

Allowing json marshaling of ServiceConfig.  Exposing ServiceConfig in /info

Switching to CamelCase for json marshaling

PR cleanup; removing 'Is' prefix from boolean members.  Removing unneeded json tags.

Removing non-cleanup related fix for 'localhost:[port]' in splitReposName

Merge fixes for gh9735

Fixing integration test

Reapplying #9754

Adding comment on config.IndexConfigs use from isSecureIndex

Remove unused error return value from isSecureIndex

Signed-off-by: Don Kjer <don.kjer@gmail.com>

Adding back comment in isSecureIndex

Signed-off-by: Don Kjer <don.kjer@gmail.com>
Upstream-commit: 568f86eb186731b907b659e4ec64bda21c2fe31d
Component: engine
2015-01-08 20:14:58 +00:00
1a4a1b2193 Have .dockerignore support Dockerfile/.dockerignore
If .dockerignore mentions either then the client will send them to the
daemon but the daemon will erase them after the Dockerfile has been parsed
to simulate them never being sent in the first place.

an events test kept failing for me so I tried to fix that too

Closes #8330

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 6d801a3caa54ad7ef574bc426aa1ffc412c5af82
Component: engine
2015-01-06 10:57:48 -08:00
57eaf85313 Fixing ValidateTagName error message
Signed-off-by: Don Kjer <don.kjer@gmail.com>
Upstream-commit: b74ccf2a1b9d146fef0bca89a2f6a40eb4c3e486
Component: engine
2014-12-19 22:48:31 +00:00
98bb6eba72 Make FROM scratch a special cased 'no-base' spec
There has been a lot of discussion (issues 4242 and 5262) about making
`FROM scratch` either a special case or making `FROM` optional, implying
starting from an empty file system.

This patch makes the build command `FROM scratch` special cased from now on
and if used does not pull/set the the initial layer of the build to the ancient
image ID (511136ea..) but instead marks the build as having no base image. The
next command in the dockerfile will create an image with a parent image ID of "".
This means every image ever can now use one fewer layer!

This also makes the image name `scratch` a reserved name by the TagStore. You
will not be able to tag an image with this name from now on. If any users
currently have an image tagged as `scratch`, they will still be able to use that
image, but will not be able to tag a new image with that name.

Goodbye '511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158',
it was nice knowing you.

Fixes #4242

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 8936789919c5c8004f346f44a3452d1521818b60
Component: engine
2014-12-18 14:03:38 -08:00
d6330f220b Chnage LookupRemoteImage to return error
This commit is patch for following comment
// TODO: This method should return the errors instead of masking them and returning false

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 8123c1e9fef0eb0d6b4e89dce4089276b751906c
Component: engine
2014-12-16 16:23:19 -08:00
55ec358b5c Merge pull request #9610 from duglin/Issue9602
Wrap strings that could look like ints in quotes
Upstream-commit: eea9f0e781f5a2cc438aad11315253b6fb42ed9e
Component: engine
2014-12-16 12:02:26 -08:00
34f3fb8d2c Merge pull request #9613 from pwaller/push-err-confusion-fix
Improve message when pushing a non-existent image
Upstream-commit: e6a68a1c871e73c7b3f86839e9c21765fba24430
Component: engine
2014-12-15 09:54:34 -08:00
ba3cc4bafb Wrap strings that could look like ints in quotes
When we use the engine/env object we can run into a situation where
a string is passed in as the value but later on when we json serialize
the name/value pairs, because the string is made up of just numbers
it appears as an integer and not a string - meaning no quotes.  This
can cause parsing issues for clients.

I tried to find all spots where we call env.Set() and the type of the
name being set might end up having a value that could look like an int
(like author). In those cases I switched it to use env.SetJson() instead
because that will wrap it in quotes.

One interesting thing to note about the testcase that I modified is that
the escaped quotes should have been there all along and we were incorrectly
letting it thru. If you look at the metadata stored for that resource you
can see the quotes were escaped and we lost them during the serialization
steps because of the env.Set() stuff.  The use of env is probably not the
best way to do all of this.

Closes: #9602

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: d942c59b696d16def85f6b65ae65c176f66a5562
Component: engine
2014-12-15 05:10:49 -08:00
24d7379326 validate image ID properly & before load
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>

Conflicts:
	graph/load.go
Upstream-commit: bff1d9dbce76bed1e267a067eb4a1a74ef4da312
Component: engine
2014-12-11 16:29:27 -05:00
17bcf3ad85 Improve message when pushing a non-existent image
I was confused earlier when I did:

```
docker push localhost.localdomain:1234/foo
```

Because docker told me:

```
No such id: localhost.localdomain:1234/foo
```

I actually had buried in my mind the solution to this, but the error
message
confused me because I had recently had some fun trying to get the
registry
working and therefore thought it was telling me that I didn't have an
account
on the registry.

This pull request makes it unambiguous that the error is that the
specified
image is unknown.

/cc @cpuguy83

Docker-DCO-1.1-Signed-off-by: Peter Waller <p@pwaller.net> (github: pwaller)
Upstream-commit: 3a08bbc4d29835fe5b8f3d2c5bde442f6a7014a0
Component: engine
2014-12-11 17:57:23 +00:00
e2ca84e5a6 graph/load: add build tags to fix make cross
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 2ec2237909ba51d3fe10a2ee6cfb81f315408f68
Component: engine
2014-11-25 02:06:45 +02:00