LXC is technology which can replace the Virtual machines like virtualbox and vmware in terms of deploying os for developers to provide them a plateform.
We will learn ton of things named below.
1. linux containers
here we will discuss about kernel namespace , cgroups , capabilities etc.
2. Docker engine
Here we will discuss about execution drivers libcontainers vs LXC
and
AUFS , overlayFS , Device Mapper
3. docker images
here docker images builds , docker create , docker inspect and many more
4. docker contianers
docker start and stop , restart
Now Installation process of docker .
Requirement:
i) RPM based any operating system generally used redhat/centos
OR
II) deb based any operating system i am using ubuntu 14.04
iii) kernel must docker supportable that is 3.10 or +
NOTE: you can find some live repository for installing dockers.
Note: To install dockers
For ubuntu
root@ashulinux:~# apt-get install docker
For Redhat
root@ashulinux:~# yum install docker-io
root@ashulinux:~# yum install docker
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Now its time for getting started with dockers and LXC
1. To check the version of docker
root@ashulinux:~# docker -v
Docker version 1.7.0-dev, build 5e06332
2. To check more infor about dockers that is drivers and storage all the things
root@ashulinux:~# docker info
Containers: 25
Images: 23
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 73
Dirperm1 Supported: false
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.13.0-63-generic
Operating System: Ubuntu 14.04.3 LTS
CPUs: 4
Total Memory: 5.632 GiB
Name: ashulinux
ID: BXSF:5EO3:FPFM:FO3G:2GKG:K76T:J5SW:ADIX:EYOS:EHKQ:7OTY:L74M
WARNING: No swap limit support
root@ashulinux:~#
Important: Docker run upon unix socket which is located at /var/run/docker.sock
3. docker can run it two style
A) as unix socket from /var/run/docker.sock
service docker start
B) as a IP:port combination
docker -H 192.168.0.7:2375 -d
Note : To connect from remote machine
use :
export DOCKER_HOST="tcp://192.168.0.7:2375"
4. searching images of different operating system in docker online hub
root@ashulinux:/var/run# docker search ubuntu
Important : how to start container based os
i) check the images available for your test
root@ashulinux:~# docker images
root@ashulinux:~# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos7http latest e00ed0e878b6 4 weeks ago 272.5 MB
centos latest 0f73ae75014f 12 weeks ago 172.3 MB
nagar latest cfdf6dcd45b9 3 months ago 202.6 MB
root@ashulinux:~#
ii) now start any given images
root@ashulinux:~# docker run -it centos7http /bin/bash
We will learn ton of things named below.
1. linux containers
here we will discuss about kernel namespace , cgroups , capabilities etc.
2. Docker engine
Here we will discuss about execution drivers libcontainers vs LXC
and
AUFS , overlayFS , Device Mapper
3. docker images
here docker images builds , docker create , docker inspect and many more
4. docker contianers
docker start and stop , restart
Now Installation process of docker .
Requirement:
i) RPM based any operating system generally used redhat/centos
OR
II) deb based any operating system i am using ubuntu 14.04
iii) kernel must docker supportable that is 3.10 or +
NOTE: you can find some live repository for installing dockers.
Note: To install dockers
For ubuntu
root@ashulinux:~# apt-get install docker
For Redhat
root@ashulinux:~# yum install docker-io
root@ashulinux:~# yum install docker
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Now its time for getting started with dockers and LXC
1. To check the version of docker
root@ashulinux:~# docker -v
Docker version 1.7.0-dev, build 5e06332
2. To check more infor about dockers that is drivers and storage all the things
root@ashulinux:~# docker info
Containers: 25
Images: 23
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 73
Dirperm1 Supported: false
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.13.0-63-generic
Operating System: Ubuntu 14.04.3 LTS
CPUs: 4
Total Memory: 5.632 GiB
Name: ashulinux
ID: BXSF:5EO3:FPFM:FO3G:2GKG:K76T:J5SW:ADIX:EYOS:EHKQ:7OTY:L74M
WARNING: No swap limit support
root@ashulinux:~#
Important: Docker run upon unix socket which is located at /var/run/docker.sock
A) as unix socket from /var/run/docker.sock
service docker start
B) as a IP:port combination
docker -H 192.168.0.7:2375 -d
Note : To connect from remote machine
use :
export DOCKER_HOST="tcp://192.168.0.7:2375"
4. searching images of different operating system in docker online hub
root@ashulinux:/var/run# docker search ubuntu
Important : how to start container based os
i) check the images available for your test
root@ashulinux:~# docker images
root@ashulinux:~# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos7http latest e00ed0e878b6 4 weeks ago 272.5 MB
centos latest 0f73ae75014f 12 weeks ago 172.3 MB
nagar latest cfdf6dcd45b9 3 months ago 202.6 MB
ii) now start any given images
root@ashulinux:~# docker run -it centos7http /bin/bash
Your blog is in a convincing manner, thanks for sharing such an information with lots of your effort and time kubernetes online training
ReplyDeleteThis information really helped me a lot. It was very informative.
ReplyDeleteDevops Services
cloudkeeda
ReplyDeletewhat is azure
azure free account
azure data factory
cloudkeeda
cloudkeeda
cloudkeeda
cloudkeeda
cloudkeeda
Experience top-tier server with our Amsterdam data center! Harness robust infrastructure for seamless operations and data security.
ReplyDelete