Isfirsttellyouwhatisstalkergiveyou a littlebriefintroductionaboutcontainersandallthatexplainaboutwhyit's usedforwhywe'regoingtobeusingthattoday.
Andthenwe'regoingtoactuallydosomeservermaintenanceandusedDockertosavemyself a littlebitofmoneyinmyactualdailyoperationsthat I doonthewebsitesandapps I run.
Sofirstofall, whatisstuck, erdoctoris a trend.
Itis a veryhottrendinsoftwareengineeringandnotactuallysufferengineering.
But I wouldsaymoreinthedeveloperoperationsidewhereyoudealwithsystemsengineeringscalabilityactuallyindaytodayoperations.
Ifyou'veheardofthistermbefore, wherepeoplewouldtake a singleoperatingsystemandthendividedintomanysmalloperatingsystems, eachonethinkingthatthey'rerunningontheirownsystem.
Well, theproblemwithtraditionalvirtualmachineshasbeenthatit's veryheavyweightandittakes a lotofresources, andyoudon't reallywanttoruntoomanyonthesinglesystem.
Well, I think a lotofpeople, includingmyself, arestillgraspingattryingtounderstandwhatdoctorisgoodfor, whereitcanbeused.
But I cantellyoutwokeyreasonsthat I figuredout.
ThefirstreasonhastodowithhowitallowsyoutostructureyourAPSandwritecodein a differentway.
Andthenthesecondreasonhastodowithscalability.
SowithstructureinyourAPswiththatletsyoudoisitcontainsyourappin a certainspace.
Nowthisisinteresting, becausewhen I wouldnormallycreate a Webapplication, I wouldinstall a bunchofrandomprogramsontotheserver.
After a while, I didn't reallyknowwhat I hadinstalledonthere, andonething I alwaysthoughtwas I havethiswebsitewith a bunchofsoftwareandtoolsandthestartprogramson a certainmachineand, forexample, if I everwantedtosellthiswebsitetosomebodyelse, I alwayswondered, Howwould I dothat, I'd havetoselltheserverandtheleaseontheserveraswell, andthenthey'd havetopickuptherentalbillsontheserver.
I can't takethiswebsiteandcontainitin a containerandimage, andthatisessentiallythewholeapplicationandthatcanredeploythisimageonanyotherserverandduplicatetheWebsitefunctionality.
Sothat's onegreat.
Theirbrotherisportability.
Thewaydoctorisusedisyouhaveinstructionsindicatinghowtosetup a serverjustthewayyouneedit.
So I willalwaysbeabletoknowexactlyhow a serverissetup.
Aslongas I'm creatingtheapp, thedoctorwait.
Like I mightsay, thatwebsiterequires a certaintechnologystacklikeyouneedsenttheWestRegionseven, mysequelversionfive, PHP, VersionsevenandPythonandtheManCashversion, too.
And I couldspecifyallthatandthatwouldsaythattheconfigurationfilesneedtobedone.
Everythingis a messandfurthermore, youmayfindthatsometimesyouhavecertainserviceiswhereyoucanonlyrunthesingleinstanceofflike, forexample, a PHPWebserverusuallydoesjust a singleversionofPHPrunning.
SothatiswhatissointerestingaboutDrNowwhatam I usingdoctorfortoday?
Well, letmetellyouwhat's goingonforme.
I runtheWebserveranditisabout 10 yearsoldand I'm using a fairlyoldversionofPHPlikePHP 5.6 orsomething.
And I needed a newerversionofPHPtobeabletointeractwithcertainAPeyesfor a paymentprovider.
Youknow, theywantedthenewesttechnology, andinordertoacceptpayments, I neededtousethat.
AndtherewasnowayformetousethenewestversionofPHPbecause I wouldhavetoupgrademyentiretaxstack.
Allthecodewouldprobablynotcompilecrackly.
So I havenowis I havetoWebservers.
OneWebserverismymainWebserver, andthen I have a secondverylightweightpaperusedWebservercauseabout 30 bucks a monthforme, anditisrunningthelatestversionofPHP.
I usethatforthenewerserviceisthatrequirethemostrecentintechnology, andwhat I realizedwas I couldjustusestalkertorunthelatestversionofPHPwithoutnecessarilymessingupmyotherPHPstack.
So I wasspecifiedthatthepublicHTMLvotersshouldmaptoVardabetubbytubbyslashhtmlinthecontainerrerunthisAndif I weretoreactsincethiswebsite, I canseethatthewebsiteisnowloading.
Thisisprettynice.
We'restartingtopassinlawparameters.
So I'm goingtomake a scriptcalledDrRhonda S H, whichwillencapsulatethiscommand.
Andsothisscript I firststop, doctor, if I needto I builditandthen I runitbypassingdash d tomeandetachedmonth.
If I runthescriptnow, then I couldn't seethat's runningthat.
Andwhatif I wanttologintotheserver?
Well, thewaytodothatisyourunDr P s, whichshowstheprocessisthatyou'vegotrunning.
So I findthecontenderthat I won't getintoantiloggingwithbash.
Andhere I couldjusttake a look, seewhat's goingon.
I canplayaroundandtriedtoconfiguretheenvironmentwhentheinterestingthingis, youdon't haveaccesstothemaxoranyeditors.
What I'm usinghereisSMTPThisofinstructionshereinstallsthecontainertoinstallas a 70 peakandthencopiesover a configurationfileforthepasswordinauthentication, theConfigurationfile.
I'm usinganAmazon's SCSmailservertodothemailingandthenthelastparkingfiguresPeachPeteyuseas a 70 people.
Itcostme 30 bucks a month, and I couldessentiallynotbeallocatetheserverbecause I'vecopiedovertoanotherWebserver, whichisactuallyrunninginthedockarisedcontainer.
Thenextstepyoucoulddoisyoucouldtakethisimage, deployacross a clusterofmachines, have a loadbalancedusing, say, CooperNeteaseor a doctorstormandscalethatupacrossmillionsofmachinesandservers.
Sothereyouhaveit.
That's a briefoverviewofDoctorandcontinueizationforyou.
But I wouldsaythatyoudon't necessarilywanttojumpintoittoosoonunlessyouseeyourselfneedingfor a certainpurpose, likeyouwanttheisolate, a microserviceoryoufindyourselfneedingtoscale a servicemoreacrossmultipledevices.
Thisisanexcellentresourcewheretheyexplainonvideohowtoapproachandcompletemanyinterviewcodingquestions, whiteboardingproblemsthatyoumayencounterthecomfortdatastructures, algorithms, time, spaceanalysisformanydifferentproblems.