5. Make the entire lifecycle more efficient,
consistent, and repeatable
Eliminate inconsistencies between
environments
Address significant performance, costs,
deployment, and portability issues normally
associated with VMs
Jason Shepherd, Docker Meetup Brisbane
6. Demo: Creating a container
Jason Shepherd, Docker Meetup Brisbane
7. sudo docker run -i -t fedora /bin/bash
bash-4.2#
Run /bin/bash using the fedora image and use my
current shell to access it.
Jason Shepherd, Docker Meetup Brisbane
8. Show the running containers
sudo docker ps
CONTAINER ID
eed6e1011af4
IMAGE
fedora:20
COMMAND
/bin/bash
Jason Shepherd, Docker Meetup Brisbane
13. Run Apache in the forground:
/usr/sbin/httpd
-DFOREGROUND
Jason Shepherd, Docker Meetup Brisbane
14. Bind a port on the host(8080) to a container port(80)
sudo docker run -p 0.0.0.0:8080:80 -t
a0cd983109bc /usr/sbin/httpd -DFOREGROUND
Jason Shepherd, Docker Meetup Brisbane
15. Hit it with your browser:
http://localhost:8080/
Jason Shepherd, Docker Meetup Brisbane
16. Docker is not production ready:
- All system calls available
- Can mount file system of host
- Can access process of container from
host
Jason Shepherd, Docker Meetup Brisbane
17. How to deal with Security issues:
- Treat docker as you would sudo
- Trust the images you run, they have root access
- Don't allow remote access to docker!
Jason Shepherd, Docker Meetup Brisbane