Docsity

Docker notes from apna college, Summaries of Software Engineering

Partial preview of the text

Download Docker notes from apna college and more Summaries Software Engineering in PDF only on Docsity!

qt Do CKER a do we nced Jocrex | Rk Agere os wre 7 a look — uno Jorge 7 gos’ din ° as _vS Hane wy A re? acu Fors os & with & mac . oe node v6 the we heve wp! core meg N42 whole env ° as raerce thre—lo-col mowmre env we encour 3 while sup UC ai) m wy osu 1? Dep endo ur_CL|_ comma Ma's motel? nd rs Motch R Docke¥ Foues 19 tole ns thoi helps us burl conboune s+ . qromd DocKeRs A plak{orm Ghes ae pooh? J whok as a docker vonkuner 2 & is Single wit of O single sto wud [ bombined / auth dlependsnucr Conkaurnex Boail hurdle un woh uu hove pocked ous applica on ale (1) Ge aimoli dies the petocess of Jupli®eb? cab, the ~ in| on i 4 © oO docal env, (0). Conkasnexs vuun the same UV pacive f x Y () (9) Posopssbes of Conkouney 6 ‘n_loym / () d3ht wtroht un natunc (Vow [ess Overhead ) YY V / 7 (i) YS Ne v20 3) cz (9) Whak us a Aockes Innoye! Y U 0 e bad oe ° . bo dy) ah con cuuate mulhple _contouners uUstm a cfingle docker urtnovr, “f us _’ke a yeysion ry olockex connge dockey pull mysqi 8.0 Ed, un de ey lm (7 eee Ang olockey umoye us ™ ade up 2 lif runt doer —— Conkou POU j Chane ¢ thu dy L Reod only i! eg lmmnkodte We Con only a — re _ A_Smalh Aze roulhple oloysn ov diaun Base base dns [moul 4 uo umaye of) Same they a te a ffaruat Very Jon Can have some a 45 un commar host mop Conkoune¥ os ‘ oo lant Biddy per P 8 ould oll dock tanec J O powk bund Up them L , ? Loch contoner has a Virdual Jule Systenw ls "a 0 O axu_aléo SCp ate dom host —machrne b We Con bund the poxe af host madune to Hy pose of Vix tuok machine — un wummana ee a te Hard v0.1 ve Opplicah%or~ # Moy our lif anuac G/va dockun W virtual machane us un the lays _ that the Vv jeubu alice J O 4 Sinu_dockun only wy 2 cob" loan, So tha us muck less oveshead and us much { tex # Vastuol Machine ory comp ahble wath all unduly 404 OS pn os they I wse thine” ‘anurn Kes ne“) #Since locker wIon — tnthally built ° ° J tem _ $0 othey ac _ need! a davey (Docker desktop) ww fh Ook zoel) ° ' .) . . ° $yS FOR V 4 Dockey ois A op 0 Contouns co Smalh Junun based yi'stual_ madre that helps ives JUN OuUx contaurers # declepiy urth dockey ony @) my = UN PSY (i Dockey Network 3 Ma Wonk two wontainers bo Communrcate ywuthout an poxt oy wu thy wE an ‘i Su. tahion, compose.yaml apnacollege ~ % docker run -d \ -p27017:27017 \ -e MONGO_INITDB_ROOT_USERNAME=admin \ -e MONGO_INITDB_ROOT_PASSWORD=qwerty \ --name mongo \ --network mongo-network \ mongo mongol - “2 Docker Command 27017:27017 admin qwerty decker Compose { flerame jam 2) -d dockey Lo. mpare 7 {''crome gon down f (y Shant Co olulate th eontauney An donkouncy Bid Compose aAhommabs cally Courotes Netwosk 4F cae ting Ovy App ist A "i fP # dockin fil 0 A Dockerfile is a text-based document that's used to create a container image. It provides instructions to the image builder on the commands to run, files to copy, startup command, and more. As an example, the following Dockerfile would produce a ready-to-run Python application: > Base a python:3.12 Jusr/local/app op yy aha all unsteu chen Neot requirements.txt ./ pip install --no-cache-dir -r requirements. txt useradd app app HE Thaw QU Rj Jape af ol ma vex un doctkn Network ‘de © (By bout) (host 9 wr, (ia) nuh wr, (Berit Contour Yr Conkouaty O Bruce Vv (d (lost L. 30 > lonkauner USCS Same Network as [post rockin Ls 2? Mo Ip add Juss 2 war 25 fi mynd bah, uxolated netuwosk Jutom othey Wworkaurro Os un) as host