Docker

Quick notes

Commands

  • docker images
  • docker run -it ubuntu <shell>
    • -v <host_dir>/<container_dir>
    • -p
    • --rm, automatically aremove the container when it exists
  • docker exec -it <container_name> bash
  • docker history <image>
  • 自下而上构建镜像层的缓存,<...>: Already existes
  • docker ps
    • -a for all