Skip to main content

Posts

Showing posts with the label Containerisation Tips and Tricks

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? Root cause of this error message is only that DOCKER_HOST variable has not been exported to all the users. In my case it was working fine while I was running docker commands as root user but when I tried the same commands from Jenkins, didn't work. To understand this issue in detail let me create such environment and see troubleshooting steps. Docker Host - [root@server106 ~]# hostname server106.example.com Docker Client - [root@server109 ~]# hostname server109.example.com [root@server109 ~]# docker ps -a CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES [root@server109 ~]# docker ...

OpenShift - Deploy your own Blog/WebApp/Web site?

  In one of my  previous post  I have explained that how to create your own blog using Docker. We will do same practical today but this time using one of the most demanding platform-as-a-service solution. Red Hat OpenShift container platform. I have explained in my previous posts that what extra we can achieve using OpenShift. Please have a look on below posts for more details- https://rakeshkumar0504.blogspot.com/2020/04/openshift-day-1.html https://rakeshkumar0504.blogspot.com/2020/04/openshift-day2.html Let's start the practical:- I have logged into my  rol account  and have oc command ready with me. If you also want to configure oc command you down from  here  setup as below. [root@server106 ~]# cd /root/Desktop/ [root@server106 Desktop]# ll total 117532 -rwxr-xr-x. 1 root root 120350344 Apr 27  2020 oc [root@server106 Desktop]# chmod 755 oc [root@server106 Desktop]# mv oc /usr/bin/ Run [root@server106 Desktop]# oc --version c...

OpenShift Basics and high level architecture

Minimum requirement to run any program/software/application we need an environment and this kind of environment is known as operating system(OS). As I explained in last post there are total 4 techniques we have for OS provisioning , and containerization is the fastest approach. Just within few seconds we can not only launch a full flash OS but all we can access an application as well. There are lots of container tools are available like Docker, Podman, CRI-O but these are depended on runc . RUNC is lowest level which directly run on top of kernel. Just to understand in simple language we can say tha runc is a server for container tools and container tools(Docker, Podman, CRI-O) are just client of it. There are two type of docker tools we have - Daemon based and Daemon less, docker is daemon based and Podman and CRI-O are daemon less. That means in - Docker - Talk with docker.service and this services talks with runc. Podman/CRI-O - Directly talk with runc That is the tech...

OpenShift introduction and basic terminology

I am starting learning few more things from today onwards. Which are one of the most demanded technology now a days & terminology namely - Container | Docker | Podman | OpenShift . Red Hat official training under guidance of Mr. Vimal Daga . Today's learning :- There are 4 ways of OS(Operating System) provisioning we have - 1. Bare-Metal (Install OS directly on physical hardware), 2. Virtualization (VM), 3. Cloud (Instance), 4. Containerization (container). Here I'll focus on Containerization technology, containers & container orchestration. Containerization is the fastest way of OS provisioning, we can launch a full flash and ready to use OS just within few seconds. Which is known as Container. The host on which we install Docker/Podman is known as Docker/Podman host . The role of Docker is just to launch an OS. Docker is doing great whatever it was created for, but still there was few things those needs to be upgraded, and then a tool named Podman came in m...

Configure local yum on docker container

Configure local yum on docker container. Below are the simple steps to configure local yum using RHEL8 iso in docker container- Step 1 - Mount your ISO on your (Docker)local system [root@server109 ~]# mkdir /iso [root@server109 ~]# mount -o loop /RHEL-8-0-0-BaseOS-x86_64.iso /iso [root@server109 ~]# Step 2 - Launch a container [root@server109 _data]# docker container run -dit --name yum -v /run/media/root/RHEL-8-0-0-BaseOS-x86_64/:/iso  centos:7 a3483d2b718f339f6c3e9a4600e27e61086af512ef6bca67fcc1b73ada70838c -dit - Tags(Detach, Interactive, Terminal ) --name yum - Name of container -v /run/media/root/RHEL-8-0-0-BaseOS-x86_64/:/iso - /iso here dvd will bind on container centos:7 - Name of container image:version Step 3 - Attach container [root@server109 _data]# docker container attach yum [root@a3483d2b718f /]# cd /iso/ [root@a3483d2b718f iso]# ls AppStream  BaseOS  EFI  EULA  GPL  RPM-GPG-KEY-redhat-beta  RPM-GPG-KEY-redhat-rel...