Skip to content
Tom Lauwaerts edited this page Feb 2, 2018 · 7 revisions

Docker

Install docker community edition: https://docs.docker.com/install/linux/docker-ce/ubuntu/

Docker commands: a quick overview

  • list images: docker images

  • list containers: docker ps

  • get image: docker pull <image>

  • Build an image from a Dockerfile: docker build . (current dir as context)

  • remove image: docker rmi <image>

  • build container from image: docker run -d --name="name" <image>:<tag>

  • start a container: docker start <container>

  • run a command in a running container: docker exec

    • e.g. docker exec -it <container> bash (access container by attaching a bash shell)
Clone this wiki locally