Dab tsi yog ntau theem tsim hauv Docker?
Dab tsi yog ntau theem tsim hauv Docker?

Video: Dab tsi yog ntau theem tsim hauv Docker?

Video: Dab tsi yog ntau theem tsim hauv Docker?
Video: Военные тактические часы-Топ-10 самых жестких военных ч... 2024, Kaum ib hlis
Anonim

A ntau - theem tsim yog ua los ntawm kev tsim cov ntu sib txawv ntawm a Dockerfile , txhua tus referencing ib lub hauv paus duab sib txawv. Qhov no tso cai rau ib ntau - theem tsim txhawm rau ua kom tiav ib qho haujlwm ua ntej ua tiav los ntawm kev siv ntau docker cov ntaub ntawv, luam cov ntaub ntawv ntawm cov thawv, lossis khiav cov kav dej sib txawv.

Tsis tas li lo lus nug yog, dab tsi yog multistage tsim hauv Docker?

Kev tsim ntau theem yog ib tug feature qhia Docker 17.05 uas tso cai rau koj los tsim ntau yam duab nruab nrab ntawm tib yam Dockerfile . Koj tuaj yeem xaiv cov khoom qub los ntawm ib theem mus rau lwm qhov, tawm hauv qab txhua yam koj tsis xav tau hauv daim duab kawg. Koj tuaj yeem nyeem ntxiv txog Kev tsim ntau theem ntawm no.

Ib tug kuj nug, koj puas tuaj yeem muaj ntau Dockerfiles? Raws li Kingsley Uchnor tau hais, Koj tuaj yeem muaj ntau Dockerfile , ib ib directory, uas sawv cev ib yam dab tsi koj xav tsim.

Qhov sib thooj, dab tsi yog lub thawv nruab nrab hauv Docker?

Docker ntim yog tsev blocks rau kev siv. Txhua thawv yog ib daim duab nrog ib txheej nyeem tau / sau tau nyob rau sab saum toj ntawm ib pawg ntawm cov ntawv nyeem nkaus xwb. Cov txheej no (tseem hu ua nruab nrab cov duab) raug tsim tawm thaum cov lus txib hauv Dockerfile raug tua thaum lub sij hawm Docker duab tsim.

Kuv yuav ua ke ntau cov duab hauv Docker li cas?

Ntawm koj lub tshuab, siv docker rub mus download tau duab los ntawm Docker Hub. Tom qab ntawd, siv docker keeb kwm kom tau txais cov lus txib uas tau siv los tsim lawv. Tom qab ntawd, qhib ob cov ntaub ntawv no. Koj tuaj yeem pom cov kab hais kom ua ntawm txhua tus duab.

Pom zoo: