Versions Compared

Key

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

Docker 설치


Docker 관리

  • docker version
  • docker -v
  • service docker start
  • service docker stop
  • systemctl enable docker


Docker 이미지 생성Docker 이미지 관리

  • docker search centos
  • docker pull centos:7
  • docker images

Docker 이미지 시작컨테이너 실행

  • Docker docker run -i -t --name inpark CONTAINERNAME centos:7 /bin/bash
  • docker run -i t -t ---server nginx

Docker 이미지 보관

  • docker commit 
  • docker push

docker attach / exec

  • name CONTAINERNAME -p 8000:80 nginx
  • exit , ctrl + P,Q
  • docker attach CONTAINERNAME
  • docker exec CONTAINERNAME
  • docker stop CONTAINERNAME && docker rm CONTAINERNAME, docker rmi CONTAINERNAME:first



Docker 이미지 관리

  • docker commit -a "jaesung" -m "my container" commitCONTAINERNAME newCONTAINERNAME:tag
  • docker tag IMAGENAME account/repository
  • docker images
  • docker login
  • docker push myAccount/containerName


Dockefiledocker file


Image Modified


Docker images volume

...