Docker Setup on Linux in 4 Steps

Docker Setup on Linux in 4 Steps

CSP - AWS/Azure

Table of contents

No heading

No headings in the article.

dock.webp

Step 1 : Create AWS/Azure instance (CENTOS 7-as further labs in the sessions are being done on CENTOS07)

Below article has all details on how to create an AWS linux instance, (docs.aws.amazon.com/efs/latest/ug/gs-step-o..)

NOTE: There would be another session on how to create an instance on AWS and Azure, in case above doesn't help!

Step 2 : SSH to linux instance created,

Open your terminal (Macbook)/ Putty (Windows)/AWS Connect instance

Later on connect as root, .i.e. azureuser will changed to root ---- Command (sudo su)

image.png

Step 3 : Disable firewall and configure a swap memory for docker,

image.png

Step 4 : Install Docker via setting up a repository from where we need to pick the image,

-- Updating yum repository pkg

image.png

--Updating repo,

image.png

--Installing Docker,

image.png

--Checking status of docker post installation and starting it,

image.png

-- Running hello-world to test docker,

image.png

-- Check if the image is pulled,

image.png

-- Check if image is download which you pull,

image.png

-- Check how many versions are available for a particular image, for e.g centos

image.png

-- So now if you just command docker pull centos, it will pick up the official build with latest version which it has,

image.png

--Now, if you run with container name to login, below is output,

docker run OR docker attach

image.png

-- Details of how long a container was active and exit the container,

image.png