• Introduction
  • Support
  • Glossary
  • License
  • Acknowledgement
  • Git Version Control
    • Git Basics
    • Git and Atom: GitLab
    • Git and Atom: GitHub
    • Git in the Command Line
    • Git Scenarios
  • Learning Linux
    • Learning Linux Commands
    • Essential Commands
      • Script: Backup
      • Script: Seconds
    • Managing Files
      • Script: Create Files
    • File Permissions
    • Working with Processes
    • Services
    • System Configuration
    • Environment Customization
    • Communication Protocols
    • Task Manager (crontab, at)
    • Bash Scripting
    • Command Line Shortcuts
  • Using the HPC
    • Overview
      • Hardware
      • Storage
      • Software
    • Prerequisites
    • Request an Allocation
    • Access your Allocation
    • Execute a Job
      • Working with C++
      • Working with Fortran
      • Working with Python
      • Working with Makefiles
      • More Job Details
    • Managing Jobs
    • Modules
      • CVMFS Modules
    • Compilers
    • Workflows
      • Crystal Workflow
  • Xsede Resources
    • IU/TACC Atmosphere on Jetstream
    • Using Jetstream Virtual Machines
  • Data Transfer and Storage
    • Moving Data
      • Graphical Client SFTP
    • Globus Data Transfer Tool
      • Globus Endpoints
      • Globus Transfers & More
      • Globus Command Line Interface
  • Tools
    • Docker Containers
    • Singularity Containers
Powered by GitBook
On this page
  • Background
  • First Steps
  • Install Docker
  • Run a Test Container
  1. Tools

Docker Containers

PreviousGlobus Command Line InterfaceNextSingularity Containers

Last updated 6 years ago

📝 Note: If you are looking to eventually utilize Docker containers on an High Performance Computer (HPC), you may consider using instead, as it is designed to work in HPC systems.

Background

is a architecture and ecosystem. A nicely summarizes Docker as follows:

Docker is a tool that can package an application and its dependencies in a virtual container that can run on any Linux server. This helps enable flexibility and portability on where the application can run, whether on premises, public cloud, private cloud, bare metal, etc.

Containers have somewhat similar goals to a virtual machine (VM). However, a Docker container is not a VM. You are probably aware that VM's have some performance overhead compared to running things natively. However, it is worth noting that the applications that run inside of Docker containers actually run natively. Your Docker containers share the kernel with their host operating system. So there is no double overhead in running a container inside our VM. However, we still suffer some performance penalty by having virtualized in the first place.

Many of the applications you will be interested in deploying are already configured for very easy use with Docker. You can find public repositories of many of your favorite applications set up on .

First Steps

This tutorial uses an Ubuntu operating system.

Install Docker

The official Docker documentation to this end. Below we summarize only the steps outlined in that article. If you wish to understand an individual step or if something goes wrong, please refer to the article.

Otherwise, run:

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo apt-key fingerprint 0EBFCD88

sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

sudo apt-get update
sudo apt-get install -y docker docker.io

And if all is well, you should have Docker installed on your system.

Run a Test Container

You can test that your setup is working correctly by running:

sudo docker pull hello-world
sudo docker run hello-world

If all goes well, you will have a small "hello world"-like output and return to your terminal, and should look something like this:

That's it!

Singularity
Docker
container
linux.com article
Docker Hub
provides a lot of useful information