Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • https://docs.docker.com/engine/install/ubuntu/
  • Panel

    $ sudo apt-get remove docker docker-engine docker.io containerd runc

    $ sudo apt-get update

    $ sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

    $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

    $ sudo apt-get update

    $ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose

  • 설치 확인
    • Panel

      $ sudo docker run hello-world

  • 삭제
    • Panel

      $ sudo apt-get purge purge docker-ce docker-ce-cli containerd.io docker-compose

      $ sudo rm -rf /var/lib/docker

...

빌드

...


명령어

...

  • container 보기
    • sudo docker container ls
      • Tip

        <container> = <CONTAINER ID> or <IMAGE_1>

    • container 재시작
      • sudo docker restart <container>
    • container log 보기
      • sudo docker logs -f <container>
    • container 접속
      • sudo docker exec -it <container> /bin/bash