This module introduces the fundamentals of Docker to programmers and developers with no prior knowledge or experience of Docker. It enable developers in general to utilising Docker as a mean to setup development environments programatically and to deploy their work using containers. The first step towards mastering Infrastructure as Code.

Structure

This module is developed in the context of AP programme for Computer Science at Copenhangen School of Technology and Design (KEA). It’s part of the fulfillment of the curriculum of the topic technolgy.

Learning objectives

You will get to know the concepts Docker is built on; what it is, where it comes from, how it works, what it’s used for and where it’s headed.

You will know how to setup Docker on you own PC as well as a few other ways to gain access to docker in your environment.

You will get to use and build images and run containers.

You will familiarise yourself with the Docker CLI and you will practice the most basic commands as well as the most basis syntax of the Dockerfile.

You will become a Docker practitioner - a prerequsite to bear titles sucs as Fullstack Developer and DevOps Enginieer.

Basics

  • What is Docker?
  • What is the relation between a Docker image and a Docker container.
  • What is a Dockerfile.
  • How is Docker installed on Windows, Mac.
  • What is Docker Hub.
  • What does the following commands do? (demonstrate, and elborate on the most useful options and arguments.)
    • docker build [OPTIONS] PATH | URL | -
    • docker ps [OPTIONS]
    • docker rm [OPTIONS] CONTAINER [CONTAINER...]
    • docker rmi [OPTIONS] IMAGE [IMAGE...]
    • docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
    • docker exec [OPTIONS] CONTAINER COMMAND [ARG...]
    • docker images [OPTIONS] [REPOSITORY[:TAG]]
  • Explain the syntax of a Dockerfile including:
    • FROM
    • CMD
    • RUN
    • COPY
    • ENTRYPOINT

Advanced

  • How is Docker different from a Virtual Machine?
  • How can Docker become available on non-linux OS (e.g. Windows and MacOS)?
  • How is Docker installed on Ubuntu (Debian).
  • What does the following commands do? (demonstrate in a terminal and elborate the most useful options and arguments.)
    • docker push [OPTIONS] NAME[:TAG]
    • docker image COMMAND
    • docker buildx [OPTIONS] COMMAND
  • Explain the syntax of a Dockerfile including:
    • ADD
    • EXPOSE
    • LABEL
    • WORKDIR
    • VOLUME
  • Explain how to install a Docker CLI extension use? pushrm as an example.

Questions