How to install Docker?
1) Go to the URL:- https://get.docker.com/
2) Copy the command and run it on the local system:-
curl -fsSL https://get.docker.com -o get-docker.sh
This command will get the script - get-docker.sh from the above URL and will deposit it to the local system.
3) Now to run the shell script, run the command:- sh get-docker.sh which will start the installation of docker on the local system.
In this example, I am running the command with the root user. If you like to use Docker as a non root user, then we should add our user to the docker group with something like:-
sudo usermod -aG docker youruser
Once the docker is installed, you can check the version by the command:- docker version