2. DOCKER & KUBERNETES : INSTALLATION
https://drive.google.com/file/d/1eq5ZGs9JH9F7R1z3wtUcKIWJi8HFr7MM/view?usp=sharing
https://drive.google.com/file/d/1eq5ZGs9JH9F7R1z3wtUcKIWJi8HFr7MM/view?usp=sharing
Docker & Kubernaties
----------------------------
LINUX FUNDAMENTALS
https://hub.docker.com/
------------------------
search for docker images
oraclelinux
Its free
In Tag : check size and version
oracle database
Its enterprice product
Its not free : it will ask for payment
oracle weblogic Server
Its not free : it will ask for payment
httpd
its free : no check out process
docker
click on explore
click - DOCKER CE
click - DOCKER EE
AWS
Azure
EE and CE difference is same as open jdk and oracle jdk
Eg:
Application performance
memory leakage support
########################################
for oracle employees/customers
container-registry.oracle.com
Sign in
Docker is Architecture
Kubernaties is a framework
##################################################################
Step6:
https://github.com
username : pavankumarmadhu123
password : Pavan_123g
Step7:
https://hub.docker.com/
username : pavankumarmadhu123
password : Pavan_123d
------------------------------------------------------------
As per the diagram we will install one by one now:
VM with Linux - TCL (Tiny Core Linux)
Docker Installed (Docker CLI)
Network of Host - NAT (Communicating externally)
VM - IP (DHCP) - HOA
SSH Keys (RSA) (Internal)
from VM should
Step8: Already we have laptop with Windows10
Step9: Oracle VM VirtualBox
Step10:
docs.docker.com
-> Search for "Docker Toolbox"
OR https://github.com/docker/toolbox/releases
-> download - DockerToolbox-19.03.1.exe
-> Install
################ EVERY DAY ACTIVITY ##############################
double click on "Docker Quickstart Terminal"
wait for sometime to generate IP address...
putty
192.168.99.100
username: docker
password: tcuser
open another terminal
Create duplicate session
username: docker
password: tcuser
sudo -i
###########################################################
docker prompt
------
docker info
##############################################
Docker Architecture
SWARM
Docker Host
Docker machine
####################################
//Search Docker Image
Go to -> hub.docker.com -> search for -> oraclelinux
OR
//Through docker command
docker search oraclelinux (to search)
//Create Docker Image (below we are creating total 3 images - oraclelinux, httpd, ubuntu)
docker pull oraclelinux
docker pull httpd (it will pull latest)
//pull particular version
docker pull ubuntu:20.04
//Verify ALL Docker Images
docker images
//Inspect Docker Image
docker inspect oraclelinux
OR
docker inspect 0f4 (Using Image Id)
docker history oraclelinux (how this image is built)
docker inspect httpd (Inspect this image)
docker images
docker system df
##################################
//Create container of httpd and verify what happens to container
//container name can be upper or lower
//image name should be lower case
docker create --name TestApache httpd
//container is a docker process so we should be able to see
docker ps -a
//start the container
docker start TestApache
docker ps -a
docker top TestApache
ps ax | grep containerd
docker inspect TestApache (it has lot of secured data we should not share to every one)
docker ps -a
ls /dev | grep tty
//go inside container and see what we can see this is just to verify..
docker exec -i -t TestApache bash (i - interactive, -t - default terminal)
ps //will not work bez we are in child process
curl //will not work bez we are in child process
docker stop TestApache
docker ps -a //u see it as Exited
docker top TestApache //since container is not running so there is no containerd available
docker start TestApache
docker top TestApache //now you will see containerd, bez above we have started the container, but will give different Id
docker images
//now we will create container for Docker Image - "oraclelinux"
docker create --name TestOL oraclelinux //it will run for milisec and exit immediately, bez we have not used -i, -t to run in foreground
docker start TestOL
docker ps -a | grep TestOL //we see as status as Exited, because its not running in foreground
docker rm TestOL //physical remove, means remove file itself
docker kill <<ContinerName>> //immediate kill
docker create -i -t --name TestOL oraclelinux //you will see created Id, to run in foreground (when we use shell then we can use this command)
docker ps -a | grep TestOL
docker top TestOL //to see containerd Id
docker ps -a
//go inside a container and check the IP address created for that container.
//exec will always create child process
docker exec TestOL cat /etc/hosts //its not bash command so no need of -i -t, means only if its a bash then use -i -t to go inside container
docker exec TestOL -i -t TestOL bash //it will create one more child process and entered in to child
exit //exiting from child process
//go to parent process
docker attach TestOL
ps ax
exit //exiting from parent process
docker ps -a
docker create -i -t --restart=always --name TestOL2 oraclelinux //create with restart policy, so that when ever exit from parent it should restart automatically
docker start TestOL2
docker attach TestOL2
exit //exit from parent
docker ps -a | gerp TestOL2 //it will be still running...
exit
docker-machine stop default

No comments:
Post a Comment