Page tree
Skip to end of metadata
Go to start of metadata

설치 (Ubuntu)


  • https://docs.docker.com/engine/install/ubuntu/
  • $ 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

  • 설치 확인
    • $ sudo docker run hello-world

  • 삭제
    • $ 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
      • <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