Docker is light weight and more efficient in terms of resources because it uses the host underlying kernal rather than creating it’s own hypervisor.
There are three main features Volumes Environment Variable Injection Read Only file systems
FROM, LABEL, RUN, CMD
It starts with docker file and need to build it to create image of the container then redistribute it using registry and run the containers.
Docker Swarm is native gathering for docker. It is used to group of Docker hosts into a single and virtual docker host. It provides the standard docker application program interface.
Docker stats and Docker Events
Docker compose starts in a such a order based on the link volumes form and network mode.
I can build my own image and use it for creating a Docker Container( V) I can pull an image from docker Hub and then run docker images(v) I can directly create a docker container without docker image(x)
Combination of Rest API, Socket.IO and TCP
Four States: Running, Paused, Restarting and Exited.
bridge: The default network driver host: For stand alone containers , remove network isolation between the container and the docker host Overlay: Overlay networks connect multiple docker daemons macvlan: for assigning MAC address for container none: disable all neworking
These are the mechanism for applying metadata to docker objects including, images, containers, Local daemons, volumes, network, swam nodes,swarm services.
We need to use restart policy …example …docker run always.
FROM pyhton:2.7-slim WORKDIR /app COPY . /app docker build –tag
docker push username/repository:tag
By changing the replicas value in docker compose.yml and re run the command docker stack deploy.
by using this command docker-machine create –driver virtual box myvm1.
yum install docker
It will give the more information about container in json format.
Run jenkins on docker Run integration tests jenkins using docker-compose
Engine CLI, Compose CLI, Machine CLI, DTR(Docker Trusted Registry)CLI ,UCP (Universal Control Pane) CLI.
docker container stop name docker container rm name docker image rm name
docker stats or docker top
docker plugin install
We have to use tag option docker run –log-driver=fluentd –log-opt fluentd-address=myhost.local:24224 –log-opt tag=”mailer”
4 aspects Kernal namespaces control groups docker daemon attack surface Linux kernal capabilities
Using Docker Hub and Docker Registry
docker run image /bin/bash -c “cd /path/; python a.py”
If we want to manage container scheduling over multiple hosts we will go for docker swarm.
Docker pull jenkins
1. Return on investment and cost saving Standardization and productivity CI/CD and efficiency Simple and Secure
Build, Pull and Run
1.build an image file to docker file 2.use multistage builds 3.manage application data using and bind mounts 4.scale app as a swarm
we can find using docker version command 19.03
systemctl start/stop docker service docker start/stop