Skip to content

Introduction to Docker

jah3xc edited this page Sep 8, 2022 · 1 revision

What is Docker?

From Wikipedia:

Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers.

You can think of Docker containers as mini-VMs, so they contain all the packages, both at the OS and language level, necessary to run your software.

Why Docker?

Docker enables predictable and reliable deployment of software.

By packaging software into Docker containers, we can portably move our software to any place where docker is installed, including local development computers, compute clusters, internal compute servers, cloud infrastructure, and more!

Getting Started

  1. Download Docker desktop: https://www.docker.com/get-started/
  2. Start the getting started container:
docker run -dp 80:80 docker/getting-started
  1. Go to http://localhost

Docker Basics

To list the containers running:

docker ps

To list the images:

docker images

To build a docker image from a Dockerfile:

docker build . -t NAME

To create and run a docker container from an image:

docker run -it NAME

Clone this wiki locally