sathreyashankar / Website-Workshop1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker 101 Workshop - Day 1

One Day workshop on understanding Docker and Containers. Learn to run a container, inspect a container and understand the isolation of processes. Create a Dockerfile, and build an image from a Dockerfile. Learn how to mount application code using volume mount. Learn how to make your app data persistent across multiple containers. Learn how to create multiple containers from a single image, run multiple containers using docker-compose, and more.

Prerequisites

Workshop environment setup

  • Check if Git, Docker, and Docker Compose are installed in on the system. Open the terminal and run the following command

    mis@mispl-lap-31:~$ git --version
    git version 2.25.1
    
    mis@mispl-lap-31:~$ docker --version
    Docker version 20.10.17, build 100c701
    
    mis@mispl-lap-31:~$ docker compose version
    Docker Compose version v2.6.0
    
    
  • Open terminal and run following command to create a folder called workshop

    mkdir workshop
    
  • Navigate to the folder workshop and clone the from your personal repo using git

    cd workshop
    
  • Clone Website-Workshop1 repo && go inside Webiste-Workshop1 folder

    git clone git@github.com:UniCourt/Website-Workshop1.git
    cd Website-Workshop1
    
  • To open folder in VS code editor

    cd ~/workshop/Website-Workshop1
    code .
    
  • If docker is not installed in your Linux run the following command

    $ curl -fsSL https://get.docker.com -o get-docker.sh
    $ sudo sh get-docker.sh
    
  • Download dockersamples/101-tutorial image and bring up the container

    sudo docker run -d -p 8081:80 dockersamples/101-tutorial
    
  • open up http://localhost:8081/ in your browser

What will you learn by the end of this workshop?

  • By the end of this workshop, you will learn what docker is and understand how to set up containers.
  • You will be introduced to containerization concepts and why it is required.
  • You will learn how to build and run your own Containers.
  • You will learn how to run Multiple Services with Docker Compose.
  • You will learn how to build and run PHP and NGNIX containers.

Schedule

Time Topics
09:00 - 09:30 [Introduction/What we do ?]
09:30 - 09:45 Video Session: Introduction to Docker and Containers
09:45 - 10:30 Simple Docker Commands
10:00 - 10:30 Getting Started, Our Application
10:00 - 11:00 Updating our App
11:00 - 11:45 Sharing our App
11:45 - 01:00 Persisting our DB and Bind Mounts
01:00 - 02:00 [Break]
02:00 - 03:30 Multi-Container Apps
03:00 - 05:00 Using Docker Compose
05:00 - 05:15 [Q & A]
05:15 - 05:30 [Wrapping Up]

About


Languages

Language:JavaScript 83.3%Language:Shell 6.6%Language:HTML 5.6%Language:CSS 2.5%Language:Dockerfile 1.2%Language:PHP 0.8%