Getting Started With Containers

Docker containers can be used in a variety of environments. In this workshop, we'll explore running containers on both a Linux and Windows.

Overview

  1. Create GitHub Account
  2. Create Docker Hub Account
  3. Explore Docker Hub
  4. Install Docker on your machine
  5. Clone container workshop repository
  6. Run the application
  7. Build a Docker Image with our app
  8. Run a Dockerized application on your local machine
  9. Inspect Dockerfile (compare Linux vs Windows)
  10. Containerize app
  11. Push app to Docker Hub
  12. Launch app on Fargate

We'll look into creating and running an image on windows

Install Docker Desktop (MacOS/Windows)

Windows MacOS or brew cask install docker

GitHub Account

Sign up for a new GitHub Account following the official guidelines if you don't have an account already: Signing up for a new GitHub Account

Docker Hub Account

Sign up for a new Docker Hub account using the official sign up page

Clone the Workshop Repository

git clone <  > 

Run the application

Try running the application

python app.py

Q: How'd it go?

Build a Docker Image

cd container-workshop

docker build -t <dockerhub username>/container-workshop:0.1 .

# https://docs.docker.com/engine/reference/commandline/build/#usage

Running Our Container

demo docker run workshop vs docker run workshop -V vs docker run workshop -m pip list

Pushing Image to Docker Hub

Once the image has been built, push it to your registry

docker images <imagename:tag> --format {{.ID}}
docker tag <image-id> <your-username/repository-name>:latest
docker login
docker push <your-username/repository-name>