What is Docker?

Jiwan Jeon·2022년 2월 16일
0

Back-end

목록 보기
3/3
post-thumbnail

Docker


✅ Docker

  • Docker enables developers to package applications & system tools & dependencies into containers and this container makes it possible on different servers, machines.

  • The main difference between VM(Virtual Machine) and Docker is whether it has its own OS or not.
  • The most popular Container Engine is "Docker"

Docker file (Build) ==> Image ==> Container

✅ Building Containers

  • Dockerfile / Image / Container

"Dockerfile" : How to make a "Container"

  • copy files
  • install dependencies
  • set environment variables
  • run setup scripts

"Image": It contains all of our executed application information. (kinda class in OOP)

"Container": It enables to run(execute) the image file in an isolated environment

✅ Public & Private

"Public"

  • DockerHub
  • RED HAT
  • Github Packages

"Private"

  • AWS
  • Google Cloud
  • Microsoft Azure

✅ Github vs Docker hub

  • Github is a code repository
  • Docker hub is a software repository

✅ Dockerfile vs Docker-compose

: Docker commands are focused on only one container(or image) at once while docker-compose manage several containers docker

✅ Docker-compose vs Docker swarm

  • Docker-compose
    : Docker-compose is used for configuring and starting multiple Docker containers on the same host so you don't have to start each container separately
  • Docker swarm
    : Docker swarm is a container orchestration tool that allows us to run and connect containers on multiple hosts

✅ Docker commands for me

  • $docker build -t <"file-name"> .
  • $docker images
  • $docker run -p <"local server #">:<"db server $"> <"file-name">
  • $docker-compose down/up
  • $docker-compose up <"file-name"> --build
  • $docker-compose up <"file-name"> -d
Image reference: 드림코드 엘리
profile
Jiwan Jeon

1개의 댓글

comment-user-thumbnail
2023년 4월 4일

who need help improving their coding skills baseball necklace , daily game solve cross

답글 달기