{"_id":"@andrewosh/torrent-docker","_rev":"4-761eaa182138f9b931922c5365a271aa","name":"@andrewosh/torrent-docker","description":"MAD SCIENCE realtime boot of remote docker images using bittorrent","dist-tags":{"latest":"1.6.1"},"versions":{"1.6.0":{"name":"@andrewosh/torrent-docker","version":"1.6.0","description":"MAD SCIENCE realtime boot of remote docker images using bittorrent","main":"bin.js","bin":{"torrent-docker":"./bin.js"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","dependencies":{"bittorrent-tracker":"^2.7.0","create-torrent":"^3.2.0","cuid":"^1.2.4","docker-remote-api":"^4.4.0","docker-run":"^2.0.0","duplexify":"^3.2.0","freeport":"^1.0.3","fuse-bindings":"^2.1.2","level":"^1.4.0","lexicographic-integer":"^1.1.0","minimist":"^1.1.0","mkdirp":"^0.5.0","pretty-bytes":"^1.0.1","pump":"^1.0.0","rimraf":"^2.2.8","shasum":"^1.0.0","stream-collector":"^1.0.1","tar-fs":"^1.2.0","tar-stream":"^1.1.1","through2":"^0.6.3","torrent-stream":"^0.18.1"},"devDependencies":{},"repository":{"type":"git","url":"git+https://github.com/mafintosh/torrent-docker.git"},"bugs":{"url":"https://github.com/mafintosh/torrent-docker/issues"},"homepage":"https://github.com/mafintosh/torrent-docker","gitHead":"79bbefb6220ab43951c2375d04ebdb055394f8ce","_id":"@andrewosh/torrent-docker@1.6.0","scripts":{},"_shasum":"416d803836892eaa0e4caf1676688760faf8e127","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"andrewosh","email":"andrewosh@gmail.com"},"dist":{"shasum":"416d803836892eaa0e4caf1676688760faf8e127","tarball":"https://registry.npmjs.org/@andrewosh/torrent-docker/-/torrent-docker-1.6.0.tgz","integrity":"sha512-wOQ/YEK9upo7hPfXPUK4ZUfJ+qp9twISIPROIgdvG21I0QUxB8vcYnPg/ugI+zX5MvgUEdozovDkNuuXvj0ayQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8Wzl19QrQ45+vQmJl9TEHiYz7/B2yxLUf6o705sXTOwIgO2XlKljLK2mPlucDqfaZyvHT0gRm58Adif/nwifAVVU="}]},"maintainers":[{"name":"andrewosh","email":"andrewosh@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/torrent-docker-1.6.0.tgz_1464393808749_0.06923931580968201"}},"1.6.1":{"name":"@andrewosh/torrent-docker","version":"1.6.1","description":"MAD SCIENCE realtime boot of remote docker images using bittorrent","main":"bin.js","bin":{"torrent-docker":"./bin.js"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","dependencies":{"bittorrent-tracker":"^2.7.0","create-torrent":"^3.2.0","cuid":"^1.2.4","docker-remote-api":"^4.4.0","docker-run":"^2.0.0","duplexify":"^3.2.0","freeport":"^1.0.3","fuse-bindings":"^2.1.2","level":"^1.4.0","lexicographic-integer":"^1.1.0","minimist":"^1.1.0","mkdirp":"^0.5.0","pretty-bytes":"^1.0.1","pump":"^1.0.0","rimraf":"^2.2.8","shasum":"^1.0.0","stream-collector":"^1.0.1","tar-fs":"^1.2.0","tar-stream":"^1.1.1","through2":"^0.6.3","torrent-stream":"^0.18.1"},"devDependencies":{},"repository":{"type":"git","url":"git+https://github.com/mafintosh/torrent-docker.git"},"bugs":{"url":"https://github.com/mafintosh/torrent-docker/issues"},"homepage":"https://github.com/mafintosh/torrent-docker","gitHead":"185b25d66be4364ac5d78ad55bed18c9a8ed290a","_id":"@andrewosh/torrent-docker@1.6.1","scripts":{},"_shasum":"30309fa96976f1e8ddd3ff0f8f7b0ba4de6a8cc8","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"andrewosh","email":"andrewosh@gmail.com"},"dist":{"shasum":"30309fa96976f1e8ddd3ff0f8f7b0ba4de6a8cc8","tarball":"https://registry.npmjs.org/@andrewosh/torrent-docker/-/torrent-docker-1.6.1.tgz","integrity":"sha512-k72K8PvO4zAiwrdOYCMgnptNSXYkET2f2JuHTBIKWtfJxJlvTuAQH0KcXHtHZLE5yztFdmXqhO9+ppiZBct32A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8tqSM0eQFviLe0xskXxiNJSgUvag0l0KzESx6ldfn+gIgU//Wds7kFOC7yBFtwkVHJ5ybYsSIZJgJJBHkLp5hgO8="}]},"maintainers":[{"name":"andrewosh","email":"andrewosh@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/torrent-docker-1.6.1.tgz_1464884193193_0.7746080898214132"}}},"readme":"# torrent-docker\n\nMAD SCIENCE realtime boot of remote docker images using bittorrent\n\n```\nnpm install -g torrent-docker\ntorrent-docker --help\n```\n\n## HOLD ON TO YOUR BRAIN\n\nDocker images are HUGE. A simple `hello world` node app easily takes up `> 600MB` space.\nDownloading/uploading these images can a looong time.\n\nTo fix this `torrent-docker` implements a union file system that allows you to mount a docker image\nshared using bittorrent and boot a container - all in realtime!\n\n![whoa](http://i.imgur.com/rfFWukr.gif)\n\n## Usage\n\n### Seed a docker image\n\nFirst create a docker image\n\n```\nFROM ubuntu:14.04\nRUN apt-get update && apt-get install -qy curl vim\n```\n\nThen build it\n\n```\ndocker build -t test-image .\n```\n\nNow all we need to do is create a torrent from the docker image\n\n```\ntorrent-docker create test-image\n```\n\nThis creates a file `test-image.torrent` and a data folder `test-image/`.\nShare this torrent using your favorite torrent client or do\n\n```\ntorrent-docker seed test-image.torrent # will print a activity log\n```\n\n### Realtime boot the docker image\n\nNow copy `test-image.torrent` to another machine.\nTo boot the image do\n\n```\ntorrent-docker boot test-image.torrent my-container\n```\n\nThis will mount the torrent as a union file system (that is writable!) and boot the docker image.\nIn addition it will also seed the torrent which means the more containers you boot the more the torrent will be seeded.\n\nYou can attach to the debug log to see download speed, how many peers your are connected to, which files are being accessed etc using\n\n```\nnc localhost 10000 # will tail the debug log from the boot process\n```\n\nAfter a couple of seconds (depending on your internet connection, ymmw) you should be attached to a bash process\nrunning in your image! If for some reason your boot process cannot find a seeder you can specify them doing\n\n```\ntorrent-docker boot test-image.torrent my-container --peer 128.199.33.21:6441\n```\n\nOptionally you can start your own tracker\n\n```\ntorrent-docker tracker --port 8080\ntorrent-docker boot test-image.torrent my-container --tracker 127.0.0.1:8080\n```\n\n## Dependencies\n\nOn OSX you'll need the following\n\n* boot2docker, https://github.com/boot2docker/boot2docker\n* osx fuse, http://sourceforge.net/projects/osxfuse/files/latest/download?source=files\n* pkg-config, `brew install pkg-config`\n\nTo make `/var`, `/etc` belong to root you need to run the following after installing boot2docker\n\n```\nboot2docker ssh\nsudo umount /Users\nsudo mount -t vboxsf Users /Users/\n```\n\nYou need to run this everytime you boot boot2docker\n\n## Troubleshooting\n\nTHIS IS HIGHLY EXPERIMENTAL.\n\nCurrently I have only tested this on OSX using OSX fuse and boot2docker.\n","maintainers":[{"name":"andrewosh","email":"andrewosh@gmail.com"}],"time":{"modified":"2022-06-12T14:40:43.492Z","created":"2016-05-28T00:03:30.628Z","1.6.0":"2016-05-28T00:03:30.628Z","1.6.1":"2016-06-02T16:16:35.622Z"},"homepage":"https://github.com/mafintosh/torrent-docker","repository":{"type":"git","url":"git+https://github.com/mafintosh/torrent-docker.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"bugs":{"url":"https://github.com/mafintosh/torrent-docker/issues"},"license":"MIT","readmeFilename":"README.md"}