Obtaining Docker system information
Whenever we need to troubleshoot our system, the commands presented in this section are essential. They provide us with a lot about the Docker engine installed on the host and about the host operating system. Let's first introduce the docker version command. It provides abundant information about the Docker client and server that your current configuration is using. If you enter the command in the CLI, you should see something similar to this:

In my case, I can see that on both client and server, I am using version 18.04.0-ce-rc2 of the Docker engine. I can also see that my orchestrator is Swarm and more.
Now to clarify what the client and what the server is, let's look at the following diagram:

You can see that the client is the little CLI through which we send Docker commands to the remote API of the Docker host. The Docker host is the container runtime which hosts the containers and might run on the same machine as the CLI, or it might run on a remote server, on-premise or in the cloud. We can use the CLI to manage different servers. We do this by setting a bunch of environment variables such as DOCKER_HOST, DOCKER_TLS_VERIFY, and DOCKER_CERT_PATH. If these environment variables are not set on your working machine and you're using Docker for Mac or Windows then that means that you are using the Docker engine that runs on your machine.
The next important command is the docker system info command. This command provides information about what mode the Docker engine is operating in (swarm mode or not), what storage driver is used for the union filesystem, what version of the Linux kernel we have on our host, and much more. Please have a careful look at the output generated by your system when running the command. Analyze what kind of information is shown:
