hands-on lab

Getting Started with Docker on Linux for Azure

Difficulty: Beginner
Duration: Up to 1 hour and 20 minutes
Students: 1,721
Rating: 4.6/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Docker has taken DevOps by storm and ignited interest in containers. Containers offer many of the benefits of virtual machines, but in a much more efficient, less resource-intensive system. Containers allow you to package up an application in an isolated environment that can be executed across machines in a reproducible manner. No more "well, it worked on my machine" syndrome when you leverage docker for your application development and deployment.

In this lab you will get up and running with Docker on Linux using a Microsoft Azure virtual machine. You will work with images from the public Docker registry, run a handful of containers, and create your own image from which to create containers. 

Lab Objectives

Upon completion of this lab you will be able to:

  • Install Docker on Linux using an Azure virtual machine
  • Add a user to the Docker group
  • Find and use images from the public Docker Registry
  • Build your own images using Dockerfiles
  • Clean up after images and containers are finished

Lab Prerequisites

You should be familiar with:

  • What containers are
  • Working at the command line in Linux

Lab Environment

Before completing the lab instructions the environment will look as follows:

After completing the lab instructions the environment should look similar to:

 

Updates

July 1st, 2024 - Resolved package manager issue

September 10th, 2021 - Updated Lab instructions to reflect the changes in docker dependencies

December 23rd, 2020 - Upgraded the VM SKU used in the lab

May 11th, 2020 - Updated validation check to account for potentially longer check times

April 13th, 2020 - Installed validation check functions to validate students' work

Covered topics

Lab steps

Logging in to the Microsoft Azure Portal
Connecting to the Lab Provisioned Azure Virtual Machine
Installing Docker on Ubuntu Linux
Using Docker without Root Permission on Linux
Getting Docker Help from the Command Line
Running Your First Docker Container
Creating Your First Docker Image using Windows VM
Cleaning Up Your Docker Containers and Images