Docker host

$ docker info

Search and pull Docker images:

The Docker Hub contains a huge number of Docker images with base image and applications.

  • Search:
docker search centos
  • Pull:
$ docker pull ubuntu
$ docker pull creack/apache2
  • List pulled images:
$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
ubuntu              latest              07f8e8c5e660        3 weeks ago         188.3 MB
hello-world         latest              91c95931e552        5 weeks ago         910 B

Run images

  • Interactive mode:
$ docker run ubuntu:latest echo ''hello world''
$ docker run -it ubuntu bash
  • Detached mode:
$ docker run -d ubuntu