Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dogestry: A Docker Registry Alternative

Dogestry: A Docker Registry Alternative

Slides for a talk at the Portland Docker Meetup on March 5, 2015.

Link to dogestry project: https://github.com/dogestry/dogestry.

Tom Offermann

March 05, 2015
Tweet

Other Decks in Programming

Transcript

  1. ‣Command-line tool, written in Go ‣Store docker images in S3

    bucket ‣Upload and download docker images What is Dogestry?
  2. Docker Remote API $ curl http://192.168.33.10:2375/version! ! {! "ApiVersion": "1.16",!

    "Arch": "amd64",! "GitCommit": "4595d4f",! "GoVersion": "go1.3.3",! "KernelVersion": "3.13.0-35-generic",! "Os": "linux",! "Version": "1.4.0"! }!
  3. Docker CLI $ docker version! ! Client version: 1.3.2! Client

    API version: 1.15! Go version (client): go1.3.3! Git commit (client): 39fa2fa! OS/Arch (client): darwin/amd64! Server version: 1.4.0! Server API version: 1.16! Go version (server): go1.3.3! Git commit (server): 4595d4f!
  4. GET Docker Image REQUEST ! GET /images/busybox/get! ! RESPONSE !

    HTTP/1.1 200 OK! Content-Type: application/x-tar! Date: Sun, 01 Mar 2015 04:43:14 GMT! Transfer-Encoding: chunked! ! Binary Data Stream!
  5. LOAD Docker Image REQUEST ! POST /images/load! ! Tarball in

    body! ! RESPONSE ! HTTP/1.1 200 OK! Date: Sun, 01 Mar 2015 04:50:52 GMT! Content-Length: 0! Content-Type: text/plain; charset=utf-8!
  6. Image Layers $ docker history busybox! IMAGE CREATED CREATED BY

    ! 4986bf8c1536 8 weeks ago ... CMD [/bin/sh] ! ea13149945cb 8 weeks ago ... ADD file:8cf517d90fe79547c4! df7546f9f060 5 months ago ... MAINTAINER Jérôme Petazzo ! 511136ea3c5a 20 months ago
  7. Docker Image Tarball busybox! !"" 4986bf8c15363...! # !"" VERSION! #

    !"" json! # $"" layer.tar! !"" 511136ea3c5a6...! # !"" VERSION! # !"" json! # $"" layer.tar! # ...! $"" repositories
  8. Layer JSON ## busybox/4986bf8c1536.../json! ! {! "id": “4986bf8c15363...”,! "parent": “ea13149945cb...”,!

    "created": "2014-12-31T22:23:56.943403668Z",! "container": “83dcf36ad104...”,! …! }
  9. Walk Image History IMAGE:TAG TOP LAYER ID! busybox:latest => 4986bf8c1536!

    ! LAYER ID! ! ! PARENT ID! 4986bf8c1536 => ea13149945cb! ea13149945cb => df7546f9f060! df7546f9f060 => 511136ea3c5a! 511136ea3c5a => None
  10. ‣Identify layers missing from S3 ‣Export docker image ‣Write missing

    layers to /tmp ‣Upload layers to S3 Dogestry PUSH
  11. ‣Identify layers missing from docker host ‣Download missing layers from

    S3 ‣Package layers as docker image tarball ‣Load tarball into docker host Dogestry PULL