Chapter 8 Docker Overview & Installation

This document covers the basic docker commands used frequently when working with images and containers.

8.1 What is Docker?

Docker is an amazingly popular software for creating virtual environments that can be used to deploy applications in containerized (controlled) environments.

8.2 How Docker Works

A Shiny App run on AWS EC2 consists of:

  1. Files - Controlled by git version control
  2. Software Environment - Controlled by docker image

8.3 Definitions

  1. DockerHub - An online community for storing and sharing container images. Has Public and Private repositories for image storage.

  2. Container - A container is a virtual environment that combines a Docker Image with software (files) to run an application in a controlled environment (a reproducible software environment created virtually from the Docker Image).

  3. Image - An image is an environment that has been built from a series of instructions called a DockerFile. Images can be prebuilt and hosted on DockerHub (similar to how GitHub hosts version controlled software files). The image is needed to run a Docker Container.

8.4 Installation

Install using sudo apt-get install docker.io

sudo apt-get install docker.io

Note: I no longer recommend using sudo snap install docker because the snap version may be out-dated.




Become a Expert Shiny Developer with AWS

Business Science



Have a question? Leave a comment.