Skip to content
/ Doker Public

The purpose of this assignment is to get familiar with the basics of docker such as pulling an image, creating and running a container and docker hub.

Notifications You must be signed in to change notification settings

ephrinaw/Doker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

Doker

The purpose of this assignment is to get familiar with the basics of docker such as pulling an image, creating and running a container and docker hub.

Materials

What is Docker?
Basic Docker Commands
Introduction to Docker (LAB)

The questions and answers

1 Docker Exercise

  1. Playing with busy box:
    a. Pull busy box image from the docker hub. image

b. Display list of all images on your system. Make sure that you have busy box as well. Write the image id for the buysbox image. image

Image ID 42b97d3c2ae9 c. Run a docker container based on the busybox image i. Docker run busybox

  1. Nothing happens. This is not true, a lot has happened in the background but because you did not provide a command, it ran an empty command and then exited. image

  2. Docker run busybox echo “hello world” image

ii. Check what containers are currently running. image

iii. List all containers that exited. image

d. Get into the interactive terminal with the -it flag and run ubuntu. It attaches an interactive terminal in the container. You can now run multiple commands. Run some of the following commands

  1. Get into the home folder and create a home directory for yourself. The directory name can be your own name. image

  2. We want to use nano text editor in the ubuntu image but is not available. Lets first update by typing apt-get update and then install nano apt-get install nano image image

  3. Get into the home folder and create a simple text file. Write a couple of lines in the text file such as your name. image

e. Now that we have several images. Let’s delete the busybox image. image

f. Delete all containers that have a status of exited. image

  1. Cleaning Up a. We have containers and images that won’t be used anymore. They occupy space therefore let’s find them and delete them image

b. Find all images image

c. Delete all images and containers that you won’t need anymore. image

d. Submit the output for docker ps -a and docker images image

  1. Create an account in Docker Hub and browse for interesting images. List some that could be useful for you. image

Some useful images:
 Ubuntu  Mysql  Maiadb  Wordpress  Django  Apach  Tomcat  Joomla  Ruby on Rails

About

The purpose of this assignment is to get familiar with the basics of docker such as pulling an image, creating and running a container and docker hub.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published