When Docker is first installed, it is not running. You must start the server with a command such as the following:
# service docker start
The Docker command has many subcommands that provide functionality. These commands will find a Docker container and download and run it. Here's a bit about the subcommands:
- # docker search: This searches Docker archives for containers with names that match a key
- # docker pull: This pulls the named container to your system
- # docker run: This runs an application in a container
- # docker ps: This lists the running Docker containers
- # docker attach: This attaches to a running container
- # docker stop: This stops a container
- # docker rm: This removes a container
The default Docker installation requires that the docker command be run either as a root or using sudo.
Each of these commands have a man page. This page is named by combining the command and subcommand with a dash. To view the docker search man page, use man docker-search.
The next recipe demonstrates how to download a Docker container and run it.