Using Docker Compose
Once logged in via your terminal you are ready to get started.
Test your Docker Engine
To verify that Docker Engine is working correctly, type the following command
sudo docker run hello-world
This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits as per the following screenshot:

If you receive a message ‘Cannot connect to the Docker daemon‘, means that you will need to start the Docker service. Run the following command:
sudo systemctl start docker
or
sudo service docker start
Then re run the command to verify Docker is running
sudo docker run hello-world
Test Docker Compose
Run the following command to confirm Docker Compose is installed:
docker-compose -version
The Docker Compose version should be displayed.