Skip to content

[P1] 5. Docker

Kim Seohyun edited this page Jun 27, 2022 · 8 revisions

Lecture Summary

Concepts

Docker

Docker is a Linux-based, open-source containerization platform. Developers use to build, run, and package applications for deployment using containers.

Images

Images are like blueprints containing instructions for creating a Docker container. Images define:

  • Application dependencies
  • The processes that should run when the application launches

You can get images from DockerHub or create your own images by including specific instructions within a file called Dockerfile.

Containers

Containers are live instances of images on which an application or its independent modules are run. In an object-oriented programming analogy, an image is a class and the container is an instance of that class. This allows operational efficiency by allowing to you to multiple containers from a single image.

Building With Dockerfile

Writing Dockerfile

Commands

Managing With docker-compose

Writing docker-compose.yml

Commands

Things That Were Confusing

  • USER command Screen Shot 2022-06-27 at 4 50 29 PM
  • How to install and user docker compose on ubuntu 20.04

What Else I Found Out

  • choosing alternative python version
    > sudo update-alternatives --install /usr/bin/python python /usr/bin/python${v1} 1
    > sudo update-alternatives --install /usr/bin/python python /usr/bin/python${v2} 1
    > sudo update-alternatives --config python
    

Curriculum Page
Related PR

Clone this wiki locally