How to install Docker on Ubuntu 18.04?

by XDK 25. August 2019 13:28

Explanation:

Update the existing list of packages

ubuntu@ip-172-31-59-138:~$ sudo apt update

Install Docker

************************************************************************************************

Note: execute the following commands to install docker-ce [Docker Community Edition (CE)] or docker-ee [Docker Enterprise Edition (EE)]

#Install packages to allow apt to use a repository over https
sudo apt install apt-transport-https ca-certificates curl software-properties-common
#Add docker's official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# Command to setup the stable repository
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update

#Docker Community Edition (CE)
apt-cache policy docker-ce
sudo apt install docker.ce
#Docker Enterprise Edition (EE)
apt-cache policy docker-ee
sudo apt install docker.ee

*************************************************************************************************

ubuntu@ip-172-31-59-138:~$ sudo apt install docker.io

Verify Docker installation status

ubuntu@ip-172-31-59-138:~$ sudo systemctl status docker

docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: enabled)
Active: active (running) since Sat 2019-08-24 03:13:13 UTC; 8min ago
Docs: https://docs.docker.com
Main PID: 15011 (dockerd)
Tasks: 8
CGroup: /system.slice/docker.service
└─15011 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Aug 24 03:13:13 ip-172-31-59-138 dockerd[15011]: time="2019-08-24T03:13:13.484355658Z" level=warning msg="Your kernel does not support cgroup rt period"
Aug 24 03:13:13 ip-172-31-59-138 dockerd[15011]: time="2019-08-24T03:13:13.484498272Z" level=warning msg="Your kernel does not support cgroup rt runtime"
Aug 24 03:13:13 ip-172-31-59-138 dockerd[15011]: time="2019-08-24T03:13:13.489353437Z" level=info msg="Loading containers: start."
Aug 24 03:13:13 ip-172-31-59-138 dockerd[15011]: time="2019-08-24T03:13:13.663568387Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Aug 24 03:13:13 ip-172-31-59-138 dockerd[15011]: time="2019-08-24T03:13:13.754217392Z" level=info msg="Loading containers: done."
Aug 24 03:13:13 ip-172-31-59-138 dockerd[15011]: time="2019-08-24T03:13:13.758501298Z" level=warning msg="failed to retrieve runc version: unknown output format: runc version spec: 1.0.1-dev\n"
Aug 24 03:13:13 ip-172-31-59-138 dockerd[15011]: time="2019-08-24T03:13:13.806114376Z" level=info msg="Docker daemon" commit=2d0083d graphdriver(s)=overlay2 version=18.09.7
Aug 24 03:13:13 ip-172-31-59-138 dockerd[15011]: time="2019-08-24T03:13:13.806534853Z" level=info msg="Daemon has completed initialization"
Aug 24 03:13:13 ip-172-31-59-138 systemd[1]: Started Docker Application Container Engine.
Aug 24 03:13:13 ip-172-31-59-138 dockerd[15011]: time="2019-08-24T03:13:13.877186101Z" level=info msg="API listen on /var/run/docker.sock"

Add username to the docker group, to avoid using sudo to execute the docker command.

To add user (ubuntu) to any one of the supplementary group (docker), use the options '-a' and '-G'.

ubuntu@ip-172-31-59-138:~$ groups
ubuntu adm dialout cdrom floppy sudo audio dip video plugdev lxd netdev

ubuntu@ip-172-31-59-138:~$ sudo usermod -aG docker ubuntu

ubuntu@ip-172-31-59-138:~$ groups
ubuntu adm dialout cdrom floppy sudo audio dip video plugdev lxd netdev

Restart the SSH to see the changes.

ubuntu@ip-172-31-59-138:~$ groups
ubuntu adm dialout cdrom floppy sudo audio dip video plugdev lxd netdev docker

Run Docker command without sudo

ubuntu@ip-172-31-59-138:~$ docker version
Client:
Version: 18.09.7
API version: 1.39
Go version: go1.10.1
Git commit: 2d0083d
Built: Fri Aug 16 14:20:06 2019
OS/Arch: linux/amd64
Experimental: false

Server:
Engine:
Version: 18.09.7
API version: 1.39 (minimum version 1.12)
Go version: go1.10.1
Git commit: 2d0083d
Built: Wed Aug 14 19:41:23 2019
OS/Arch: linux/amd64
Experimental: false

ubuntu@ip-172-31-59-138:~$ docker info

Tags:

Amazon Web Service | Azure Native DevOps | Docker | Microsoft Azure Services

What are LAMP, WAMP, MAMP and WISA stacks?

by XDK 20. August 2019 22:59

Explanation:

The LAMP stack is the foundation for Linux hosted websites is the Linux, Apache, MySQL and PHP (LAMP) software stack.
The WAMP stack is the foundation for Windows hosted websites is the Windows, Apache, MySQL and PHP (WAMP) software stack.
The MAMP stack is the foundation for MacOS hosted websites is the MacOS, Apache, MySQL and PHP (MAMP) software stack.
The WISA stack is the foundation for Windows hosted websites is the Windows, IIS, MySQL and ASP.net (WISA) software stack.

The Layers of a Stack:
OS based web servers consist of four software components. These components, arranged in layers supporting one another, make up the software stack. Websites and Web Applications run on top of this underlying stack. The common software components that make up a traditional LAMP, WAMP, MAMP and WISA stack are:

OS (Linux\Windows\MacOS): The operating system (OS) makes up our first layer. OS sets the foundation for the stack model. All other layers run on top of this layer.

Apache: The second layer consists of web server software, which is Apache Web Server. This layer resides on top of the Linux layer. Web servers are responsible for translating from web browsers to their correct website.

Internet Information Service (IIS): The second layer consists of web server software, which is IIS. IIS is a manageable, secure and flexible service that is crucial for web hosting anything on the web. One can enable IIS on the computer operating on Windows 10.

MySQL: Our third layer is where databases live. MySQL stores details that can be queried by scripting to construct a website. MySQL usually sits on top of the Linux layer alongside Apache/layer 2. In high end configurations, MySQL can be off loaded to a separate host server.

PHP: Sitting on top of them all is our fourth and final layer. The scripting layer consists of PHP and/or other similar web programming languages. Websites and Web Applications run within this layer.

Tags:

Amazon Web Service | Azure Native DevOps | General | Microsoft Azure Services

How to connect Azure subscription with Azure DevOps project?

by XDK 16. August 2019 02:41

Solution:

Open Azure DevOps project portal --> Project settings --> Service connections (under Pipelines category) --> New service connection --> Azure Resource Manager Service connection

Enter the details

 Enter Azure credential

Tags:

Azure Native DevOps | Microsoft Azure Services

What is Blue-Green Deployment?

by XDK 4. August 2019 16:20

Explanation:

Blue-green deployment is a technique that reduces downtime and risk by running two identical production environments called Blue and Green.

At any time, only one of the environments is live, with the live environment serving all production traffic. For this example, Blue is currently live and Green is idle.

As you prepare a new version of your software, deployment and the final stage of testing takes place in the environment that is not live: in this example, Green. Once you have deployed and fully tested the software in Green, you switch the router so all incoming requests now go to Green instead of Blue. Green is now live, and Blue is idle.

This technique can eliminate downtime due to app deployment. In addition, blue-green deployment reduces risk: if something unexpected happens with your new version on Green, you can immediately roll back to the last version by switching back to Blue.

Tags:

Amazon Web Service | Azure Native DevOps | General

Work Item Relation Types - List

by XDK 23. July 2019 02:12

GET https://{instance}/{collection}/_apis/wit/workitemrelationtypes?api-version=5.0

{attributes: {…}, referenceName: "System.LinkTypes.Related-Forward", name: "Related", url: null, _links: null}
{attributes: {…}, referenceName: "System.LinkTypes.Hierarchy-Forward", name: "Child", url: null, _links: null}
{attributes: {…}, referenceName: "System.LinkTypes.Hierarchy-Reverse", name: "Parent", url: null, _links: null}
{attributes: {…}, referenceName: "System.LinkTypes.Dependency-Forward", name: "Successor", url: null, _links: null}
{attributes: {…}, referenceName: "System.LinkTypes.Dependency-Reverse", name: "Predecessor", url: null, _links: null}
{attributes: {…}, referenceName: "Microsoft.VSTS.TestCase.SharedStepReferencedBy-Forward", name: "Test
 Case", url: null, _links: null}
{attributes: {…}, referenceName: "Microsoft.VSTS.TestCase.SharedStepReferencedBy-Reverse", name: "Shared
 Steps", url: null, _links: null}
{attributes: {…}, referenceName: "Microsoft.VSTS.Common.TestedBy-Forward", name: "Tested
 By", url: null, _links: null}
{attributes: {…}, referenceName: "Microsoft.VSTS.Common.TestedBy-Reverse", name: "Tests", url: null, _links: null}
{attributes: {…}, referenceName: "System.LinkTypes.Duplicate-Forward", name: "Duplicate", url: null, _links: null}
{attributes: {…}, referenceName: "System.LinkTypes.Duplicate-Reverse", name: "Duplicate
 Of", url: null, _links: null}
{attributes: {…}, referenceName: "Microsoft.VSTS.TestCase.SharedParameterReferencedBy-Forward", name: "Referenced
 By", url: null, _links: null}
{attributes: {…}, referenceName: "Microsoft.VSTS.TestCase.SharedParameterReferencedBy-Reverse", name: "References", url: null, _links: null}
{attributes: {…}, referenceName: "Hyperlink", name: null, url: null, _links: null}
{attributes: {…}, referenceName: "ArtifactLink", name: null, url: null, _links: null}

{attributes: {…}, referenceName: "Microsoft.VSTS.Common.Affects-Forward", name: "Affected by", url: null, _links: null}
{attributes: {…}, referenceName: "Microsoft.VSTS.Common.Affects-Reverse", name: "Affects", url: null, _links: null}

 

Tags:

Azure Native DevOps | REST APIs

About the author

My name is Xavier Dilip Kumar Jayaraj having 16+ years of IT experience which includes solid experience and depth Knowledge in Application Life Cycle Management, Configuration Management, Implementation and Support using TFS on-premises and Azure DevOps. I have invested in gaining DevOps knowledege to expertise with Cloud Computing providers namely Microsoft Azure and Amazon Web Services in recent years. I am very positive to learn and adapt emerging technologies to client’s environment.

Microsoft Certified: Azure Administrator Associate

Microsoft Certified: Azure DevOps Engineer Expert

DevOps Engineer Certificate Program | Transcript 

OTP-AWSD5: AWS IoT: Developing and Deploying an Internet of Things

[PCEP-30-01] PCEP – Certified Entry-Level Python Programmer

Quotes I Like

"Failure will never overtake me if my determination to succeed is strong enough."  - Dr. APJ. Abdul Kalam

"Always be yourself, express yourself, have faith in yourself, do not go out and look for a successful personality and duplicate it." - Bruce Lee

"Technology is just a tool. In terms of getting the kids working together and motivating them, the teacher is the most important." - Bill Gates

"Innovation distinguishes between a leader and a follower." - Steve Jobs

CategoryList

Disclaimer

The information provided here is based on my expreriences, troubleshooting and online/offline findings. It can be used as is on your own risk without any warranties and I impose no rights.