Skip to content

Latest commit

 

History

History
217 lines (143 loc) · 5.87 KB

File metadata and controls

217 lines (143 loc) · 5.87 KB

|CyVerse logo|_

|Home_Icon|_ Learning Center Home

Creating and Running Docker Containers

Goal

This is a short introduction to building a Docker container. Containers are a starting point for applications within the CyVerse |Discovery Environment|, including VICE applications (See: VICE documentation), or for applications you may wish to deploy on |Atmosphere|. We will cover 1) setting up your computer for Docker, 2) pulling and running a container from Docker Hub, and 3) creating a Dockerfile.


.. toctree::
        :maxdepth: 2

        Setting up Docker on your computer <self>
        Pulling and running a container from Docker Hub <step2.rst>
        Building a container from a Dockerfile <step3.rst>



Prerequisites

Downloads, access, and services

In order to complete this tutorial you will need access to the following services/software

Prerequisite Preparation/Notes Link/Download
Docker You will need Docker CE installed on your machine complete this exercise Docker Setup
Docker Hub account You will need a Docker Hub account to complete this exercise Docker Hub
CyVerse account An account is not required but encouraged |CyVerse User Portal|
Atmosphere access An account is not required unless you wish to complete exercises using a CyVerse virtual machine (Atmosphere) |Atmosphere Manual|
An active Atmosphere instance running Ubuntu An account is not required unless you wish to complete exercises using a CyVerse virtual machine (Atmosphere) Ubuntu 18_04 GUI XFCE Base v2.0

Platform(s)

We will use the following CyVerse platform(s):

Platform Interface Link Platform Documentation Quick Start
Atmosphere Command line (ssh) and/or Desktop (VNC) |Atmosphere| |Atmosphere Manual| |Atmosphere Guide|

Setting up Docker on your computer

To get started, we need to install the "Docker daemon" - this is the software which will allow us to run Docker containers. It is usually easily installed, but since instructions may change we suggest you visit the Docker Setup website. For more background about what Docker is, please see the Docker get started website.

If you are going to run Docker on your Mac/PC/Linux computer

  1. Follow the instructions to install Docker: Docker Setup

If you are going to run Docker on your on a CyVerse Atmosphere machine

  1. Launch and connect via ssh to the Ubuntu 18_04 GUI XFCE Base v2.0 image ( see |Atmosphere Manual| for help launching and connecting)

Tip

If you are using Atmosphere, your sudo password is the same as your login credentials.

  1. Next, we need to install some dependancies to get Docker to run on our Ubuntu machine
apt-get install -y  \
apt-transport-https \
ca-certificates \
software-properties-common
  1. Next we will add a gpg key (so we can connect securely to the Docker repository)
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  1. Now we will add the Docker repository to the list of download sources
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
  1. Next, we will update the repository lists
sudo apt-get update
  1. Finally, we will install Docker
sudo apt-get install -y docker-ce

Additional information, help

Search for an answer: |CyVerse Learning Center| or |CyVerse Wiki|

Post your question to the user forum: |Ask CyVerse|


Fix or improve this documentation


|Home_Icon|_ Learning Center Home