High level approach: lightweight VM • own process space • own network interface • can run stuff as root • can have it’s own /sbin/init (different from the host) “Machine Container”
Low level approach: chroot on steroids • can also not have it’s own /sbin/init • container = isolated process(es) • share kernel with the host “Application Container”
Standard format for containers and a place to share them • Fetch an image from the public registry with “docker pull” • Enter an image with “docker run“ and do some changes • Record those changes with “docker commit”, repeat as many times as needed • And then share the result with “docker push” on the public registry, or a private one
EC2 – Amazon Linux • Choose the last Amazon Linux AMI • Launch & ssh into the instance sudo yum install –y docker sudo service docker start • Docker 0.9 is installed
EC2 – Ubuntu • Choose a 64Bit Ubuntu image • In the Launch Instance Wizard, set #include https://get.docker.io as User data • Launch & ssh into the instance • Wait for the cloudinit script to finish • Last version of docker is installed
EC2 – Ubuntu - Testing • edit /etc/default/docker DOCKER_OPTS="-H 0.0.0.0:4243” • Restart the docker daemon sudo service docker restart • Open the port 4243 in the EC2 console • On you laptop, set DOCKER_HOST $>export DOCKER_HOST=:4243 $>docker run fedora:20 ls