Docker compose override yog dab tsi?
Docker compose override yog dab tsi?

Video: Docker compose override yog dab tsi?

Video: Docker compose override yog dab tsi?
Video: Docker for Development | Docker Compose Overrides 2024, Kaum ib hlis
Anonim

Cov docker - sau ntawv . override . yml yog cov ntaub ntawv teeb tsa uas koj tuaj yeem ua tau override cov chaw uas twb muaj lawm los ntawm docker - sau ntawv . yml lossis txawm ntxiv cov kev pabcuam tshiab tag nrho. Koj tuaj yeem luam qhov uas twb muaj lawm docker - sau ntawv.

Kuj nug, Docker compose rub ua dab tsi?

docker - compose rub . Rub ib daim duab txuam nrog ib qho kev pabcuam uas tau teev tseg hauv a docker - sau ntawv . yml lub docker - pawg. yml file, mas ua tsis pib ntim raws li cov duab no.

Qhov thib ob, Kuv yuav siv Docker sau li cas? Kev siv Compose yog ib qho txheej txheem peb kauj ruam:

  1. Txhais koj lub app qhov chaw ib puag ncig nrog Dockerfile kom nws tuaj yeem tsim tawm txhua qhov chaw.
  2. Txhais cov kev pabcuam uas ua rau koj lub app hauv docker-compose.yml yog li lawv tuaj yeem khiav ua ke hauv ib qho chaw sib cais.
  3. Khiav docker-compose thiab Compose pib thiab khiav koj tag nrho app.

Cov lus nug tseem yog, qhov txawv ntawm Docker thiab Docker sau yog dab tsi?

Lawv tsis tsuas zoo sib xws, tab sis lawv kuj coj zoo li docker cov neeg sib tw. Lub xwb txawv yog tias lawv cuam tshuam rau tag nrho cov thawv ntim khoom tsim tau txhais hauv docker - sau ntawv . yml configuration file thiab tsis yog ib lub thawv xwb. Koj yuav pom qee yam docker cov lus txib tsis nyob hauv docker - sau ntawv.

Dab tsi yog qhov txuas hauv Docker compose?

Raws li cov Docker Compose tus sau -file documentation: depends_on - Qhia kev vam meej ntawm cov kev pabcuam. txuas - Txuas rau ntim hauv lwm qhov kev pabcuam thiab tseem qhia txog kev vam khom ntawm cov kev pabcuam tib yam li nyob_on.

Pom zoo: