Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

docket

> 编程语言
Open source

Docket - Custom docker registry that allows for lightning fast deploys through bittorrent

709 stars0 likes1 views
WebsiteGitHub

About

Docket - Custom docker registry that allows for lightning fast deploys through bittorrent

Docket

DOCKEr + torrenT = Docket

Docket is a custom docker registry that allows for deployments through bittorrent. It allows for lightning fast Docker image deploys across large number of machines.

This was designed and built in 48 hours as part of the Gopher Gala Golang 48 hour hackathon. Hence kindly forgive me for the hackish code, and lack of tests.

[On hind sight - container rush or docker flood would have been a better name.]

Screencast

Problem Statement

As containers get more mainstream, server deployments are soon going to be done through a containerization solution like docker [or rocket or lxd].

Large scale deploys are going to choke your docker registry. Imagine pulling/deploying a 800mb base image (for example the official perl image) across 200 machines in one go. That's 800*200 = 160GB of data that's going to be deployed and it'll definitely choke your private docker registry (and will take a while pulling in from the public image)

Solution

The solution is BitTorrent. Any technology good for distributing music and movies, is usually good for doing server deploys. Instead of downloading from one point source, we can now distribute the load across the machines downloading themselves. All of this transparently and automatically handled by the docket client.

Silly Totally Non-scientific Benchmark

Pulling a 800 mb image across 5 machines simultaneously via Docket resulted in a 90% speedup.

Features

  • Written in Golang :)
  • Very easy to use
  • Works along side your private docker registry

Concepts

Docket constitutes of 3 components:

  1. Docket Registry

A REST service that acts as a registry. It receives docker image tarballs from the client, stores metadata into a database, creates torrents out of them and seeds them.

  1. Docket Client

The client itnerface in which the end user will be interacting. Can view available images in the registry, push an image to the registry and pull an image (which triggers a bittorrent deploy) from the registry.

  1. Bittorrent Tracker

Docket allows you to BYOT (bring your own tracker), but I suggest installing opentracker

Docket uses ctorrent for the actual downloading of torrents.

Installation

Step 0: You need to already have Docker installed

Step 1: Install ctorrent and opentracker

bash
$ sudo apt-get update
$ sudo apt-get install zlib1g-dev make g++ ctorrent
$ git clone https://github.com/gebi/libowfat
$ make
$ git clone git://erdgeist.org/opentracker
$ cd opentracker
$ make

Step 2: Download the Docket binaries

bash
$ wget http://storage.googleapis.com/docket/docket.zip
$ unzip docket.zip

Step 3: That's all

Getting Started

Step 1: Fire up the Tracker

bash
$ cd opentracker
$ ./opentracker 8940

Step 2: Fire up the Registry

bash
$ cd registry
# Note you need to put an ip address in which other machines can contact the tracker
# You cannot put in localhost or 127.0.0.1
$ sudo ./registry --tracker "10.240.101.85:8940"

Usage

Push an image to the Registry

…

List all images available in the Registry

bash
$ cd client
$ sudo ./client -h "http://10.240.101.85" images
netvarun/test:latest
perl:latest

Do a deploy

…

Reference (Docket Registry)

bash
./registry --help

usage: registry []

Docket Registry

Flags:
  --help             Show help.
  -t, --tracker="10.240.101.85:8940"  
                     Set host and port of bittorrent tracker. Example: -host 10.240.101.85:8940 Note: This cannot be set to localhost, since this is the tracker in which all the torrents will be created with. They have to be some accessible ip
                     address from outside
  -p, --port="8000"  Set port of docket registry.
  -l, --location="/var/local/docket"  
                     Set location to save torrents and docker images.

Reference (Docket Client)

bash
./client 

usage: client []  [] [ ...]

Docket Client

Flags:
  --help             Show help.
  -h, --host="http://127.0.0.1"  
                     Set host of docket registry.
  -p, --port="8000"  Set port of docket registry.
  -l, --location="/tmp/docket"  
                     Set location to store torrents and tarballs.

Commands:
  help []
    Show help for a command.

  push 
    Push to the docket registry.

  pull 
    pull to the docket registry.

  images []
    display images in the docket registry.

Author

Sivamani Varun ([email protected])

License

MIT License

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Go

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言