Docker 101

Chris Smith
@cgsmith105

What is a container?

What is a VM?

History

 

  1. Setup LAMP on your laptop
  2. Configure your project
  3. FTP files up to the server
  1. Setup a VM with dependencies
  2. Change files on VM 
  3. Commit to git and git pull on server
  1. Setup Vagrant/Ansible
  2. Change files
  3. Commit and git...

Get Started

 

  1. Install docker for your OS
  2. Run `docker run hello-world`

Docker Commands

 

docker

hello-world

run

Tells the computer to run the program docker

Subcommand to create and run docker container

What image do we load in the container

Let's play with Docker for a bit!

Dockerfile Review

 

FROM docker/whalesay:latest

CMD echo 'Hello ETCC Docker 101!' | cowsay

docker build -t etcc-whale . 

How I Use Docker

Homework

  • Follow the tutorial for docker on the website
  • Play around with docker files and images
  • Try pushing a docker image to docker hub
  • Look into docker compose
  • Think small!
Made with Slides.com