distribute development environment by docker-compose - may 2016 docker meetup shanghai
TRANSCRIPT
Distribute Development Env by docker-composeKengo TODA
whoami
Java, JavaScript R&D
Build tools, CI
OSS web app with distributed dev environment
Merit of Docker
Small, Clean, Quick, Portable, Reproducible
Good for delivery
to cloud, data centre and developer’s machine new!
Case: provide dev environment for your contributors
Web Service needs:
Middleware
Initial data in datastore
Legacy ways to provide dev environment
README.txt
Virtual box, VMware
Vagrant (https://www.vagrantup.com/)
Problems of legacy ways
Human don’t read document
VM is BIG & SLOW
Middleware conflict
Docker is
Process to make VM is more clear and documented
Quick bootstrap
Layer is small enough to distribute
Reproducible even on different OS
But how to keep
'one service in each container’ policy?
docker-compose
Build, run and link containers by one command
Treat set of containers like: Application server, Web server, Datastore server, Selenium client, build tools…
docker-compose.yml
docker-compose up$ docker-compose up Creating consul_1... Creating registrator... Creating storage_1... Creating front_1... Creating nginx_1... Attaching to consul_1, registrator, storage_1, front_1, nginx_1 consul_1 | ==> Starting raft data migration...
Conclusion
Docker is good for delivery, even to developers!