In this demo we look at how to install and get started with Docker.
First of all identify a system physical or virtual machine or laptop that has a supported operating
system.
In my case I have a ubuntu vm go to docs. docker.com and click on get Docker.
It will be taken to the docker engine Community Edition page.
That is the free version that we are after from the left hand menu.
Select your system type I choose Linux in my case and then select your OS flavor.
I choose Ubuntu read through the prerequisites and requirements Ubuntu system must be 64 bit and one
of these supported versions like this called cosmic bionic or xenial in my case I have a bionic version
to confirm view the etc release file next uninstall any older version if one exists so let's just make
sure that there is none on my host so I'll just copy and paste that command and I confirmed that there
are no older version that exists on my system.
The next step is to setup repository and install the software.
Now there are two ways to go about this.
The first is using the package manager by first updating the repository using the app get a command
then installing the prerequisite packages and then adding Dockers official gpg keys and then installing
Docker.
But I'm not going to go that route.
There is an easier way if you scroll all the way to the bottom you will find the instructions to install
Docker using the convenient script.
It's a script that automates the entire installation process and works on most operating systems run
the first command to download a copy of the script and then run the second command to execute the script
to install Docker automatically give it a few minutes to complete the installation
the installation is now successful that has now checked the version of Docker using the docker version
command we've installed version 19.03.1 we will now run a simple container to ensure everything
is working as expected for this.
Head over to Docker Hub at hub.docker.com
Here you will find a list of the most popular Docker images like in Nginx, Mongo DB, Alpine, Node JS,
Redis etc. Let us search for a fun image called Whalesay. Whalesay is Dockers version of cowsay which
is basically a simple application that trains a cow saying something in this case it happens to be a
whale copy the docker run command given here.
Remember to add sudo and we will change the message to Hello world
and running this command Docker pulls the image of the whalesay the application from Docker Hub and runs
it and we have our whale saying hello.
Great.
We're all set.
Remember for the purpose of this course.
You don't really need to set up a software system on your own.
We provide hands on labs that you will get access to.
But if you wish to experiment on your own and follow along.
Feel free to do so.