MinUk.Dev
docker - minuk dev wiki

docker

created : Tue, 07 Apr 2020 20:34:43 +0900
modified : Sat, 27 Jun 2020 15:20:57 +0900
  • install

    curl -fsSL https://get.docker.com/ | sudo sh

  • user 추가

    sudo useradd {username} -m -s /bin/bash -G docker

  • docker container run

    docker run [OPTIONS] IMAGE[:TAG|@DIGEST] [COMMAND] [ARG…]

-d : detached mode (background mode)

-p : port forwarding from host port to container

-v : mount host directory

-name : configure container name

-rm : remove automatically when process terminated

-it : -i + -t ⇒ interactive terminal

-link : container link

  • sample ubuntu 18.04 image

    docker run ubuntu:18.04

    uml docker