mesosphere-backup / deimos

Mesos containerizer hooks for Docker
Apache License 2.0
249 stars 26 forks source link

Docker URLs #7

Closed burke closed 10 years ago

burke commented 10 years ago

http://tools.ietf.org/html/rfc3986#section-3

docker:///ubuntu implies scheme=docker, authority=(null), path=ubuntu. This is valid, since the authority is actually implied. It's also valid for things like docker:///zaiste/postgresql, but with private registries, it's kinda wrong:

docker:///registry.borg.chi.shopify.com:5000/shopify:1234deadbeefcafe

If we dissect this, we get scheme=docker authority=null, path=registry.borg.chi.shopify.com:5000/shopify:1234deadbeefcafe. Really, it should be scheme=docker authority=registry.borg.chi.shopify.com:5000, path=shopify:1234deadbeefcafe. Thus the URL would look like docker://registry.borg.chi.shopify.com:5000/shopify:1234deadbeefcafe, with only 2 slashes after the scheme.

There are a couple places here and in the earlier docker-executor where you assume docker URLs should always begin with docker:///. It's a minor thing, since plugging in the theoretically-invalid URL works just fine in all cases, but it's probably easier to fix this now than it will be down the road.

lingmann commented 10 years ago

Thanks Burke, this is great feedback... we'll look into making some adjustments.

solidsnack commented 10 years ago

Fixed in 7b9fd0d2d335edca75379880df5252f646d51994