Useful Docker commands

Following are descriptions of some Docker commands that are useful for interacting with containers.

For complete list of commands, see Use the Docker command line in the Docker documentation. You can also see descriptions of each command by typing docker and pressing ENTER from your system command prompt
Table 1. Commonly used Docker commands
Command Description
docker cp <container>:<full path to container file> <destination directory on host>
Copies files from a container to the host system. For example:
docker cp domino:/local/notesdata/cert.id /tmp/cert.id
docker cp <full path to host file> <container>:<destination directory in container>
Copies files from the host system to a container. For example:
docker cp /tmp/server.id domino:/local/notesdata
docker exec -u <user name> -it <container name> <command line>

Executes a command in a container while the container is running.

Examples:
docker exec -u notes -it domino /bin/bash
docker exec -u notes -it domino /opt/hcl/domino/bin/nsd
docker image ls List the docker images on the system.
docker load --input Loads a docker image.
docker ps Shows the health status of a container.
docker rm Removes a container.
docker run Creates and starts a container. For more information including Domino-specific arguments, see Docker run command arguments.
docker start Starts a stopped container.
docker stop Stops a running container.
docker volume create Creates a volume to be used by a container.