|Home_Icon|_ Learning Center Home
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>
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
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| |
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
- Follow the instructions to install Docker: Docker Setup
If you are going to run Docker on your on a CyVerse Atmosphere machine
- 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.
- 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
- 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 -
- 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"
- Next, we will update the repository lists
sudo apt-get update
- Finally, we will install Docker
sudo apt-get install -y docker-ce
Search for an answer: |CyVerse Learning Center| or |CyVerse Wiki|
Post your question to the user forum: |Ask CyVerse|
Fix or improve this documentation
- On Github: Github Repo Link
- Send feedback: Tutorials@CyVerse.org