Introduction to Docker



Download 1,95 Mb.
bet3/3
Sana18.07.2022
Hajmi1,95 Mb.
#822127
1   2   3
Bog'liq
Saidov Og\'abek - Docker

Why Use Volumes

  • Mount local source code into a running container

  • docker container run -v $(pwd):/usr/src/app/ myapp
  • Improve performance

  • − As directory structures get complicated traversing the tree can slow system performance
  • Data persistence

Section 3: Networking

What is Docker Bridge Networking


Docker host
bridgenet1
Cntnr 1
Cntnr 2
Cntnr 3
Docker host
bridgenet2
Cntnr 4
Cntnr 5
Cntnr 6
bridgenet3
Cntnr 7
docker network create -d bridge --name bridgenet1

Docker Bridge Networking and Port Mapping


Docker host 1
Bridge
Cntnr1
10.0.0.8
L2/L3 physical network
:80
:8080
172.14.3.55
$ docker container run -p 8080:80 ...
Host port
Container port
Section 4: Docker Compose

Docker Compose: Multi Container Applications


49
  • Build and run one container at a time
  • Manually connect containers together
  • Must be careful with dependencies and start up order
  • Define multi container app in compose.yml file
  • Single command to deploy entire app
  • Handles container dependencies
  • Works with Docker Swarm, Networking, Volumes, Universal Control Plane

Docker Compose: Multi Container Applications


version: '2' # specify docker-compose version
# Define the services/containers to be run
services:
angular: # name of the first service
build: client # specify the directory of the Dockerfile
ports:
- "4200:4200" # specify port forewarding
express: #name of the second service
build: api # specify the directory of the Dockerfile
ports:
- "3977:3977" #specify ports forewarding
database: # name of the third service
image: mongo # specify image to build container from
ports:
- "27017:27017" # specify port forewarding

Docker Compose: Scale Container Applications


Demo
Angular
Node.js/Express
Mongo DB
Download 1,95 Mb.

Do'stlaringiz bilan baham:
1   2   3




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish