Docker Ra'ayoyi: Container, Image kuma Docker file An Bayyana

A cikin Docker, akwai mahimman ra'ayoyi guda uku waɗanda ke da mahimmanci a fahimta: Container, Image, da. Dockerfile

 

Container

Shi ne bangaren farko a Docker. A container keɓe muhallin kisa wanda ya ƙunshi aikace-aikace da abubuwan da ke da alaƙa.

Kowanne container a ciki Docker yana aiki kamar ƙaramin injin kama-da-wane, yana ɗaukar duk abin da ake buƙata don gudanar da aikace-aikacen, gami da ɗakunan karatu, abubuwan dogaro, da daidaitawa.

Container ba ka damar gudanar da aikace-aikace akai-akai a kowane yanayi daban-daban ba tare da damuwa game da hulɗar tsakanin aikace-aikace daban-daban ba.

Kuna iya ƙirƙira, gudu, tsaida, da share container idan an buƙata.

 

Image

Fayiloli marasa nauyi ne, fakitin da ya ƙunshi duk abin da ake buƙata don ƙirƙirar container. Ana image iya gani a matsayin tsarin ƙirƙira container. Ya ƙunshi saitunan aikace-aikacen, lambar tushe, ɗakunan karatu, da fayilolin aiwatarwa.

Image ba za su iya canzawa ba, kuma kowane container da aka halicce shi daga nufin image yana da nasa yanayin keɓantacce kuma keɓantacce daga sauran container.

Kuna iya ƙirƙira, duba, da raba image yadda ake buƙata.

 

Dockerfile

Fayil ɗin rubutu ne mai sauƙi wanda ya ƙunshi umarni don gina Docker image. The yana bayyana matakai da matakai don ƙirƙirar daga takamaiman sassa da daidaitawa. Dockerfile image

Ta amfani da, zaku iya sarrafa tsarin ginin, tabbatar da daidaito da sauƙin sakewa na wurare daban-daban. Dockerfile image image

Dockerfile ya ƙunshi umarni irin su FROM(ƙayyade tushe image), RUN(aiwatar da umarni yayin aikin gini), COPY(kwafin fayiloli cikin image), da CMD(ma'anar tsoho umarni lokacin da yake container gudana).

Dockerfile yana taimaka maka ƙirƙirar al'ada image da sarrafa image tsarin ginin a sassauƙa.

 

Waɗannan ra'ayoyin sune tushen Docker kuma suna ba ku damar haɗawa, turawa, da sarrafa aikace-aikace cikin sauƙi da tsayin daka. Ta amfani da Container, Image, da, za ku iya yin amfani da sassauƙa da damar aiki a cikin tsarin ci gaba da turawa. Dockerfile Docker