Docker is an open-source platform that allows you to automate the deployment nad management within lightweight,isolated software container.
Advantages of docker:
1.portability:
Docker container can run on any system,ensuring consistent behaviour across different environment.
2.Isolation:
Container provide isolation, preventing interference between applications and dependencies. like py2 ,py3 example
3.Efficiency:
Docker container are the light weight,start quickly,optimizing resource utilization.
4.Scalability:
Docker simplifies scaling by easily replicating and distributing containers.
5.Verssioning and Rollback
Docker enables versioning and rollback of containrized applications.
6.Dependency management:
Docker packages app with their dependencies,avoiding conflicts.
7.collaborations:
Docker facilitates sharing and collaboration among developers and teams.
Dockerfile:
Docerfile is a text file that contains instructions on how to build a Docker Image (images like python,ubuntu,react )
it specifies the base image,the application code,dependencies and other configurations needed to create a runnable image
Docker Image:
An image is a lightweight, standalone and executable software package that includes every things needed to run an application, including the coe,runtime,system tools,libraries and settings.
example: we package whatever we need to run project like django,mysql,python,postgres e.t.c
docker images are created from base image and can be customized and layered with additional components.
example python3
.....
django
Docker container
Container are isolated environments that encapsulate an application and it's dependencies, including libraries,framework andother software.
each container run as an isolated process on the host machine and has it own file system,networking and resources.
note: you can make multiple container from one docker image (dockerfile--docker image--c1,c2,c3)
Docker compose:
Docker compose is a tools for defining and managing multi-contains applications.
it allows you to define a multi-contains setup in YAML file,specifying the containers,their configurations and how they communicate with each other.
docker compose simplifies the process of running complex applications with multiple interconnected containers.
Container Registry:
It is a centeralized repository for storing and sharing containets images. it allows you to manage and distribute containerized app,ensuring secure access,versioning and image integrity.
example:docker hub,
Amazon elastic container registry(ECR)
Google container registry(GCR)
Github container registry(GHCR)
Gitlap conatinr Registry
Azure Container registry
What is docker container registry:
A docker registry is a central repository that stores docker image. the most commonly used registry is docker hub,which is a public registry where you can find a wide range of pre-build docker images.
What is base image:
A base image refer to the initila starting point for building a docker image.
it serve as a foundation or template on which you can add or customize additional layers to create your specific application images.
a bse imae is typically a pre-build and reusable image that contains a specific software stack.
it provides necessary runtime environment and libraries for runnung application with in docker containers.
example: you might needed base image that include light weight linux didtribution sucha s alpine linux or ubuntu as foundation fro your application.
regularly updating your base image and applying security patvhes is also recommended to ensure theoverall security of your containerized appliaction.
so at first you make dockerfile then from that dockerfile youmake docker image (or you can pull the docker images as well) and from that docker image you build the container(you can make multiple container from the docker image)
howto downlaod and setup docker on your device
visit docker.com then developer tap then docs and then downlaod and install for your suitable platform like window,linux,mac
for ubuntu DEB package9download)
install docker desktop(only repository)
sudo apt-get
In this tutorial we will learn about the Docker.
make dev-down
git config pull.rebase false
docker exec -it e0f2fc6c493f /bin/bash
mysql -u root -p
sudo service mysql stop
docker stop 6357
docker run -d --name new_db_container -e MYSQL_ROOT_PASSWORD=rTsBaseRpES -p 3306:3306 mysql:latest
docker run -d --name db_name -e MYSQL_ROOT_PASSWORD=rTsBaseRpES -p 3306:3306 mysql:latest
docker inspect -f '{{.Config.Env}}' db_name
sudo -u postgres psql
sudo service postgresql start
sudo dmidecode -s system-product-name
make dev-down
Amanda Martines 5 days ago
Exercitation photo booth stumptown tote bag Banksy, elit small batch freegan sed. Craft beer elit seitan exercitation, photo booth et 8-bit kale chips proident chillwave deep v laborum. Aliquip veniam delectus, Marfa eiusmod Pinterest in do umami readymade swag. Selfies iPhone Kickstarter, drinking vinegar jean.
ReplyBaltej Singh 5 days ago
Drinking vinegar stumptown yr pop-up artisan sunt. Deep v cliche lomo biodiesel Neutra selfies. Shorts fixie consequat flexitarian four loko tempor duis single-origin coffee. Banksy, elit small.
ReplyMarie Johnson 5 days ago
Kickstarter seitan retro. Drinking vinegar stumptown yr pop-up artisan sunt. Deep v cliche lomo biodiesel Neutra selfies. Shorts fixie consequat flexitarian four loko tempor duis single-origin coffee. Banksy, elit small.
Reply