Droot is a super-easy application container engine to build, ship, run with chroot instead of docker run, and with Amazon S3 instead of docker registry. It aims to simply escape dependency hell.
Docker has a powerful concept about an application deployment process, that is Build, Ship, Run. But there are many cases that docker runtime is too complicated and beyond our current capabilities, especially on production.
Droot provides a simpler container runtime without annoying Linux Namespaces. Droot depends on traditional Linux functions such as chroot(2), Linux capabilities(7) and a bind mount. droot helps you to chroot a container image built by docker and to import/export container images on Amazon S3.
- Build:
docker build - Ship: Upload images to S3, and Download images from S3.
- Run: chroot(2), Linux capabilities(7), and a bind mount.
- Docker (
droot pushonly depends on it) - Linux (
droot runanddroot umountonly supports it)
$ brew tap yuuki1/droot
$ brew install drootReleases・yuuki1/droot - GitHub
$ go get github.com/yuuki1/droot
$ go install github.com/yuuki1/droot/cmd$ droot push --to s3://drootexamples/app.tar.gz dockerfiles/app$ droot pull --dest /var/containers/app --src s3://drootexamples/app.tar.gz$ sudo droot run --bind /var/log/ --root /var/containers/app command$ sudo droot umount --root /var/containers/app$ sudo droot rm --root /var/containers/appDroot push/pull subcommands support the following methods to set your AWS credentials.
- an IAM instance profile. http://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-create-iam-instance-profile.html
- Environment variables.
$ export AWS_ACCESS_KEY_ID=********
$ export AWS_SECRET_ACCESS_KEY=********
$ export AWS_REGION=********~/.aws/credentialsa standard to manage credentials in the AWS SDKs
Droot push supports the environment variables same as docker-machine such as DOCKER_HOST, DOCKER_TLS_VERIFY, DOCKER_CERT_PATH. ex.
DOCKER_TLS_VERIFY=1
DOCKER_HOST=tcp://192.168.x.x:2376
DOCKER_CERT_PATH=/home/yuuki/.docker/machine/machines/dev
rmicommand to clean a image on S3pullcommand with the rsync optionpush/pullother compression algorithms- image versioning
pullfrom docker registry- drivers except Amazon S3
runreads.docekrenv,.dockerinit- reduce fork&exec
push/pullS3 download/upload part-size optionspush/pullverifying sha256sumpullbackup/rollback option
Droot uses a library with cgo, so it is necessary to build in Linux for a Linux binary. It is recommanded to use Docker for development if you are on OSX and other OSs.
$ ./script/build_in_container.sh- Fork (https://github.com/yuuki1/droot/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test suite with the
make testcommand and confirm that it passes - Create a new Pull Request