Introduction to Docker

589 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
589
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
23
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Introduction to Docker

  1. 1. What is Docker? Jason Shepherd, Docker Meetup Brisbane
  2. 2. Lightweight container Storage for containers Images for building containers Repository for images Jason Shepherd, Docker Meetup Brisbane
  3. 3. Why Docker? Jason Shepherd, Docker Meetup Brisbane
  4. 4. Jason Shepherd, Docker Meetup Brisbane
  5. 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. 6. Demo: Creating a container Jason Shepherd, Docker Meetup Brisbane
  7. 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. 8. Show the running containers sudo docker ps CONTAINER ID eed6e1011af4 IMAGE fedora:20 COMMAND /bin/bash Jason Shepherd, Docker Meetup Brisbane
  9. 9. Demo: Saving your changes Jason Shepherd, Docker Meetup Brisbane
  10. 10. sudo docker run -i -t fedora /bin/bash bash-4.2# yum install -y httpd bash-4.2# exit sudo docker run -i -t fedora /bin/bash bash-4.2# rpm -ql httpd Package httpd is not installed Jason Shepherd, Docker Meetup Brisbane
  11. 11. sudo docker ps CONTAINER ID 123e61a0108d IMAGE fedora:20 COMMAND /bin/bash sudo docker commit 123e61a0108d fedora-local 8a4a4c6445b... sudo docker images REPOSITORY fedora-local TAG latest IMAGE 8a4a4c64495b Jason Shepherd, Docker Meetup Brisbane
  12. 12. Demo: Access a container via the Network Jason Shepherd, Docker Meetup Brisbane
  13. 13. Run Apache in the forground: /usr/sbin/httpd -DFOREGROUND Jason Shepherd, Docker Meetup Brisbane
  14. 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. 15. Hit it with your browser: http://localhost:8080/ Jason Shepherd, Docker Meetup Brisbane
  16. 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. 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

×