2. Targets
- Deploy app with minimal effort
- Encapsule app from host system in so called
“containers”
3. Targets
- Make deployment a repeatable task without
too much headache
- Ensure that my app does not interfere with
other host configurations
- No more virtualenv needed
4. What is Docker?
- Build, Ship and Run - Any App - Anywhere
- think of it as lightweight VMs
- “Just ran through the Docker tutorial for the first time. Mind
blown. This changes everything”
- http://tiny.cc/pkyomx
5. Docker Terms
- Dockerfile
- A set of commands to build your Docker Image
- Gist: https://gist.github.com/mr-stateradio/237b183a30f0f399de67
6. Docker Terms
- Image
- Based upon the Dockerfile you create a Docker
Image
- Think of it as a Snapshot of your lightweight VM
- CMD: docker build -t simpleloop/simpleloop-company-page_created_<yyyy-mm-dd> .
7. Docker Terms
- Container
- Based upon the Docker Image you create a
container
- Think of it as the running instance of your Image
- CMD: docker run -p 80:80 -p 443:443 -i -t <image-id>
8. Live Test & Useful CMDs
Check Container for www.simpleloop.com
- sudo docker images # show all available images
- sudo docker ps # show all running containers
- sudo docker ps -a # show all containers
- docker run --rm -v /usr/local/bin:/target jpetazzo/nsenter # install ns-enter
- sudo docker-enter <container-id> # enter specific containers
- ps aux # not docker specific ;-) short and clean process list in the container
9. Get Started
- Easiest Way:
Get a VM for 5$/month at https://www.digitalocean.com/
with Docker preinstalled
- https://github.com/jpetazzo/nsenter
- Allows you to easily enter a running container
10. Hints
- Run Database on host
- Do not use it for one app on one host
- Use it for x apps on one host
- Not the solution for all problems
- Adds complexity for backups
11. Thanks
Thomas Kremmel
simpleloop IT
Your Web and Mobile Development Partner
www.simpleloop.com