v1.41.yaml 374 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425
  1. # A Swagger 2.0 (a.k.a. OpenAPI) definition of the Engine API.
  2. #
  3. # This is used for generating API documentation and the types used by the
  4. # client/server. See api/README.md for more information.
  5. #
  6. # Some style notes:
  7. # - This file is used by ReDoc, which allows GitHub Flavored Markdown in
  8. # descriptions.
  9. # - There is no maximum line length, for ease of editing and pretty diffs.
  10. # - operationIds are in the format "NounVerb", with a singular noun.
  11. swagger: "2.0"
  12. schemes:
  13. - "http"
  14. - "https"
  15. produces:
  16. - "application/json"
  17. - "text/plain"
  18. consumes:
  19. - "application/json"
  20. - "text/plain"
  21. basePath: "/v1.41"
  22. info:
  23. title: "Docker Engine API"
  24. version: "1.41"
  25. x-logo:
  26. url: "https://docs.docker.com/images/logo-docker-main.png"
  27. description: |
  28. The Engine API is an HTTP API served by Docker Engine. It is the API the
  29. Docker client uses to communicate with the Engine, so everything the Docker
  30. client can do can be done with the API.
  31. Most of the client's commands map directly to API endpoints (e.g. `docker ps`
  32. is `GET /containers/json`). The notable exception is running containers,
  33. which consists of several API calls.
  34. # Errors
  35. The API uses standard HTTP status codes to indicate the success or failure
  36. of the API call. The body of the response will be JSON in the following
  37. format:
  38. ```
  39. {
  40. "message": "page not found"
  41. }
  42. ```
  43. # Versioning
  44. The API is usually changed in each release, so API calls are versioned to
  45. ensure that clients don't break. To lock to a specific version of the API,
  46. you prefix the URL with its version, for example, call `/v1.30/info` to use
  47. the v1.30 version of the `/info` endpoint. If the API version specified in
  48. the URL is not supported by the daemon, a HTTP `400 Bad Request` error message
  49. is returned.
  50. If you omit the version-prefix, the current version of the API (v1.41) is used.
  51. For example, calling `/info` is the same as calling `/v1.41/info`. Using the
  52. API without a version-prefix is deprecated and will be removed in a future release.
  53. Engine releases in the near future should support this version of the API,
  54. so your client will continue to work even if it is talking to a newer Engine.
  55. The API uses an open schema model, which means server may add extra properties
  56. to responses. Likewise, the server will ignore any extra query parameters and
  57. request body properties. When you write clients, you need to ignore additional
  58. properties in responses to ensure they do not break when talking to newer
  59. daemons.
  60. # Authentication
  61. Authentication for registries is handled client side. The client has to send
  62. authentication details to various endpoints that need to communicate with
  63. registries, such as `POST /images/(name)/push`. These are sent as
  64. `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5)
  65. (JSON) string with the following structure:
  66. ```
  67. {
  68. "username": "string",
  69. "password": "string",
  70. "email": "string",
  71. "serveraddress": "string"
  72. }
  73. ```
  74. The `serveraddress` is a domain/IP without a protocol. Throughout this
  75. structure, double quotes are required.
  76. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth),
  77. you can just pass this instead of credentials:
  78. ```
  79. {
  80. "identitytoken": "9cbaf023786cd7..."
  81. }
  82. ```
  83. # The tags on paths define the menu sections in the ReDoc documentation, so
  84. # the usage of tags must make sense for that:
  85. # - They should be singular, not plural.
  86. # - There should not be too many tags, or the menu becomes unwieldy. For
  87. # example, it is preferable to add a path to the "System" tag instead of
  88. # creating a tag with a single path in it.
  89. # - The order of tags in this list defines the order in the menu.
  90. tags:
  91. # Primary objects
  92. - name: "Container"
  93. x-displayName: "Containers"
  94. description: |
  95. Create and manage containers.
  96. - name: "Image"
  97. x-displayName: "Images"
  98. - name: "Network"
  99. x-displayName: "Networks"
  100. description: |
  101. Networks are user-defined networks that containers can be attached to.
  102. See the [networking documentation](https://docs.docker.com/network/)
  103. for more information.
  104. - name: "Volume"
  105. x-displayName: "Volumes"
  106. description: |
  107. Create and manage persistent storage that can be attached to containers.
  108. - name: "Exec"
  109. x-displayName: "Exec"
  110. description: |
  111. Run new commands inside running containers. Refer to the
  112. [command-line reference](https://docs.docker.com/engine/reference/commandline/exec/)
  113. for more information.
  114. To exec a command in a container, you first need to create an exec instance,
  115. then start it. These two API endpoints are wrapped up in a single command-line
  116. command, `docker exec`.
  117. # Swarm things
  118. - name: "Swarm"
  119. x-displayName: "Swarm"
  120. description: |
  121. Engines can be clustered together in a swarm. Refer to the
  122. [swarm mode documentation](https://docs.docker.com/engine/swarm/)
  123. for more information.
  124. - name: "Node"
  125. x-displayName: "Nodes"
  126. description: |
  127. Nodes are instances of the Engine participating in a swarm. Swarm mode
  128. must be enabled for these endpoints to work.
  129. - name: "Service"
  130. x-displayName: "Services"
  131. description: |
  132. Services are the definitions of tasks to run on a swarm. Swarm mode must
  133. be enabled for these endpoints to work.
  134. - name: "Task"
  135. x-displayName: "Tasks"
  136. description: |
  137. A task is a container running on a swarm. It is the atomic scheduling unit
  138. of swarm. Swarm mode must be enabled for these endpoints to work.
  139. - name: "Secret"
  140. x-displayName: "Secrets"
  141. description: |
  142. Secrets are sensitive data that can be used by services. Swarm mode must
  143. be enabled for these endpoints to work.
  144. - name: "Config"
  145. x-displayName: "Configs"
  146. description: |
  147. Configs are application configurations that can be used by services. Swarm
  148. mode must be enabled for these endpoints to work.
  149. # System things
  150. - name: "Plugin"
  151. x-displayName: "Plugins"
  152. - name: "System"
  153. x-displayName: "System"
  154. definitions:
  155. Port:
  156. type: "object"
  157. description: "An open port on a container"
  158. required: [PrivatePort, Type]
  159. properties:
  160. IP:
  161. type: "string"
  162. format: "ip-address"
  163. description: "Host IP address that the container's port is mapped to"
  164. PrivatePort:
  165. type: "integer"
  166. format: "uint16"
  167. x-nullable: false
  168. description: "Port on the container"
  169. PublicPort:
  170. type: "integer"
  171. format: "uint16"
  172. description: "Port exposed on the host"
  173. Type:
  174. type: "string"
  175. x-nullable: false
  176. enum: ["tcp", "udp", "sctp"]
  177. example:
  178. PrivatePort: 8080
  179. PublicPort: 80
  180. Type: "tcp"
  181. MountPoint:
  182. type: "object"
  183. description: "A mount point inside a container"
  184. properties:
  185. Type:
  186. type: "string"
  187. Name:
  188. type: "string"
  189. Source:
  190. type: "string"
  191. Destination:
  192. type: "string"
  193. Driver:
  194. type: "string"
  195. Mode:
  196. type: "string"
  197. RW:
  198. type: "boolean"
  199. Propagation:
  200. type: "string"
  201. DeviceMapping:
  202. type: "object"
  203. description: "A device mapping between the host and container"
  204. properties:
  205. PathOnHost:
  206. type: "string"
  207. PathInContainer:
  208. type: "string"
  209. CgroupPermissions:
  210. type: "string"
  211. example:
  212. PathOnHost: "/dev/deviceName"
  213. PathInContainer: "/dev/deviceName"
  214. CgroupPermissions: "mrw"
  215. DeviceRequest:
  216. type: "object"
  217. description: "A request for devices to be sent to device drivers"
  218. properties:
  219. Driver:
  220. type: "string"
  221. example: "nvidia"
  222. Count:
  223. type: "integer"
  224. example: -1
  225. DeviceIDs:
  226. type: "array"
  227. items:
  228. type: "string"
  229. example:
  230. - "0"
  231. - "1"
  232. - "GPU-fef8089b-4820-abfc-e83e-94318197576e"
  233. Capabilities:
  234. description: |
  235. A list of capabilities; an OR list of AND lists of capabilities.
  236. type: "array"
  237. items:
  238. type: "array"
  239. items:
  240. type: "string"
  241. example:
  242. # gpu AND nvidia AND compute
  243. - ["gpu", "nvidia", "compute"]
  244. Options:
  245. description: |
  246. Driver-specific options, specified as a key/value pairs. These options
  247. are passed directly to the driver.
  248. type: "object"
  249. additionalProperties:
  250. type: "string"
  251. ThrottleDevice:
  252. type: "object"
  253. properties:
  254. Path:
  255. description: "Device path"
  256. type: "string"
  257. Rate:
  258. description: "Rate"
  259. type: "integer"
  260. format: "int64"
  261. minimum: 0
  262. Mount:
  263. type: "object"
  264. properties:
  265. Target:
  266. description: "Container path."
  267. type: "string"
  268. Source:
  269. description: "Mount source (e.g. a volume name, a host path)."
  270. type: "string"
  271. Type:
  272. description: |
  273. The mount type. Available types:
  274. - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container.
  275. - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed.
  276. - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs.
  277. - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container.
  278. type: "string"
  279. enum:
  280. - "bind"
  281. - "volume"
  282. - "tmpfs"
  283. - "npipe"
  284. ReadOnly:
  285. description: "Whether the mount should be read-only."
  286. type: "boolean"
  287. Consistency:
  288. description: "The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`."
  289. type: "string"
  290. BindOptions:
  291. description: "Optional configuration for the `bind` type."
  292. type: "object"
  293. properties:
  294. Propagation:
  295. description: "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`."
  296. type: "string"
  297. enum:
  298. - "private"
  299. - "rprivate"
  300. - "shared"
  301. - "rshared"
  302. - "slave"
  303. - "rslave"
  304. NonRecursive:
  305. description: "Disable recursive bind mount."
  306. type: "boolean"
  307. default: false
  308. VolumeOptions:
  309. description: "Optional configuration for the `volume` type."
  310. type: "object"
  311. properties:
  312. NoCopy:
  313. description: "Populate volume with data from the target."
  314. type: "boolean"
  315. default: false
  316. Labels:
  317. description: "User-defined key/value metadata."
  318. type: "object"
  319. additionalProperties:
  320. type: "string"
  321. DriverConfig:
  322. description: "Map of driver specific options"
  323. type: "object"
  324. properties:
  325. Name:
  326. description: "Name of the driver to use to create the volume."
  327. type: "string"
  328. Options:
  329. description: "key/value map of driver specific options."
  330. type: "object"
  331. additionalProperties:
  332. type: "string"
  333. TmpfsOptions:
  334. description: "Optional configuration for the `tmpfs` type."
  335. type: "object"
  336. properties:
  337. SizeBytes:
  338. description: "The size for the tmpfs mount in bytes."
  339. type: "integer"
  340. format: "int64"
  341. Mode:
  342. description: "The permission mode for the tmpfs mount in an integer."
  343. type: "integer"
  344. RestartPolicy:
  345. description: |
  346. The behavior to apply when the container exits. The default is not to
  347. restart.
  348. An ever increasing delay (double the previous delay, starting at 100ms) is
  349. added before each restart to prevent flooding the server.
  350. type: "object"
  351. properties:
  352. Name:
  353. type: "string"
  354. description: |
  355. - Empty string means not to restart
  356. - `always` Always restart
  357. - `unless-stopped` Restart always except when the user has manually stopped the container
  358. - `on-failure` Restart only when the container exit code is non-zero
  359. enum:
  360. - ""
  361. - "always"
  362. - "unless-stopped"
  363. - "on-failure"
  364. MaximumRetryCount:
  365. type: "integer"
  366. description: |
  367. If `on-failure` is used, the number of times to retry before giving up.
  368. Resources:
  369. description: "A container's resources (cgroups config, ulimits, etc)"
  370. type: "object"
  371. properties:
  372. # Applicable to all platforms
  373. CpuShares:
  374. description: |
  375. An integer value representing this container's relative CPU weight
  376. versus other containers.
  377. type: "integer"
  378. Memory:
  379. description: "Memory limit in bytes."
  380. type: "integer"
  381. format: "int64"
  382. default: 0
  383. # Applicable to UNIX platforms
  384. CgroupParent:
  385. description: |
  386. Path to `cgroups` under which the container's `cgroup` is created. If
  387. the path is not absolute, the path is considered to be relative to the
  388. `cgroups` path of the init process. Cgroups are created if they do not
  389. already exist.
  390. type: "string"
  391. BlkioWeight:
  392. description: "Block IO weight (relative weight)."
  393. type: "integer"
  394. minimum: 0
  395. maximum: 1000
  396. BlkioWeightDevice:
  397. description: |
  398. Block IO weight (relative device weight) in the form:
  399. ```
  400. [{"Path": "device_path", "Weight": weight}]
  401. ```
  402. type: "array"
  403. items:
  404. type: "object"
  405. properties:
  406. Path:
  407. type: "string"
  408. Weight:
  409. type: "integer"
  410. minimum: 0
  411. BlkioDeviceReadBps:
  412. description: |
  413. Limit read rate (bytes per second) from a device, in the form:
  414. ```
  415. [{"Path": "device_path", "Rate": rate}]
  416. ```
  417. type: "array"
  418. items:
  419. $ref: "#/definitions/ThrottleDevice"
  420. BlkioDeviceWriteBps:
  421. description: |
  422. Limit write rate (bytes per second) to a device, in the form:
  423. ```
  424. [{"Path": "device_path", "Rate": rate}]
  425. ```
  426. type: "array"
  427. items:
  428. $ref: "#/definitions/ThrottleDevice"
  429. BlkioDeviceReadIOps:
  430. description: |
  431. Limit read rate (IO per second) from a device, in the form:
  432. ```
  433. [{"Path": "device_path", "Rate": rate}]
  434. ```
  435. type: "array"
  436. items:
  437. $ref: "#/definitions/ThrottleDevice"
  438. BlkioDeviceWriteIOps:
  439. description: |
  440. Limit write rate (IO per second) to a device, in the form:
  441. ```
  442. [{"Path": "device_path", "Rate": rate}]
  443. ```
  444. type: "array"
  445. items:
  446. $ref: "#/definitions/ThrottleDevice"
  447. CpuPeriod:
  448. description: "The length of a CPU period in microseconds."
  449. type: "integer"
  450. format: "int64"
  451. CpuQuota:
  452. description: |
  453. Microseconds of CPU time that the container can get in a CPU period.
  454. type: "integer"
  455. format: "int64"
  456. CpuRealtimePeriod:
  457. description: |
  458. The length of a CPU real-time period in microseconds. Set to 0 to
  459. allocate no time allocated to real-time tasks.
  460. type: "integer"
  461. format: "int64"
  462. CpuRealtimeRuntime:
  463. description: |
  464. The length of a CPU real-time runtime in microseconds. Set to 0 to
  465. allocate no time allocated to real-time tasks.
  466. type: "integer"
  467. format: "int64"
  468. CpusetCpus:
  469. description: |
  470. CPUs in which to allow execution (e.g., `0-3`, `0,1`).
  471. type: "string"
  472. example: "0-3"
  473. CpusetMems:
  474. description: |
  475. Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only
  476. effective on NUMA systems.
  477. type: "string"
  478. Devices:
  479. description: "A list of devices to add to the container."
  480. type: "array"
  481. items:
  482. $ref: "#/definitions/DeviceMapping"
  483. DeviceCgroupRules:
  484. description: "a list of cgroup rules to apply to the container"
  485. type: "array"
  486. items:
  487. type: "string"
  488. example: "c 13:* rwm"
  489. DeviceRequests:
  490. description: |
  491. A list of requests for devices to be sent to device drivers.
  492. type: "array"
  493. items:
  494. $ref: "#/definitions/DeviceRequest"
  495. KernelMemory:
  496. description: |
  497. Kernel memory limit in bytes.
  498. <p><br /></p>
  499. > **Deprecated**: This field is deprecated as the kernel 5.4 deprecated
  500. > `kmem.limit_in_bytes`.
  501. type: "integer"
  502. format: "int64"
  503. example: 209715200
  504. KernelMemoryTCP:
  505. description: "Hard limit for kernel TCP buffer memory (in bytes)."
  506. type: "integer"
  507. format: "int64"
  508. MemoryReservation:
  509. description: "Memory soft limit in bytes."
  510. type: "integer"
  511. format: "int64"
  512. MemorySwap:
  513. description: |
  514. Total memory limit (memory + swap). Set as `-1` to enable unlimited
  515. swap.
  516. type: "integer"
  517. format: "int64"
  518. MemorySwappiness:
  519. description: |
  520. Tune a container's memory swappiness behavior. Accepts an integer
  521. between 0 and 100.
  522. type: "integer"
  523. format: "int64"
  524. minimum: 0
  525. maximum: 100
  526. NanoCpus:
  527. description: "CPU quota in units of 10<sup>-9</sup> CPUs."
  528. type: "integer"
  529. format: "int64"
  530. OomKillDisable:
  531. description: "Disable OOM Killer for the container."
  532. type: "boolean"
  533. Init:
  534. description: |
  535. Run an init inside the container that forwards signals and reaps
  536. processes. This field is omitted if empty, and the default (as
  537. configured on the daemon) is used.
  538. type: "boolean"
  539. x-nullable: true
  540. PidsLimit:
  541. description: |
  542. Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null`
  543. to not change.
  544. type: "integer"
  545. format: "int64"
  546. x-nullable: true
  547. Ulimits:
  548. description: |
  549. A list of resource limits to set in the container. For example:
  550. ```
  551. {"Name": "nofile", "Soft": 1024, "Hard": 2048}
  552. ```
  553. type: "array"
  554. items:
  555. type: "object"
  556. properties:
  557. Name:
  558. description: "Name of ulimit"
  559. type: "string"
  560. Soft:
  561. description: "Soft limit"
  562. type: "integer"
  563. Hard:
  564. description: "Hard limit"
  565. type: "integer"
  566. # Applicable to Windows
  567. CpuCount:
  568. description: |
  569. The number of usable CPUs (Windows only).
  570. On Windows Server containers, the processor resource controls are
  571. mutually exclusive. The order of precedence is `CPUCount` first, then
  572. `CPUShares`, and `CPUPercent` last.
  573. type: "integer"
  574. format: "int64"
  575. CpuPercent:
  576. description: |
  577. The usable percentage of the available CPUs (Windows only).
  578. On Windows Server containers, the processor resource controls are
  579. mutually exclusive. The order of precedence is `CPUCount` first, then
  580. `CPUShares`, and `CPUPercent` last.
  581. type: "integer"
  582. format: "int64"
  583. IOMaximumIOps:
  584. description: "Maximum IOps for the container system drive (Windows only)"
  585. type: "integer"
  586. format: "int64"
  587. IOMaximumBandwidth:
  588. description: |
  589. Maximum IO in bytes per second for the container system drive
  590. (Windows only).
  591. type: "integer"
  592. format: "int64"
  593. Limit:
  594. description: |
  595. An object describing a limit on resources which can be requested by a task.
  596. type: "object"
  597. properties:
  598. NanoCPUs:
  599. type: "integer"
  600. format: "int64"
  601. example: 4000000000
  602. MemoryBytes:
  603. type: "integer"
  604. format: "int64"
  605. example: 8272408576
  606. Pids:
  607. description: |
  608. Limits the maximum number of PIDs in the container. Set `0` for unlimited.
  609. type: "integer"
  610. format: "int64"
  611. default: 0
  612. example: 100
  613. ResourceObject:
  614. description: |
  615. An object describing the resources which can be advertised by a node and
  616. requested by a task.
  617. type: "object"
  618. properties:
  619. NanoCPUs:
  620. type: "integer"
  621. format: "int64"
  622. example: 4000000000
  623. MemoryBytes:
  624. type: "integer"
  625. format: "int64"
  626. example: 8272408576
  627. GenericResources:
  628. $ref: "#/definitions/GenericResources"
  629. GenericResources:
  630. description: |
  631. User-defined resources can be either Integer resources (e.g, `SSD=3`) or
  632. String resources (e.g, `GPU=UUID1`).
  633. type: "array"
  634. items:
  635. type: "object"
  636. properties:
  637. NamedResourceSpec:
  638. type: "object"
  639. properties:
  640. Kind:
  641. type: "string"
  642. Value:
  643. type: "string"
  644. DiscreteResourceSpec:
  645. type: "object"
  646. properties:
  647. Kind:
  648. type: "string"
  649. Value:
  650. type: "integer"
  651. format: "int64"
  652. example:
  653. - DiscreteResourceSpec:
  654. Kind: "SSD"
  655. Value: 3
  656. - NamedResourceSpec:
  657. Kind: "GPU"
  658. Value: "UUID1"
  659. - NamedResourceSpec:
  660. Kind: "GPU"
  661. Value: "UUID2"
  662. HealthConfig:
  663. description: "A test to perform to check that the container is healthy."
  664. type: "object"
  665. properties:
  666. Test:
  667. description: |
  668. The test to perform. Possible values are:
  669. - `[]` inherit healthcheck from image or parent image
  670. - `["NONE"]` disable healthcheck
  671. - `["CMD", args...]` exec arguments directly
  672. - `["CMD-SHELL", command]` run command with system's default shell
  673. type: "array"
  674. items:
  675. type: "string"
  676. Interval:
  677. description: |
  678. The time to wait between checks in nanoseconds. It should be 0 or at
  679. least 1000000 (1 ms). 0 means inherit.
  680. type: "integer"
  681. Timeout:
  682. description: |
  683. The time to wait before considering the check to have hung. It should
  684. be 0 or at least 1000000 (1 ms). 0 means inherit.
  685. type: "integer"
  686. Retries:
  687. description: |
  688. The number of consecutive failures needed to consider a container as
  689. unhealthy. 0 means inherit.
  690. type: "integer"
  691. StartPeriod:
  692. description: |
  693. Start period for the container to initialize before starting
  694. health-retries countdown in nanoseconds. It should be 0 or at least
  695. 1000000 (1 ms). 0 means inherit.
  696. type: "integer"
  697. Health:
  698. description: |
  699. Health stores information about the container's healthcheck results.
  700. type: "object"
  701. properties:
  702. Status:
  703. description: |
  704. Status is one of `none`, `starting`, `healthy` or `unhealthy`
  705. - "none" Indicates there is no healthcheck
  706. - "starting" Starting indicates that the container is not yet ready
  707. - "healthy" Healthy indicates that the container is running correctly
  708. - "unhealthy" Unhealthy indicates that the container has a problem
  709. type: "string"
  710. enum:
  711. - "none"
  712. - "starting"
  713. - "healthy"
  714. - "unhealthy"
  715. example: "healthy"
  716. FailingStreak:
  717. description: "FailingStreak is the number of consecutive failures"
  718. type: "integer"
  719. example: 0
  720. Log:
  721. type: "array"
  722. description: |
  723. Log contains the last few results (oldest first)
  724. items:
  725. x-nullable: true
  726. $ref: "#/definitions/HealthcheckResult"
  727. HealthcheckResult:
  728. description: |
  729. HealthcheckResult stores information about a single run of a healthcheck probe
  730. type: "object"
  731. properties:
  732. Start:
  733. description: |
  734. Date and time at which this check started in
  735. [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  736. type: "string"
  737. format: "date-time"
  738. example: "2020-01-04T10:44:24.496525531Z"
  739. End:
  740. description: |
  741. Date and time at which this check ended in
  742. [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  743. type: "string"
  744. format: "dateTime"
  745. example: "2020-01-04T10:45:21.364524523Z"
  746. ExitCode:
  747. description: |
  748. ExitCode meanings:
  749. - `0` healthy
  750. - `1` unhealthy
  751. - `2` reserved (considered unhealthy)
  752. - other values: error running probe
  753. type: "integer"
  754. example: 0
  755. Output:
  756. description: "Output from last check"
  757. type: "string"
  758. HostConfig:
  759. description: "Container configuration that depends on the host we are running on"
  760. allOf:
  761. - $ref: "#/definitions/Resources"
  762. - type: "object"
  763. properties:
  764. # Applicable to all platforms
  765. Binds:
  766. type: "array"
  767. description: |
  768. A list of volume bindings for this container. Each volume binding
  769. is a string in one of these forms:
  770. - `host-src:container-dest[:options]` to bind-mount a host path
  771. into the container. Both `host-src`, and `container-dest` must
  772. be an _absolute_ path.
  773. - `volume-name:container-dest[:options]` to bind-mount a volume
  774. managed by a volume driver into the container. `container-dest`
  775. must be an _absolute_ path.
  776. `options` is an optional, comma-delimited list of:
  777. - `nocopy` disables automatic copying of data from the container
  778. path to the volume. The `nocopy` flag only applies to named volumes.
  779. - `[ro|rw]` mounts a volume read-only or read-write, respectively.
  780. If omitted or set to `rw`, volumes are mounted read-write.
  781. - `[z|Z]` applies SELinux labels to allow or deny multiple containers
  782. to read and write to the same volume.
  783. - `z`: a _shared_ content label is applied to the content. This
  784. label indicates that multiple containers can share the volume
  785. content, for both reading and writing.
  786. - `Z`: a _private unshared_ label is applied to the content.
  787. This label indicates that only the current container can use
  788. a private volume. Labeling systems such as SELinux require
  789. proper labels to be placed on volume content that is mounted
  790. into a container. Without a label, the security system can
  791. prevent a container's processes from using the content. By
  792. default, the labels set by the host operating system are not
  793. modified.
  794. - `[[r]shared|[r]slave|[r]private]` specifies mount
  795. [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt).
  796. This only applies to bind-mounted volumes, not internal volumes
  797. or named volumes. Mount propagation requires the source mount
  798. point (the location where the source directory is mounted in the
  799. host operating system) to have the correct propagation properties.
  800. For shared volumes, the source mount point must be set to `shared`.
  801. For slave volumes, the mount must be set to either `shared` or
  802. `slave`.
  803. items:
  804. type: "string"
  805. ContainerIDFile:
  806. type: "string"
  807. description: "Path to a file where the container ID is written"
  808. LogConfig:
  809. type: "object"
  810. description: "The logging configuration for this container"
  811. properties:
  812. Type:
  813. type: "string"
  814. enum:
  815. - "json-file"
  816. - "syslog"
  817. - "journald"
  818. - "gelf"
  819. - "fluentd"
  820. - "awslogs"
  821. - "splunk"
  822. - "etwlogs"
  823. - "none"
  824. Config:
  825. type: "object"
  826. additionalProperties:
  827. type: "string"
  828. NetworkMode:
  829. type: "string"
  830. description: |
  831. Network mode to use for this container. Supported standard values
  832. are: `bridge`, `host`, `none`, and `container:<name|id>`. Any
  833. other value is taken as a custom network's name to which this
  834. container should connect to.
  835. PortBindings:
  836. $ref: "#/definitions/PortMap"
  837. RestartPolicy:
  838. $ref: "#/definitions/RestartPolicy"
  839. AutoRemove:
  840. type: "boolean"
  841. description: |
  842. Automatically remove the container when the container's process
  843. exits. This has no effect if `RestartPolicy` is set.
  844. VolumeDriver:
  845. type: "string"
  846. description: "Driver that this container uses to mount volumes."
  847. VolumesFrom:
  848. type: "array"
  849. description: |
  850. A list of volumes to inherit from another container, specified in
  851. the form `<container name>[:<ro|rw>]`.
  852. items:
  853. type: "string"
  854. Mounts:
  855. description: |
  856. Specification for mounts to be added to the container.
  857. type: "array"
  858. items:
  859. $ref: "#/definitions/Mount"
  860. # Applicable to UNIX platforms
  861. CapAdd:
  862. type: "array"
  863. description: |
  864. A list of kernel capabilities to add to the container. Conflicts
  865. with option 'Capabilities'.
  866. items:
  867. type: "string"
  868. CapDrop:
  869. type: "array"
  870. description: |
  871. A list of kernel capabilities to drop from the container. Conflicts
  872. with option 'Capabilities'.
  873. items:
  874. type: "string"
  875. CgroupnsMode:
  876. type: "string"
  877. enum:
  878. - "private"
  879. - "host"
  880. description: |
  881. cgroup namespace mode for the container. Possible values are:
  882. - `"private"`: the container runs in its own private cgroup namespace
  883. - `"host"`: use the host system's cgroup namespace
  884. If not specified, the daemon default is used, which can either be `"private"`
  885. or `"host"`, depending on daemon version, kernel support and configuration.
  886. Dns:
  887. type: "array"
  888. description: "A list of DNS servers for the container to use."
  889. items:
  890. type: "string"
  891. DnsOptions:
  892. type: "array"
  893. description: "A list of DNS options."
  894. items:
  895. type: "string"
  896. DnsSearch:
  897. type: "array"
  898. description: "A list of DNS search domains."
  899. items:
  900. type: "string"
  901. ExtraHosts:
  902. type: "array"
  903. description: |
  904. A list of hostnames/IP mappings to add to the container's `/etc/hosts`
  905. file. Specified in the form `["hostname:IP"]`.
  906. items:
  907. type: "string"
  908. GroupAdd:
  909. type: "array"
  910. description: |
  911. A list of additional groups that the container process will run as.
  912. items:
  913. type: "string"
  914. IpcMode:
  915. type: "string"
  916. description: |
  917. IPC sharing mode for the container. Possible values are:
  918. - `"none"`: own private IPC namespace, with /dev/shm not mounted
  919. - `"private"`: own private IPC namespace
  920. - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers
  921. - `"container:<name|id>"`: join another (shareable) container's IPC namespace
  922. - `"host"`: use the host system's IPC namespace
  923. If not specified, daemon default is used, which can either be `"private"`
  924. or `"shareable"`, depending on daemon version and configuration.
  925. Cgroup:
  926. type: "string"
  927. description: "Cgroup to use for the container."
  928. Links:
  929. type: "array"
  930. description: |
  931. A list of links for the container in the form `container_name:alias`.
  932. items:
  933. type: "string"
  934. OomScoreAdj:
  935. type: "integer"
  936. description: |
  937. An integer value containing the score given to the container in
  938. order to tune OOM killer preferences.
  939. example: 500
  940. PidMode:
  941. type: "string"
  942. description: |
  943. Set the PID (Process) Namespace mode for the container. It can be
  944. either:
  945. - `"container:<name|id>"`: joins another container's PID namespace
  946. - `"host"`: use the host's PID namespace inside the container
  947. Privileged:
  948. type: "boolean"
  949. description: "Gives the container full access to the host."
  950. PublishAllPorts:
  951. type: "boolean"
  952. description: |
  953. Allocates an ephemeral host port for all of a container's
  954. exposed ports.
  955. Ports are de-allocated when the container stops and allocated when
  956. the container starts. The allocated port might be changed when
  957. restarting the container.
  958. The port is selected from the ephemeral port range that depends on
  959. the kernel. For example, on Linux the range is defined by
  960. `/proc/sys/net/ipv4/ip_local_port_range`.
  961. ReadonlyRootfs:
  962. type: "boolean"
  963. description: "Mount the container's root filesystem as read only."
  964. SecurityOpt:
  965. type: "array"
  966. description: "A list of string values to customize labels for MLS
  967. systems, such as SELinux."
  968. items:
  969. type: "string"
  970. StorageOpt:
  971. type: "object"
  972. description: |
  973. Storage driver options for this container, in the form `{"size": "120G"}`.
  974. additionalProperties:
  975. type: "string"
  976. Tmpfs:
  977. type: "object"
  978. description: |
  979. A map of container directories which should be replaced by tmpfs
  980. mounts, and their corresponding mount options. For example:
  981. ```
  982. { "/run": "rw,noexec,nosuid,size=65536k" }
  983. ```
  984. additionalProperties:
  985. type: "string"
  986. UTSMode:
  987. type: "string"
  988. description: "UTS namespace to use for the container."
  989. UsernsMode:
  990. type: "string"
  991. description: |
  992. Sets the usernamespace mode for the container when usernamespace
  993. remapping option is enabled.
  994. ShmSize:
  995. type: "integer"
  996. description: |
  997. Size of `/dev/shm` in bytes. If omitted, the system uses 64MB.
  998. minimum: 0
  999. Sysctls:
  1000. type: "object"
  1001. description: |
  1002. A list of kernel parameters (sysctls) to set in the container.
  1003. For example:
  1004. ```
  1005. {"net.ipv4.ip_forward": "1"}
  1006. ```
  1007. additionalProperties:
  1008. type: "string"
  1009. Runtime:
  1010. type: "string"
  1011. description: "Runtime to use with this container."
  1012. # Applicable to Windows
  1013. ConsoleSize:
  1014. type: "array"
  1015. description: |
  1016. Initial console size, as an `[height, width]` array. (Windows only)
  1017. minItems: 2
  1018. maxItems: 2
  1019. items:
  1020. type: "integer"
  1021. minimum: 0
  1022. Isolation:
  1023. type: "string"
  1024. description: |
  1025. Isolation technology of the container. (Windows only)
  1026. enum:
  1027. - "default"
  1028. - "process"
  1029. - "hyperv"
  1030. MaskedPaths:
  1031. type: "array"
  1032. description: |
  1033. The list of paths to be masked inside the container (this overrides
  1034. the default set of paths).
  1035. items:
  1036. type: "string"
  1037. ReadonlyPaths:
  1038. type: "array"
  1039. description: |
  1040. The list of paths to be set as read-only inside the container
  1041. (this overrides the default set of paths).
  1042. items:
  1043. type: "string"
  1044. ContainerConfig:
  1045. description: "Configuration for a container that is portable between hosts"
  1046. type: "object"
  1047. properties:
  1048. Hostname:
  1049. description: "The hostname to use for the container, as a valid RFC 1123 hostname."
  1050. type: "string"
  1051. Domainname:
  1052. description: "The domain name to use for the container."
  1053. type: "string"
  1054. User:
  1055. description: "The user that commands are run as inside the container."
  1056. type: "string"
  1057. AttachStdin:
  1058. description: "Whether to attach to `stdin`."
  1059. type: "boolean"
  1060. default: false
  1061. AttachStdout:
  1062. description: "Whether to attach to `stdout`."
  1063. type: "boolean"
  1064. default: true
  1065. AttachStderr:
  1066. description: "Whether to attach to `stderr`."
  1067. type: "boolean"
  1068. default: true
  1069. ExposedPorts:
  1070. description: |
  1071. An object mapping ports to an empty object in the form:
  1072. `{"<port>/<tcp|udp|sctp>": {}}`
  1073. type: "object"
  1074. additionalProperties:
  1075. type: "object"
  1076. enum:
  1077. - {}
  1078. default: {}
  1079. Tty:
  1080. description: |
  1081. Attach standard streams to a TTY, including `stdin` if it is not closed.
  1082. type: "boolean"
  1083. default: false
  1084. OpenStdin:
  1085. description: "Open `stdin`"
  1086. type: "boolean"
  1087. default: false
  1088. StdinOnce:
  1089. description: "Close `stdin` after one attached client disconnects"
  1090. type: "boolean"
  1091. default: false
  1092. Env:
  1093. description: |
  1094. A list of environment variables to set inside the container in the
  1095. form `["VAR=value", ...]`. A variable without `=` is removed from the
  1096. environment, rather than to have an empty value.
  1097. type: "array"
  1098. items:
  1099. type: "string"
  1100. Cmd:
  1101. description: |
  1102. Command to run specified as a string or an array of strings.
  1103. type: "array"
  1104. items:
  1105. type: "string"
  1106. Healthcheck:
  1107. $ref: "#/definitions/HealthConfig"
  1108. ArgsEscaped:
  1109. description: "Command is already escaped (Windows only)"
  1110. type: "boolean"
  1111. Image:
  1112. description: |
  1113. The name of the image to use when creating the container/
  1114. type: "string"
  1115. Volumes:
  1116. description: |
  1117. An object mapping mount point paths inside the container to empty
  1118. objects.
  1119. type: "object"
  1120. additionalProperties:
  1121. type: "object"
  1122. enum:
  1123. - {}
  1124. default: {}
  1125. WorkingDir:
  1126. description: "The working directory for commands to run in."
  1127. type: "string"
  1128. Entrypoint:
  1129. description: |
  1130. The entry point for the container as a string or an array of strings.
  1131. If the array consists of exactly one empty string (`[""]`) then the
  1132. entry point is reset to system default (i.e., the entry point used by
  1133. docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`).
  1134. type: "array"
  1135. items:
  1136. type: "string"
  1137. NetworkDisabled:
  1138. description: "Disable networking for the container."
  1139. type: "boolean"
  1140. MacAddress:
  1141. description: "MAC address of the container."
  1142. type: "string"
  1143. OnBuild:
  1144. description: |
  1145. `ONBUILD` metadata that were defined in the image's `Dockerfile`.
  1146. type: "array"
  1147. items:
  1148. type: "string"
  1149. Labels:
  1150. description: "User-defined key/value metadata."
  1151. type: "object"
  1152. additionalProperties:
  1153. type: "string"
  1154. StopSignal:
  1155. description: |
  1156. Signal to stop a container as a string or unsigned integer.
  1157. type: "string"
  1158. default: "SIGTERM"
  1159. StopTimeout:
  1160. description: "Timeout to stop a container in seconds."
  1161. type: "integer"
  1162. default: 10
  1163. Shell:
  1164. description: |
  1165. Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell.
  1166. type: "array"
  1167. items:
  1168. type: "string"
  1169. NetworkingConfig:
  1170. description: |
  1171. NetworkingConfig represents the container's networking configuration for
  1172. each of its interfaces.
  1173. It is used for the networking configs specified in the `docker create`
  1174. and `docker network connect` commands.
  1175. type: "object"
  1176. properties:
  1177. EndpointsConfig:
  1178. description: |
  1179. A mapping of network name to endpoint configuration for that network.
  1180. type: "object"
  1181. additionalProperties:
  1182. $ref: "#/definitions/EndpointSettings"
  1183. example:
  1184. # putting an example here, instead of using the example values from
  1185. # /definitions/EndpointSettings, because containers/create currently
  1186. # does not support attaching to multiple networks, so the example request
  1187. # would be confusing if it showed that multiple networks can be contained
  1188. # in the EndpointsConfig.
  1189. # TODO remove once we support multiple networks on container create (see https://github.com/moby/moby/blob/07e6b843594e061f82baa5fa23c2ff7d536c2a05/daemon/create.go#L323)
  1190. EndpointsConfig:
  1191. isolated_nw:
  1192. IPAMConfig:
  1193. IPv4Address: "172.20.30.33"
  1194. IPv6Address: "2001:db8:abcd::3033"
  1195. LinkLocalIPs:
  1196. - "169.254.34.68"
  1197. - "fe80::3468"
  1198. Links:
  1199. - "container_1"
  1200. - "container_2"
  1201. Aliases:
  1202. - "server_x"
  1203. - "server_y"
  1204. NetworkSettings:
  1205. description: "NetworkSettings exposes the network settings in the API"
  1206. type: "object"
  1207. properties:
  1208. Bridge:
  1209. description: Name of the network's bridge (for example, `docker0`).
  1210. type: "string"
  1211. example: "docker0"
  1212. SandboxID:
  1213. description: SandboxID uniquely represents a container's network stack.
  1214. type: "string"
  1215. example: "9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3"
  1216. HairpinMode:
  1217. description: |
  1218. Indicates if hairpin NAT should be enabled on the virtual interface.
  1219. type: "boolean"
  1220. example: false
  1221. LinkLocalIPv6Address:
  1222. description: IPv6 unicast address using the link-local prefix.
  1223. type: "string"
  1224. example: "fe80::42:acff:fe11:1"
  1225. LinkLocalIPv6PrefixLen:
  1226. description: Prefix length of the IPv6 unicast address.
  1227. type: "integer"
  1228. example: "64"
  1229. Ports:
  1230. $ref: "#/definitions/PortMap"
  1231. SandboxKey:
  1232. description: SandboxKey identifies the sandbox
  1233. type: "string"
  1234. example: "/var/run/docker/netns/8ab54b426c38"
  1235. # TODO is SecondaryIPAddresses actually used?
  1236. SecondaryIPAddresses:
  1237. description: ""
  1238. type: "array"
  1239. items:
  1240. $ref: "#/definitions/Address"
  1241. x-nullable: true
  1242. # TODO is SecondaryIPv6Addresses actually used?
  1243. SecondaryIPv6Addresses:
  1244. description: ""
  1245. type: "array"
  1246. items:
  1247. $ref: "#/definitions/Address"
  1248. x-nullable: true
  1249. # TODO properties below are part of DefaultNetworkSettings, which is
  1250. # marked as deprecated since Docker 1.9 and to be removed in Docker v17.12
  1251. EndpointID:
  1252. description: |
  1253. EndpointID uniquely represents a service endpoint in a Sandbox.
  1254. <p><br /></p>
  1255. > **Deprecated**: This field is only propagated when attached to the
  1256. > default "bridge" network. Use the information from the "bridge"
  1257. > network inside the `Networks` map instead, which contains the same
  1258. > information. This field was deprecated in Docker 1.9 and is scheduled
  1259. > to be removed in Docker 17.12.0
  1260. type: "string"
  1261. example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b"
  1262. Gateway:
  1263. description: |
  1264. Gateway address for the default "bridge" network.
  1265. <p><br /></p>
  1266. > **Deprecated**: This field is only propagated when attached to the
  1267. > default "bridge" network. Use the information from the "bridge"
  1268. > network inside the `Networks` map instead, which contains the same
  1269. > information. This field was deprecated in Docker 1.9 and is scheduled
  1270. > to be removed in Docker 17.12.0
  1271. type: "string"
  1272. example: "172.17.0.1"
  1273. GlobalIPv6Address:
  1274. description: |
  1275. Global IPv6 address for the default "bridge" network.
  1276. <p><br /></p>
  1277. > **Deprecated**: This field is only propagated when attached to the
  1278. > default "bridge" network. Use the information from the "bridge"
  1279. > network inside the `Networks` map instead, which contains the same
  1280. > information. This field was deprecated in Docker 1.9 and is scheduled
  1281. > to be removed in Docker 17.12.0
  1282. type: "string"
  1283. example: "2001:db8::5689"
  1284. GlobalIPv6PrefixLen:
  1285. description: |
  1286. Mask length of the global IPv6 address.
  1287. <p><br /></p>
  1288. > **Deprecated**: This field is only propagated when attached to the
  1289. > default "bridge" network. Use the information from the "bridge"
  1290. > network inside the `Networks` map instead, which contains the same
  1291. > information. This field was deprecated in Docker 1.9 and is scheduled
  1292. > to be removed in Docker 17.12.0
  1293. type: "integer"
  1294. example: 64
  1295. IPAddress:
  1296. description: |
  1297. IPv4 address for the default "bridge" network.
  1298. <p><br /></p>
  1299. > **Deprecated**: This field is only propagated when attached to the
  1300. > default "bridge" network. Use the information from the "bridge"
  1301. > network inside the `Networks` map instead, which contains the same
  1302. > information. This field was deprecated in Docker 1.9 and is scheduled
  1303. > to be removed in Docker 17.12.0
  1304. type: "string"
  1305. example: "172.17.0.4"
  1306. IPPrefixLen:
  1307. description: |
  1308. Mask length of the IPv4 address.
  1309. <p><br /></p>
  1310. > **Deprecated**: This field is only propagated when attached to the
  1311. > default "bridge" network. Use the information from the "bridge"
  1312. > network inside the `Networks` map instead, which contains the same
  1313. > information. This field was deprecated in Docker 1.9 and is scheduled
  1314. > to be removed in Docker 17.12.0
  1315. type: "integer"
  1316. example: 16
  1317. IPv6Gateway:
  1318. description: |
  1319. IPv6 gateway address for this network.
  1320. <p><br /></p>
  1321. > **Deprecated**: This field is only propagated when attached to the
  1322. > default "bridge" network. Use the information from the "bridge"
  1323. > network inside the `Networks` map instead, which contains the same
  1324. > information. This field was deprecated in Docker 1.9 and is scheduled
  1325. > to be removed in Docker 17.12.0
  1326. type: "string"
  1327. example: "2001:db8:2::100"
  1328. MacAddress:
  1329. description: |
  1330. MAC address for the container on the default "bridge" network.
  1331. <p><br /></p>
  1332. > **Deprecated**: This field is only propagated when attached to the
  1333. > default "bridge" network. Use the information from the "bridge"
  1334. > network inside the `Networks` map instead, which contains the same
  1335. > information. This field was deprecated in Docker 1.9 and is scheduled
  1336. > to be removed in Docker 17.12.0
  1337. type: "string"
  1338. example: "02:42:ac:11:00:04"
  1339. Networks:
  1340. description: |
  1341. Information about all networks that the container is connected to.
  1342. type: "object"
  1343. additionalProperties:
  1344. $ref: "#/definitions/EndpointSettings"
  1345. Address:
  1346. description: Address represents an IPv4 or IPv6 IP address.
  1347. type: "object"
  1348. properties:
  1349. Addr:
  1350. description: IP address.
  1351. type: "string"
  1352. PrefixLen:
  1353. description: Mask length of the IP address.
  1354. type: "integer"
  1355. PortMap:
  1356. description: |
  1357. PortMap describes the mapping of container ports to host ports, using the
  1358. container's port-number and protocol as key in the format `<port>/<protocol>`,
  1359. for example, `80/udp`.
  1360. If a container's port is mapped for multiple protocols, separate entries
  1361. are added to the mapping table.
  1362. type: "object"
  1363. additionalProperties:
  1364. type: "array"
  1365. x-nullable: true
  1366. items:
  1367. $ref: "#/definitions/PortBinding"
  1368. example:
  1369. "443/tcp":
  1370. - HostIp: "127.0.0.1"
  1371. HostPort: "4443"
  1372. "80/tcp":
  1373. - HostIp: "0.0.0.0"
  1374. HostPort: "80"
  1375. - HostIp: "0.0.0.0"
  1376. HostPort: "8080"
  1377. "80/udp":
  1378. - HostIp: "0.0.0.0"
  1379. HostPort: "80"
  1380. "53/udp":
  1381. - HostIp: "0.0.0.0"
  1382. HostPort: "53"
  1383. "2377/tcp": null
  1384. PortBinding:
  1385. description: |
  1386. PortBinding represents a binding between a host IP address and a host
  1387. port.
  1388. type: "object"
  1389. properties:
  1390. HostIp:
  1391. description: "Host IP address that the container's port is mapped to."
  1392. type: "string"
  1393. example: "127.0.0.1"
  1394. HostPort:
  1395. description: "Host port number that the container's port is mapped to."
  1396. type: "string"
  1397. example: "4443"
  1398. GraphDriverData:
  1399. description: "Information about a container's graph driver."
  1400. type: "object"
  1401. required: [Name, Data]
  1402. properties:
  1403. Name:
  1404. type: "string"
  1405. x-nullable: false
  1406. Data:
  1407. type: "object"
  1408. x-nullable: false
  1409. additionalProperties:
  1410. type: "string"
  1411. Image:
  1412. type: "object"
  1413. required:
  1414. - Id
  1415. - Parent
  1416. - Comment
  1417. - Created
  1418. - Container
  1419. - DockerVersion
  1420. - Author
  1421. - Architecture
  1422. - Os
  1423. - Size
  1424. - VirtualSize
  1425. - GraphDriver
  1426. - RootFS
  1427. properties:
  1428. Id:
  1429. type: "string"
  1430. x-nullable: false
  1431. RepoTags:
  1432. type: "array"
  1433. items:
  1434. type: "string"
  1435. RepoDigests:
  1436. type: "array"
  1437. items:
  1438. type: "string"
  1439. Parent:
  1440. type: "string"
  1441. x-nullable: false
  1442. Comment:
  1443. type: "string"
  1444. x-nullable: false
  1445. Created:
  1446. type: "string"
  1447. x-nullable: false
  1448. Container:
  1449. type: "string"
  1450. x-nullable: false
  1451. ContainerConfig:
  1452. $ref: "#/definitions/ContainerConfig"
  1453. DockerVersion:
  1454. type: "string"
  1455. x-nullable: false
  1456. Author:
  1457. type: "string"
  1458. x-nullable: false
  1459. Config:
  1460. $ref: "#/definitions/ContainerConfig"
  1461. Architecture:
  1462. type: "string"
  1463. x-nullable: false
  1464. Os:
  1465. type: "string"
  1466. x-nullable: false
  1467. OsVersion:
  1468. type: "string"
  1469. Size:
  1470. type: "integer"
  1471. format: "int64"
  1472. x-nullable: false
  1473. VirtualSize:
  1474. type: "integer"
  1475. format: "int64"
  1476. x-nullable: false
  1477. GraphDriver:
  1478. $ref: "#/definitions/GraphDriverData"
  1479. RootFS:
  1480. type: "object"
  1481. required: [Type]
  1482. properties:
  1483. Type:
  1484. type: "string"
  1485. x-nullable: false
  1486. Layers:
  1487. type: "array"
  1488. items:
  1489. type: "string"
  1490. BaseLayer:
  1491. type: "string"
  1492. Metadata:
  1493. type: "object"
  1494. properties:
  1495. LastTagTime:
  1496. type: "string"
  1497. format: "dateTime"
  1498. ImageSummary:
  1499. type: "object"
  1500. required:
  1501. - Id
  1502. - ParentId
  1503. - RepoTags
  1504. - RepoDigests
  1505. - Created
  1506. - Size
  1507. - SharedSize
  1508. - VirtualSize
  1509. - Labels
  1510. - Containers
  1511. properties:
  1512. Id:
  1513. type: "string"
  1514. x-nullable: false
  1515. ParentId:
  1516. type: "string"
  1517. x-nullable: false
  1518. RepoTags:
  1519. type: "array"
  1520. x-nullable: false
  1521. items:
  1522. type: "string"
  1523. RepoDigests:
  1524. type: "array"
  1525. x-nullable: false
  1526. items:
  1527. type: "string"
  1528. Created:
  1529. type: "integer"
  1530. x-nullable: false
  1531. Size:
  1532. type: "integer"
  1533. x-nullable: false
  1534. SharedSize:
  1535. type: "integer"
  1536. x-nullable: false
  1537. VirtualSize:
  1538. type: "integer"
  1539. x-nullable: false
  1540. Labels:
  1541. type: "object"
  1542. x-nullable: false
  1543. additionalProperties:
  1544. type: "string"
  1545. Containers:
  1546. x-nullable: false
  1547. type: "integer"
  1548. AuthConfig:
  1549. type: "object"
  1550. properties:
  1551. username:
  1552. type: "string"
  1553. password:
  1554. type: "string"
  1555. email:
  1556. type: "string"
  1557. serveraddress:
  1558. type: "string"
  1559. example:
  1560. username: "hannibal"
  1561. password: "xxxx"
  1562. serveraddress: "https://index.docker.io/v1/"
  1563. ProcessConfig:
  1564. type: "object"
  1565. properties:
  1566. privileged:
  1567. type: "boolean"
  1568. user:
  1569. type: "string"
  1570. tty:
  1571. type: "boolean"
  1572. entrypoint:
  1573. type: "string"
  1574. arguments:
  1575. type: "array"
  1576. items:
  1577. type: "string"
  1578. Volume:
  1579. type: "object"
  1580. required: [Name, Driver, Mountpoint, Labels, Scope, Options]
  1581. properties:
  1582. Name:
  1583. type: "string"
  1584. description: "Name of the volume."
  1585. x-nullable: false
  1586. Driver:
  1587. type: "string"
  1588. description: "Name of the volume driver used by the volume."
  1589. x-nullable: false
  1590. Mountpoint:
  1591. type: "string"
  1592. description: "Mount path of the volume on the host."
  1593. x-nullable: false
  1594. CreatedAt:
  1595. type: "string"
  1596. format: "dateTime"
  1597. description: "Date/Time the volume was created."
  1598. Status:
  1599. type: "object"
  1600. description: |
  1601. Low-level details about the volume, provided by the volume driver.
  1602. Details are returned as a map with key/value pairs:
  1603. `{"key":"value","key2":"value2"}`.
  1604. The `Status` field is optional, and is omitted if the volume driver
  1605. does not support this feature.
  1606. additionalProperties:
  1607. type: "object"
  1608. Labels:
  1609. type: "object"
  1610. description: "User-defined key/value metadata."
  1611. x-nullable: false
  1612. additionalProperties:
  1613. type: "string"
  1614. Scope:
  1615. type: "string"
  1616. description: |
  1617. The level at which the volume exists. Either `global` for cluster-wide,
  1618. or `local` for machine level.
  1619. default: "local"
  1620. x-nullable: false
  1621. enum: ["local", "global"]
  1622. Options:
  1623. type: "object"
  1624. description: |
  1625. The driver specific options used when creating the volume.
  1626. additionalProperties:
  1627. type: "string"
  1628. UsageData:
  1629. type: "object"
  1630. x-nullable: true
  1631. required: [Size, RefCount]
  1632. description: |
  1633. Usage details about the volume. This information is used by the
  1634. `GET /system/df` endpoint, and omitted in other endpoints.
  1635. properties:
  1636. Size:
  1637. type: "integer"
  1638. default: -1
  1639. description: |
  1640. Amount of disk space used by the volume (in bytes). This information
  1641. is only available for volumes created with the `"local"` volume
  1642. driver. For volumes created with other volume drivers, this field
  1643. is set to `-1` ("not available")
  1644. x-nullable: false
  1645. RefCount:
  1646. type: "integer"
  1647. default: -1
  1648. description: |
  1649. The number of containers referencing this volume. This field
  1650. is set to `-1` if the reference-count is not available.
  1651. x-nullable: false
  1652. example:
  1653. Name: "tardis"
  1654. Driver: "custom"
  1655. Mountpoint: "/var/lib/docker/volumes/tardis"
  1656. Status:
  1657. hello: "world"
  1658. Labels:
  1659. com.example.some-label: "some-value"
  1660. com.example.some-other-label: "some-other-value"
  1661. Scope: "local"
  1662. CreatedAt: "2016-06-07T20:31:11.853781916Z"
  1663. Network:
  1664. type: "object"
  1665. properties:
  1666. Name:
  1667. type: "string"
  1668. Id:
  1669. type: "string"
  1670. Created:
  1671. type: "string"
  1672. format: "dateTime"
  1673. Scope:
  1674. type: "string"
  1675. Driver:
  1676. type: "string"
  1677. EnableIPv6:
  1678. type: "boolean"
  1679. IPAM:
  1680. $ref: "#/definitions/IPAM"
  1681. Internal:
  1682. type: "boolean"
  1683. Attachable:
  1684. type: "boolean"
  1685. Ingress:
  1686. type: "boolean"
  1687. Containers:
  1688. type: "object"
  1689. additionalProperties:
  1690. $ref: "#/definitions/NetworkContainer"
  1691. Options:
  1692. type: "object"
  1693. additionalProperties:
  1694. type: "string"
  1695. Labels:
  1696. type: "object"
  1697. additionalProperties:
  1698. type: "string"
  1699. example:
  1700. Name: "net01"
  1701. Id: "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99"
  1702. Created: "2016-10-19T04:33:30.360899459Z"
  1703. Scope: "local"
  1704. Driver: "bridge"
  1705. EnableIPv6: false
  1706. IPAM:
  1707. Driver: "default"
  1708. Config:
  1709. - Subnet: "172.19.0.0/16"
  1710. Gateway: "172.19.0.1"
  1711. Options:
  1712. foo: "bar"
  1713. Internal: false
  1714. Attachable: false
  1715. Ingress: false
  1716. Containers:
  1717. 19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c:
  1718. Name: "test"
  1719. EndpointID: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a"
  1720. MacAddress: "02:42:ac:13:00:02"
  1721. IPv4Address: "172.19.0.2/16"
  1722. IPv6Address: ""
  1723. Options:
  1724. com.docker.network.bridge.default_bridge: "true"
  1725. com.docker.network.bridge.enable_icc: "true"
  1726. com.docker.network.bridge.enable_ip_masquerade: "true"
  1727. com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  1728. com.docker.network.bridge.name: "docker0"
  1729. com.docker.network.driver.mtu: "1500"
  1730. Labels:
  1731. com.example.some-label: "some-value"
  1732. com.example.some-other-label: "some-other-value"
  1733. IPAM:
  1734. type: "object"
  1735. properties:
  1736. Driver:
  1737. description: "Name of the IPAM driver to use."
  1738. type: "string"
  1739. default: "default"
  1740. Config:
  1741. description: |
  1742. List of IPAM configuration options, specified as a map:
  1743. ```
  1744. {"Subnet": <CIDR>, "IPRange": <CIDR>, "Gateway": <IP address>, "AuxAddress": <device_name:IP address>}
  1745. ```
  1746. type: "array"
  1747. items:
  1748. type: "object"
  1749. additionalProperties:
  1750. type: "string"
  1751. Options:
  1752. description: "Driver-specific options, specified as a map."
  1753. type: "object"
  1754. additionalProperties:
  1755. type: "string"
  1756. NetworkContainer:
  1757. type: "object"
  1758. properties:
  1759. Name:
  1760. type: "string"
  1761. EndpointID:
  1762. type: "string"
  1763. MacAddress:
  1764. type: "string"
  1765. IPv4Address:
  1766. type: "string"
  1767. IPv6Address:
  1768. type: "string"
  1769. BuildInfo:
  1770. type: "object"
  1771. properties:
  1772. id:
  1773. type: "string"
  1774. stream:
  1775. type: "string"
  1776. error:
  1777. type: "string"
  1778. errorDetail:
  1779. $ref: "#/definitions/ErrorDetail"
  1780. status:
  1781. type: "string"
  1782. progress:
  1783. type: "string"
  1784. progressDetail:
  1785. $ref: "#/definitions/ProgressDetail"
  1786. aux:
  1787. $ref: "#/definitions/ImageID"
  1788. BuildCache:
  1789. type: "object"
  1790. properties:
  1791. ID:
  1792. type: "string"
  1793. Parent:
  1794. type: "string"
  1795. Type:
  1796. type: "string"
  1797. Description:
  1798. type: "string"
  1799. InUse:
  1800. type: "boolean"
  1801. Shared:
  1802. type: "boolean"
  1803. Size:
  1804. description: |
  1805. Amount of disk space used by the build cache (in bytes).
  1806. type: "integer"
  1807. CreatedAt:
  1808. description: |
  1809. Date and time at which the build cache was created in
  1810. [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  1811. type: "string"
  1812. format: "dateTime"
  1813. example: "2016-08-18T10:44:24.496525531Z"
  1814. LastUsedAt:
  1815. description: |
  1816. Date and time at which the build cache was last used in
  1817. [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  1818. type: "string"
  1819. format: "dateTime"
  1820. x-nullable: true
  1821. example: "2017-08-09T07:09:37.632105588Z"
  1822. UsageCount:
  1823. type: "integer"
  1824. ImageID:
  1825. type: "object"
  1826. description: "Image ID or Digest"
  1827. properties:
  1828. ID:
  1829. type: "string"
  1830. example:
  1831. ID: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c"
  1832. CreateImageInfo:
  1833. type: "object"
  1834. properties:
  1835. id:
  1836. type: "string"
  1837. error:
  1838. type: "string"
  1839. status:
  1840. type: "string"
  1841. progress:
  1842. type: "string"
  1843. progressDetail:
  1844. $ref: "#/definitions/ProgressDetail"
  1845. PushImageInfo:
  1846. type: "object"
  1847. properties:
  1848. error:
  1849. type: "string"
  1850. status:
  1851. type: "string"
  1852. progress:
  1853. type: "string"
  1854. progressDetail:
  1855. $ref: "#/definitions/ProgressDetail"
  1856. ErrorDetail:
  1857. type: "object"
  1858. properties:
  1859. code:
  1860. type: "integer"
  1861. message:
  1862. type: "string"
  1863. ProgressDetail:
  1864. type: "object"
  1865. properties:
  1866. current:
  1867. type: "integer"
  1868. total:
  1869. type: "integer"
  1870. ErrorResponse:
  1871. description: "Represents an error."
  1872. type: "object"
  1873. required: ["message"]
  1874. properties:
  1875. message:
  1876. description: "The error message."
  1877. type: "string"
  1878. x-nullable: false
  1879. example:
  1880. message: "Something went wrong."
  1881. IdResponse:
  1882. description: "Response to an API call that returns just an Id"
  1883. type: "object"
  1884. required: ["Id"]
  1885. properties:
  1886. Id:
  1887. description: "The id of the newly created object."
  1888. type: "string"
  1889. x-nullable: false
  1890. EndpointSettings:
  1891. description: "Configuration for a network endpoint."
  1892. type: "object"
  1893. properties:
  1894. # Configurations
  1895. IPAMConfig:
  1896. $ref: "#/definitions/EndpointIPAMConfig"
  1897. Links:
  1898. type: "array"
  1899. items:
  1900. type: "string"
  1901. example:
  1902. - "container_1"
  1903. - "container_2"
  1904. Aliases:
  1905. type: "array"
  1906. items:
  1907. type: "string"
  1908. example:
  1909. - "server_x"
  1910. - "server_y"
  1911. # Operational data
  1912. NetworkID:
  1913. description: |
  1914. Unique ID of the network.
  1915. type: "string"
  1916. example: "08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a"
  1917. EndpointID:
  1918. description: |
  1919. Unique ID for the service endpoint in a Sandbox.
  1920. type: "string"
  1921. example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b"
  1922. Gateway:
  1923. description: |
  1924. Gateway address for this network.
  1925. type: "string"
  1926. example: "172.17.0.1"
  1927. IPAddress:
  1928. description: |
  1929. IPv4 address.
  1930. type: "string"
  1931. example: "172.17.0.4"
  1932. IPPrefixLen:
  1933. description: |
  1934. Mask length of the IPv4 address.
  1935. type: "integer"
  1936. example: 16
  1937. IPv6Gateway:
  1938. description: |
  1939. IPv6 gateway address.
  1940. type: "string"
  1941. example: "2001:db8:2::100"
  1942. GlobalIPv6Address:
  1943. description: |
  1944. Global IPv6 address.
  1945. type: "string"
  1946. example: "2001:db8::5689"
  1947. GlobalIPv6PrefixLen:
  1948. description: |
  1949. Mask length of the global IPv6 address.
  1950. type: "integer"
  1951. format: "int64"
  1952. example: 64
  1953. MacAddress:
  1954. description: |
  1955. MAC address for the endpoint on this network.
  1956. type: "string"
  1957. example: "02:42:ac:11:00:04"
  1958. DriverOpts:
  1959. description: |
  1960. DriverOpts is a mapping of driver options and values. These options
  1961. are passed directly to the driver and are driver specific.
  1962. type: "object"
  1963. x-nullable: true
  1964. additionalProperties:
  1965. type: "string"
  1966. example:
  1967. com.example.some-label: "some-value"
  1968. com.example.some-other-label: "some-other-value"
  1969. EndpointIPAMConfig:
  1970. description: |
  1971. EndpointIPAMConfig represents an endpoint's IPAM configuration.
  1972. type: "object"
  1973. x-nullable: true
  1974. properties:
  1975. IPv4Address:
  1976. type: "string"
  1977. example: "172.20.30.33"
  1978. IPv6Address:
  1979. type: "string"
  1980. example: "2001:db8:abcd::3033"
  1981. LinkLocalIPs:
  1982. type: "array"
  1983. items:
  1984. type: "string"
  1985. example:
  1986. - "169.254.34.68"
  1987. - "fe80::3468"
  1988. PluginMount:
  1989. type: "object"
  1990. x-nullable: false
  1991. required: [Name, Description, Settable, Source, Destination, Type, Options]
  1992. properties:
  1993. Name:
  1994. type: "string"
  1995. x-nullable: false
  1996. example: "some-mount"
  1997. Description:
  1998. type: "string"
  1999. x-nullable: false
  2000. example: "This is a mount that's used by the plugin."
  2001. Settable:
  2002. type: "array"
  2003. items:
  2004. type: "string"
  2005. Source:
  2006. type: "string"
  2007. example: "/var/lib/docker/plugins/"
  2008. Destination:
  2009. type: "string"
  2010. x-nullable: false
  2011. example: "/mnt/state"
  2012. Type:
  2013. type: "string"
  2014. x-nullable: false
  2015. example: "bind"
  2016. Options:
  2017. type: "array"
  2018. items:
  2019. type: "string"
  2020. example:
  2021. - "rbind"
  2022. - "rw"
  2023. PluginDevice:
  2024. type: "object"
  2025. required: [Name, Description, Settable, Path]
  2026. x-nullable: false
  2027. properties:
  2028. Name:
  2029. type: "string"
  2030. x-nullable: false
  2031. Description:
  2032. type: "string"
  2033. x-nullable: false
  2034. Settable:
  2035. type: "array"
  2036. items:
  2037. type: "string"
  2038. Path:
  2039. type: "string"
  2040. example: "/dev/fuse"
  2041. PluginEnv:
  2042. type: "object"
  2043. x-nullable: false
  2044. required: [Name, Description, Settable, Value]
  2045. properties:
  2046. Name:
  2047. x-nullable: false
  2048. type: "string"
  2049. Description:
  2050. x-nullable: false
  2051. type: "string"
  2052. Settable:
  2053. type: "array"
  2054. items:
  2055. type: "string"
  2056. Value:
  2057. type: "string"
  2058. PluginInterfaceType:
  2059. type: "object"
  2060. x-nullable: false
  2061. required: [Prefix, Capability, Version]
  2062. properties:
  2063. Prefix:
  2064. type: "string"
  2065. x-nullable: false
  2066. Capability:
  2067. type: "string"
  2068. x-nullable: false
  2069. Version:
  2070. type: "string"
  2071. x-nullable: false
  2072. Plugin:
  2073. description: "A plugin for the Engine API"
  2074. type: "object"
  2075. required: [Settings, Enabled, Config, Name]
  2076. properties:
  2077. Id:
  2078. type: "string"
  2079. example: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078"
  2080. Name:
  2081. type: "string"
  2082. x-nullable: false
  2083. example: "tiborvass/sample-volume-plugin"
  2084. Enabled:
  2085. description:
  2086. True if the plugin is running. False if the plugin is not running,
  2087. only installed.
  2088. type: "boolean"
  2089. x-nullable: false
  2090. example: true
  2091. Settings:
  2092. description: "Settings that can be modified by users."
  2093. type: "object"
  2094. x-nullable: false
  2095. required: [Args, Devices, Env, Mounts]
  2096. properties:
  2097. Mounts:
  2098. type: "array"
  2099. items:
  2100. $ref: "#/definitions/PluginMount"
  2101. Env:
  2102. type: "array"
  2103. items:
  2104. type: "string"
  2105. example:
  2106. - "DEBUG=0"
  2107. Args:
  2108. type: "array"
  2109. items:
  2110. type: "string"
  2111. Devices:
  2112. type: "array"
  2113. items:
  2114. $ref: "#/definitions/PluginDevice"
  2115. PluginReference:
  2116. description: "plugin remote reference used to push/pull the plugin"
  2117. type: "string"
  2118. x-nullable: false
  2119. example: "localhost:5000/tiborvass/sample-volume-plugin:latest"
  2120. Config:
  2121. description: "The config of a plugin."
  2122. type: "object"
  2123. x-nullable: false
  2124. required:
  2125. - Description
  2126. - Documentation
  2127. - Interface
  2128. - Entrypoint
  2129. - WorkDir
  2130. - Network
  2131. - Linux
  2132. - PidHost
  2133. - PropagatedMount
  2134. - IpcHost
  2135. - Mounts
  2136. - Env
  2137. - Args
  2138. properties:
  2139. DockerVersion:
  2140. description: "Docker Version used to create the plugin"
  2141. type: "string"
  2142. x-nullable: false
  2143. example: "17.06.0-ce"
  2144. Description:
  2145. type: "string"
  2146. x-nullable: false
  2147. example: "A sample volume plugin for Docker"
  2148. Documentation:
  2149. type: "string"
  2150. x-nullable: false
  2151. example: "https://docs.docker.com/engine/extend/plugins/"
  2152. Interface:
  2153. description: "The interface between Docker and the plugin"
  2154. x-nullable: false
  2155. type: "object"
  2156. required: [Types, Socket]
  2157. properties:
  2158. Types:
  2159. type: "array"
  2160. items:
  2161. $ref: "#/definitions/PluginInterfaceType"
  2162. example:
  2163. - "docker.volumedriver/1.0"
  2164. Socket:
  2165. type: "string"
  2166. x-nullable: false
  2167. example: "plugins.sock"
  2168. ProtocolScheme:
  2169. type: "string"
  2170. example: "some.protocol/v1.0"
  2171. description: "Protocol to use for clients connecting to the plugin."
  2172. enum:
  2173. - ""
  2174. - "moby.plugins.http/v1"
  2175. Entrypoint:
  2176. type: "array"
  2177. items:
  2178. type: "string"
  2179. example:
  2180. - "/usr/bin/sample-volume-plugin"
  2181. - "/data"
  2182. WorkDir:
  2183. type: "string"
  2184. x-nullable: false
  2185. example: "/bin/"
  2186. User:
  2187. type: "object"
  2188. x-nullable: false
  2189. properties:
  2190. UID:
  2191. type: "integer"
  2192. format: "uint32"
  2193. example: 1000
  2194. GID:
  2195. type: "integer"
  2196. format: "uint32"
  2197. example: 1000
  2198. Network:
  2199. type: "object"
  2200. x-nullable: false
  2201. required: [Type]
  2202. properties:
  2203. Type:
  2204. x-nullable: false
  2205. type: "string"
  2206. example: "host"
  2207. Linux:
  2208. type: "object"
  2209. x-nullable: false
  2210. required: [Capabilities, AllowAllDevices, Devices]
  2211. properties:
  2212. Capabilities:
  2213. type: "array"
  2214. items:
  2215. type: "string"
  2216. example:
  2217. - "CAP_SYS_ADMIN"
  2218. - "CAP_SYSLOG"
  2219. AllowAllDevices:
  2220. type: "boolean"
  2221. x-nullable: false
  2222. example: false
  2223. Devices:
  2224. type: "array"
  2225. items:
  2226. $ref: "#/definitions/PluginDevice"
  2227. PropagatedMount:
  2228. type: "string"
  2229. x-nullable: false
  2230. example: "/mnt/volumes"
  2231. IpcHost:
  2232. type: "boolean"
  2233. x-nullable: false
  2234. example: false
  2235. PidHost:
  2236. type: "boolean"
  2237. x-nullable: false
  2238. example: false
  2239. Mounts:
  2240. type: "array"
  2241. items:
  2242. $ref: "#/definitions/PluginMount"
  2243. Env:
  2244. type: "array"
  2245. items:
  2246. $ref: "#/definitions/PluginEnv"
  2247. example:
  2248. - Name: "DEBUG"
  2249. Description: "If set, prints debug messages"
  2250. Settable: null
  2251. Value: "0"
  2252. Args:
  2253. type: "object"
  2254. x-nullable: false
  2255. required: [Name, Description, Settable, Value]
  2256. properties:
  2257. Name:
  2258. x-nullable: false
  2259. type: "string"
  2260. example: "args"
  2261. Description:
  2262. x-nullable: false
  2263. type: "string"
  2264. example: "command line arguments"
  2265. Settable:
  2266. type: "array"
  2267. items:
  2268. type: "string"
  2269. Value:
  2270. type: "array"
  2271. items:
  2272. type: "string"
  2273. rootfs:
  2274. type: "object"
  2275. properties:
  2276. type:
  2277. type: "string"
  2278. example: "layers"
  2279. diff_ids:
  2280. type: "array"
  2281. items:
  2282. type: "string"
  2283. example:
  2284. - "sha256:675532206fbf3030b8458f88d6e26d4eb1577688a25efec97154c94e8b6b4887"
  2285. - "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8"
  2286. ObjectVersion:
  2287. description: |
  2288. The version number of the object such as node, service, etc. This is needed
  2289. to avoid conflicting writes. The client must send the version number along
  2290. with the modified specification when updating these objects.
  2291. This approach ensures safe concurrency and determinism in that the change
  2292. on the object may not be applied if the version number has changed from the
  2293. last read. In other words, if two update requests specify the same base
  2294. version, only one of the requests can succeed. As a result, two separate
  2295. update requests that happen at the same time will not unintentionally
  2296. overwrite each other.
  2297. type: "object"
  2298. properties:
  2299. Index:
  2300. type: "integer"
  2301. format: "uint64"
  2302. example: 373531
  2303. NodeSpec:
  2304. type: "object"
  2305. properties:
  2306. Name:
  2307. description: "Name for the node."
  2308. type: "string"
  2309. example: "my-node"
  2310. Labels:
  2311. description: "User-defined key/value metadata."
  2312. type: "object"
  2313. additionalProperties:
  2314. type: "string"
  2315. Role:
  2316. description: "Role of the node."
  2317. type: "string"
  2318. enum:
  2319. - "worker"
  2320. - "manager"
  2321. example: "manager"
  2322. Availability:
  2323. description: "Availability of the node."
  2324. type: "string"
  2325. enum:
  2326. - "active"
  2327. - "pause"
  2328. - "drain"
  2329. example: "active"
  2330. example:
  2331. Availability: "active"
  2332. Name: "node-name"
  2333. Role: "manager"
  2334. Labels:
  2335. foo: "bar"
  2336. Node:
  2337. type: "object"
  2338. properties:
  2339. ID:
  2340. type: "string"
  2341. example: "24ifsmvkjbyhk"
  2342. Version:
  2343. $ref: "#/definitions/ObjectVersion"
  2344. CreatedAt:
  2345. description: |
  2346. Date and time at which the node was added to the swarm in
  2347. [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  2348. type: "string"
  2349. format: "dateTime"
  2350. example: "2016-08-18T10:44:24.496525531Z"
  2351. UpdatedAt:
  2352. description: |
  2353. Date and time at which the node was last updated in
  2354. [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  2355. type: "string"
  2356. format: "dateTime"
  2357. example: "2017-08-09T07:09:37.632105588Z"
  2358. Spec:
  2359. $ref: "#/definitions/NodeSpec"
  2360. Description:
  2361. $ref: "#/definitions/NodeDescription"
  2362. Status:
  2363. $ref: "#/definitions/NodeStatus"
  2364. ManagerStatus:
  2365. $ref: "#/definitions/ManagerStatus"
  2366. NodeDescription:
  2367. description: |
  2368. NodeDescription encapsulates the properties of the Node as reported by the
  2369. agent.
  2370. type: "object"
  2371. properties:
  2372. Hostname:
  2373. type: "string"
  2374. example: "bf3067039e47"
  2375. Platform:
  2376. $ref: "#/definitions/Platform"
  2377. Resources:
  2378. $ref: "#/definitions/ResourceObject"
  2379. Engine:
  2380. $ref: "#/definitions/EngineDescription"
  2381. TLSInfo:
  2382. $ref: "#/definitions/TLSInfo"
  2383. Platform:
  2384. description: |
  2385. Platform represents the platform (Arch/OS).
  2386. type: "object"
  2387. properties:
  2388. Architecture:
  2389. description: |
  2390. Architecture represents the hardware architecture (for example,
  2391. `x86_64`).
  2392. type: "string"
  2393. example: "x86_64"
  2394. OS:
  2395. description: |
  2396. OS represents the Operating System (for example, `linux` or `windows`).
  2397. type: "string"
  2398. example: "linux"
  2399. EngineDescription:
  2400. description: "EngineDescription provides information about an engine."
  2401. type: "object"
  2402. properties:
  2403. EngineVersion:
  2404. type: "string"
  2405. example: "17.06.0"
  2406. Labels:
  2407. type: "object"
  2408. additionalProperties:
  2409. type: "string"
  2410. example:
  2411. foo: "bar"
  2412. Plugins:
  2413. type: "array"
  2414. items:
  2415. type: "object"
  2416. properties:
  2417. Type:
  2418. type: "string"
  2419. Name:
  2420. type: "string"
  2421. example:
  2422. - Type: "Log"
  2423. Name: "awslogs"
  2424. - Type: "Log"
  2425. Name: "fluentd"
  2426. - Type: "Log"
  2427. Name: "gcplogs"
  2428. - Type: "Log"
  2429. Name: "gelf"
  2430. - Type: "Log"
  2431. Name: "journald"
  2432. - Type: "Log"
  2433. Name: "json-file"
  2434. - Type: "Log"
  2435. Name: "logentries"
  2436. - Type: "Log"
  2437. Name: "splunk"
  2438. - Type: "Log"
  2439. Name: "syslog"
  2440. - Type: "Network"
  2441. Name: "bridge"
  2442. - Type: "Network"
  2443. Name: "host"
  2444. - Type: "Network"
  2445. Name: "ipvlan"
  2446. - Type: "Network"
  2447. Name: "macvlan"
  2448. - Type: "Network"
  2449. Name: "null"
  2450. - Type: "Network"
  2451. Name: "overlay"
  2452. - Type: "Volume"
  2453. Name: "local"
  2454. - Type: "Volume"
  2455. Name: "localhost:5000/vieux/sshfs:latest"
  2456. - Type: "Volume"
  2457. Name: "vieux/sshfs:latest"
  2458. TLSInfo:
  2459. description: |
  2460. Information about the issuer of leaf TLS certificates and the trusted root
  2461. CA certificate.
  2462. type: "object"
  2463. properties:
  2464. TrustRoot:
  2465. description: |
  2466. The root CA certificate(s) that are used to validate leaf TLS
  2467. certificates.
  2468. type: "string"
  2469. CertIssuerSubject:
  2470. description:
  2471. The base64-url-safe-encoded raw subject bytes of the issuer.
  2472. type: "string"
  2473. CertIssuerPublicKey:
  2474. description: |
  2475. The base64-url-safe-encoded raw public key bytes of the issuer.
  2476. type: "string"
  2477. example:
  2478. TrustRoot: |
  2479. -----BEGIN CERTIFICATE-----
  2480. MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw
  2481. EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0
  2482. MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH
  2483. A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf
  2484. 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB
  2485. Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO
  2486. PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz
  2487. pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H
  2488. -----END CERTIFICATE-----
  2489. CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh"
  2490. CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A=="
  2491. NodeStatus:
  2492. description: |
  2493. NodeStatus represents the status of a node.
  2494. It provides the current status of the node, as seen by the manager.
  2495. type: "object"
  2496. properties:
  2497. State:
  2498. $ref: "#/definitions/NodeState"
  2499. Message:
  2500. type: "string"
  2501. example: ""
  2502. Addr:
  2503. description: "IP address of the node."
  2504. type: "string"
  2505. example: "172.17.0.2"
  2506. NodeState:
  2507. description: "NodeState represents the state of a node."
  2508. type: "string"
  2509. enum:
  2510. - "unknown"
  2511. - "down"
  2512. - "ready"
  2513. - "disconnected"
  2514. example: "ready"
  2515. ManagerStatus:
  2516. description: |
  2517. ManagerStatus represents the status of a manager.
  2518. It provides the current status of a node's manager component, if the node
  2519. is a manager.
  2520. x-nullable: true
  2521. type: "object"
  2522. properties:
  2523. Leader:
  2524. type: "boolean"
  2525. default: false
  2526. example: true
  2527. Reachability:
  2528. $ref: "#/definitions/Reachability"
  2529. Addr:
  2530. description: |
  2531. The IP address and port at which the manager is reachable.
  2532. type: "string"
  2533. example: "10.0.0.46:2377"
  2534. Reachability:
  2535. description: "Reachability represents the reachability of a node."
  2536. type: "string"
  2537. enum:
  2538. - "unknown"
  2539. - "unreachable"
  2540. - "reachable"
  2541. example: "reachable"
  2542. SwarmSpec:
  2543. description: "User modifiable swarm configuration."
  2544. type: "object"
  2545. properties:
  2546. Name:
  2547. description: "Name of the swarm."
  2548. type: "string"
  2549. example: "default"
  2550. Labels:
  2551. description: "User-defined key/value metadata."
  2552. type: "object"
  2553. additionalProperties:
  2554. type: "string"
  2555. example:
  2556. com.example.corp.type: "production"
  2557. com.example.corp.department: "engineering"
  2558. Orchestration:
  2559. description: "Orchestration configuration."
  2560. type: "object"
  2561. x-nullable: true
  2562. properties:
  2563. TaskHistoryRetentionLimit:
  2564. description: |
  2565. The number of historic tasks to keep per instance or node. If
  2566. negative, never remove completed or failed tasks.
  2567. type: "integer"
  2568. format: "int64"
  2569. example: 10
  2570. Raft:
  2571. description: "Raft configuration."
  2572. type: "object"
  2573. properties:
  2574. SnapshotInterval:
  2575. description: "The number of log entries between snapshots."
  2576. type: "integer"
  2577. format: "uint64"
  2578. example: 10000
  2579. KeepOldSnapshots:
  2580. description: |
  2581. The number of snapshots to keep beyond the current snapshot.
  2582. type: "integer"
  2583. format: "uint64"
  2584. LogEntriesForSlowFollowers:
  2585. description: |
  2586. The number of log entries to keep around to sync up slow followers
  2587. after a snapshot is created.
  2588. type: "integer"
  2589. format: "uint64"
  2590. example: 500
  2591. ElectionTick:
  2592. description: |
  2593. The number of ticks that a follower will wait for a message from
  2594. the leader before becoming a candidate and starting an election.
  2595. `ElectionTick` must be greater than `HeartbeatTick`.
  2596. A tick currently defaults to one second, so these translate
  2597. directly to seconds currently, but this is NOT guaranteed.
  2598. type: "integer"
  2599. example: 3
  2600. HeartbeatTick:
  2601. description: |
  2602. The number of ticks between heartbeats. Every HeartbeatTick ticks,
  2603. the leader will send a heartbeat to the followers.
  2604. A tick currently defaults to one second, so these translate
  2605. directly to seconds currently, but this is NOT guaranteed.
  2606. type: "integer"
  2607. example: 1
  2608. Dispatcher:
  2609. description: "Dispatcher configuration."
  2610. type: "object"
  2611. x-nullable: true
  2612. properties:
  2613. HeartbeatPeriod:
  2614. description: |
  2615. The delay for an agent to send a heartbeat to the dispatcher.
  2616. type: "integer"
  2617. format: "int64"
  2618. example: 5000000000
  2619. CAConfig:
  2620. description: "CA configuration."
  2621. type: "object"
  2622. x-nullable: true
  2623. properties:
  2624. NodeCertExpiry:
  2625. description: "The duration node certificates are issued for."
  2626. type: "integer"
  2627. format: "int64"
  2628. example: 7776000000000000
  2629. ExternalCAs:
  2630. description: |
  2631. Configuration for forwarding signing requests to an external
  2632. certificate authority.
  2633. type: "array"
  2634. items:
  2635. type: "object"
  2636. properties:
  2637. Protocol:
  2638. description: |
  2639. Protocol for communication with the external CA (currently
  2640. only `cfssl` is supported).
  2641. type: "string"
  2642. enum:
  2643. - "cfssl"
  2644. default: "cfssl"
  2645. URL:
  2646. description: |
  2647. URL where certificate signing requests should be sent.
  2648. type: "string"
  2649. Options:
  2650. description: |
  2651. An object with key/value pairs that are interpreted as
  2652. protocol-specific options for the external CA driver.
  2653. type: "object"
  2654. additionalProperties:
  2655. type: "string"
  2656. CACert:
  2657. description: |
  2658. The root CA certificate (in PEM format) this external CA uses
  2659. to issue TLS certificates (assumed to be to the current swarm
  2660. root CA certificate if not provided).
  2661. type: "string"
  2662. SigningCACert:
  2663. description: |
  2664. The desired signing CA certificate for all swarm node TLS leaf
  2665. certificates, in PEM format.
  2666. type: "string"
  2667. SigningCAKey:
  2668. description: |
  2669. The desired signing CA key for all swarm node TLS leaf certificates,
  2670. in PEM format.
  2671. type: "string"
  2672. ForceRotate:
  2673. description: |
  2674. An integer whose purpose is to force swarm to generate a new
  2675. signing CA certificate and key, if none have been specified in
  2676. `SigningCACert` and `SigningCAKey`
  2677. format: "uint64"
  2678. type: "integer"
  2679. EncryptionConfig:
  2680. description: "Parameters related to encryption-at-rest."
  2681. type: "object"
  2682. properties:
  2683. AutoLockManagers:
  2684. description: |
  2685. If set, generate a key and use it to lock data stored on the
  2686. managers.
  2687. type: "boolean"
  2688. example: false
  2689. TaskDefaults:
  2690. description: "Defaults for creating tasks in this cluster."
  2691. type: "object"
  2692. properties:
  2693. LogDriver:
  2694. description: |
  2695. The log driver to use for tasks created in the orchestrator if
  2696. unspecified by a service.
  2697. Updating this value only affects new tasks. Existing tasks continue
  2698. to use their previously configured log driver until recreated.
  2699. type: "object"
  2700. properties:
  2701. Name:
  2702. description: |
  2703. The log driver to use as a default for new tasks.
  2704. type: "string"
  2705. example: "json-file"
  2706. Options:
  2707. description: |
  2708. Driver-specific options for the selectd log driver, specified
  2709. as key/value pairs.
  2710. type: "object"
  2711. additionalProperties:
  2712. type: "string"
  2713. example:
  2714. "max-file": "10"
  2715. "max-size": "100m"
  2716. # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but
  2717. # without `JoinTokens`.
  2718. ClusterInfo:
  2719. description: |
  2720. ClusterInfo represents information about the swarm as is returned by the
  2721. "/info" endpoint. Join-tokens are not included.
  2722. x-nullable: true
  2723. type: "object"
  2724. properties:
  2725. ID:
  2726. description: "The ID of the swarm."
  2727. type: "string"
  2728. example: "abajmipo7b4xz5ip2nrla6b11"
  2729. Version:
  2730. $ref: "#/definitions/ObjectVersion"
  2731. CreatedAt:
  2732. description: |
  2733. Date and time at which the swarm was initialised in
  2734. [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  2735. type: "string"
  2736. format: "dateTime"
  2737. example: "2016-08-18T10:44:24.496525531Z"
  2738. UpdatedAt:
  2739. description: |
  2740. Date and time at which the swarm was last updated in
  2741. [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  2742. type: "string"
  2743. format: "dateTime"
  2744. example: "2017-08-09T07:09:37.632105588Z"
  2745. Spec:
  2746. $ref: "#/definitions/SwarmSpec"
  2747. TLSInfo:
  2748. $ref: "#/definitions/TLSInfo"
  2749. RootRotationInProgress:
  2750. description: |
  2751. Whether there is currently a root CA rotation in progress for the swarm
  2752. type: "boolean"
  2753. example: false
  2754. DataPathPort:
  2755. description: |
  2756. DataPathPort specifies the data path port number for data traffic.
  2757. Acceptable port range is 1024 to 49151.
  2758. If no port is set or is set to 0, the default port (4789) is used.
  2759. type: "integer"
  2760. format: "uint32"
  2761. default: 4789
  2762. example: 4789
  2763. DefaultAddrPool:
  2764. description: |
  2765. Default Address Pool specifies default subnet pools for global scope
  2766. networks.
  2767. type: "array"
  2768. items:
  2769. type: "string"
  2770. format: "CIDR"
  2771. example: ["10.10.0.0/16", "20.20.0.0/16"]
  2772. SubnetSize:
  2773. description: |
  2774. SubnetSize specifies the subnet size of the networks created from the
  2775. default subnet pool.
  2776. type: "integer"
  2777. format: "uint32"
  2778. maximum: 29
  2779. default: 24
  2780. example: 24
  2781. JoinTokens:
  2782. description: |
  2783. JoinTokens contains the tokens workers and managers need to join the swarm.
  2784. type: "object"
  2785. properties:
  2786. Worker:
  2787. description: |
  2788. The token workers can use to join the swarm.
  2789. type: "string"
  2790. example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx"
  2791. Manager:
  2792. description: |
  2793. The token managers can use to join the swarm.
  2794. type: "string"
  2795. example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2"
  2796. Swarm:
  2797. type: "object"
  2798. allOf:
  2799. - $ref: "#/definitions/ClusterInfo"
  2800. - type: "object"
  2801. properties:
  2802. JoinTokens:
  2803. $ref: "#/definitions/JoinTokens"
  2804. TaskSpec:
  2805. description: "User modifiable task configuration."
  2806. type: "object"
  2807. properties:
  2808. PluginSpec:
  2809. type: "object"
  2810. description: |
  2811. Plugin spec for the service. *(Experimental release only.)*
  2812. <p><br /></p>
  2813. > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
  2814. > mutually exclusive. PluginSpec is only used when the Runtime field
  2815. > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
  2816. > field is set to `attachment`.
  2817. properties:
  2818. Name:
  2819. description: "The name or 'alias' to use for the plugin."
  2820. type: "string"
  2821. Remote:
  2822. description: "The plugin image reference to use."
  2823. type: "string"
  2824. Disabled:
  2825. description: "Disable the plugin once scheduled."
  2826. type: "boolean"
  2827. PluginPrivilege:
  2828. type: "array"
  2829. items:
  2830. description: |
  2831. Describes a permission accepted by the user upon installing the
  2832. plugin.
  2833. type: "object"
  2834. properties:
  2835. Name:
  2836. type: "string"
  2837. Description:
  2838. type: "string"
  2839. Value:
  2840. type: "array"
  2841. items:
  2842. type: "string"
  2843. ContainerSpec:
  2844. type: "object"
  2845. description: |
  2846. Container spec for the service.
  2847. <p><br /></p>
  2848. > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
  2849. > mutually exclusive. PluginSpec is only used when the Runtime field
  2850. > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
  2851. > field is set to `attachment`.
  2852. properties:
  2853. Image:
  2854. description: "The image name to use for the container"
  2855. type: "string"
  2856. Labels:
  2857. description: "User-defined key/value data."
  2858. type: "object"
  2859. additionalProperties:
  2860. type: "string"
  2861. Command:
  2862. description: "The command to be run in the image."
  2863. type: "array"
  2864. items:
  2865. type: "string"
  2866. Args:
  2867. description: "Arguments to the command."
  2868. type: "array"
  2869. items:
  2870. type: "string"
  2871. Hostname:
  2872. description: |
  2873. The hostname to use for the container, as a valid
  2874. [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname.
  2875. type: "string"
  2876. Env:
  2877. description: |
  2878. A list of environment variables in the form `VAR=value`.
  2879. type: "array"
  2880. items:
  2881. type: "string"
  2882. Dir:
  2883. description: "The working directory for commands to run in."
  2884. type: "string"
  2885. User:
  2886. description: "The user inside the container."
  2887. type: "string"
  2888. Groups:
  2889. type: "array"
  2890. description: |
  2891. A list of additional groups that the container process will run as.
  2892. items:
  2893. type: "string"
  2894. Privileges:
  2895. type: "object"
  2896. description: "Security options for the container"
  2897. properties:
  2898. CredentialSpec:
  2899. type: "object"
  2900. description: "CredentialSpec for managed service account (Windows only)"
  2901. properties:
  2902. Config:
  2903. type: "string"
  2904. example: "0bt9dmxjvjiqermk6xrop3ekq"
  2905. description: |
  2906. Load credential spec from a Swarm Config with the given ID.
  2907. The specified config must also be present in the Configs
  2908. field with the Runtime property set.
  2909. <p><br /></p>
  2910. > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`,
  2911. > and `CredentialSpec.Config` are mutually exclusive.
  2912. File:
  2913. type: "string"
  2914. example: "spec.json"
  2915. description: |
  2916. Load credential spec from this file. The file is read by
  2917. the daemon, and must be present in the `CredentialSpecs`
  2918. subdirectory in the docker data directory, which defaults
  2919. to `C:\ProgramData\Docker\` on Windows.
  2920. For example, specifying `spec.json` loads
  2921. `C:\ProgramData\Docker\CredentialSpecs\spec.json`.
  2922. <p><br /></p>
  2923. > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`,
  2924. > and `CredentialSpec.Config` are mutually exclusive.
  2925. Registry:
  2926. type: "string"
  2927. description: |
  2928. Load credential spec from this value in the Windows
  2929. registry. The specified registry value must be located in:
  2930. `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs`
  2931. <p><br /></p>
  2932. > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`,
  2933. > and `CredentialSpec.Config` are mutually exclusive.
  2934. SELinuxContext:
  2935. type: "object"
  2936. description: "SELinux labels of the container"
  2937. properties:
  2938. Disable:
  2939. type: "boolean"
  2940. description: "Disable SELinux"
  2941. User:
  2942. type: "string"
  2943. description: "SELinux user label"
  2944. Role:
  2945. type: "string"
  2946. description: "SELinux role label"
  2947. Type:
  2948. type: "string"
  2949. description: "SELinux type label"
  2950. Level:
  2951. type: "string"
  2952. description: "SELinux level label"
  2953. TTY:
  2954. description: "Whether a pseudo-TTY should be allocated."
  2955. type: "boolean"
  2956. OpenStdin:
  2957. description: "Open `stdin`"
  2958. type: "boolean"
  2959. ReadOnly:
  2960. description: "Mount the container's root filesystem as read only."
  2961. type: "boolean"
  2962. Mounts:
  2963. description: |
  2964. Specification for mounts to be added to containers created as part
  2965. of the service.
  2966. type: "array"
  2967. items:
  2968. $ref: "#/definitions/Mount"
  2969. StopSignal:
  2970. description: "Signal to stop the container."
  2971. type: "string"
  2972. StopGracePeriod:
  2973. description: |
  2974. Amount of time to wait for the container to terminate before
  2975. forcefully killing it.
  2976. type: "integer"
  2977. format: "int64"
  2978. HealthCheck:
  2979. $ref: "#/definitions/HealthConfig"
  2980. Hosts:
  2981. type: "array"
  2982. description: |
  2983. A list of hostname/IP mappings to add to the container's `hosts`
  2984. file. The format of extra hosts is specified in the
  2985. [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html)
  2986. man page:
  2987. IP_address canonical_hostname [aliases...]
  2988. items:
  2989. type: "string"
  2990. DNSConfig:
  2991. description: |
  2992. Specification for DNS related configurations in resolver configuration
  2993. file (`resolv.conf`).
  2994. type: "object"
  2995. properties:
  2996. Nameservers:
  2997. description: "The IP addresses of the name servers."
  2998. type: "array"
  2999. items:
  3000. type: "string"
  3001. Search:
  3002. description: "A search list for host-name lookup."
  3003. type: "array"
  3004. items:
  3005. type: "string"
  3006. Options:
  3007. description: |
  3008. A list of internal resolver variables to be modified (e.g.,
  3009. `debug`, `ndots:3`, etc.).
  3010. type: "array"
  3011. items:
  3012. type: "string"
  3013. Secrets:
  3014. description: |
  3015. Secrets contains references to zero or more secrets that will be
  3016. exposed to the service.
  3017. type: "array"
  3018. items:
  3019. type: "object"
  3020. properties:
  3021. File:
  3022. description: |
  3023. File represents a specific target that is backed by a file.
  3024. type: "object"
  3025. properties:
  3026. Name:
  3027. description: |
  3028. Name represents the final filename in the filesystem.
  3029. type: "string"
  3030. UID:
  3031. description: "UID represents the file UID."
  3032. type: "string"
  3033. GID:
  3034. description: "GID represents the file GID."
  3035. type: "string"
  3036. Mode:
  3037. description: "Mode represents the FileMode of the file."
  3038. type: "integer"
  3039. format: "uint32"
  3040. SecretID:
  3041. description: |
  3042. SecretID represents the ID of the specific secret that we're
  3043. referencing.
  3044. type: "string"
  3045. SecretName:
  3046. description: |
  3047. SecretName is the name of the secret that this references,
  3048. but this is just provided for lookup/display purposes. The
  3049. secret in the reference will be identified by its ID.
  3050. type: "string"
  3051. Configs:
  3052. description: |
  3053. Configs contains references to zero or more configs that will be
  3054. exposed to the service.
  3055. type: "array"
  3056. items:
  3057. type: "object"
  3058. properties:
  3059. File:
  3060. description: |
  3061. File represents a specific target that is backed by a file.
  3062. <p><br /><p>
  3063. > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive
  3064. type: "object"
  3065. properties:
  3066. Name:
  3067. description: |
  3068. Name represents the final filename in the filesystem.
  3069. type: "string"
  3070. UID:
  3071. description: "UID represents the file UID."
  3072. type: "string"
  3073. GID:
  3074. description: "GID represents the file GID."
  3075. type: "string"
  3076. Mode:
  3077. description: "Mode represents the FileMode of the file."
  3078. type: "integer"
  3079. format: "uint32"
  3080. Runtime:
  3081. description: |
  3082. Runtime represents a target that is not mounted into the
  3083. container but is used by the task
  3084. <p><br /><p>
  3085. > **Note**: `Configs.File` and `Configs.Runtime` are mutually
  3086. > exclusive
  3087. type: "object"
  3088. ConfigID:
  3089. description: |
  3090. ConfigID represents the ID of the specific config that we're
  3091. referencing.
  3092. type: "string"
  3093. ConfigName:
  3094. description: |
  3095. ConfigName is the name of the config that this references,
  3096. but this is just provided for lookup/display purposes. The
  3097. config in the reference will be identified by its ID.
  3098. type: "string"
  3099. Isolation:
  3100. type: "string"
  3101. description: |
  3102. Isolation technology of the containers running the service.
  3103. (Windows only)
  3104. enum:
  3105. - "default"
  3106. - "process"
  3107. - "hyperv"
  3108. Init:
  3109. description: |
  3110. Run an init inside the container that forwards signals and reaps
  3111. processes. This field is omitted if empty, and the default (as
  3112. configured on the daemon) is used.
  3113. type: "boolean"
  3114. x-nullable: true
  3115. Sysctls:
  3116. description: |
  3117. Set kernel namedspaced parameters (sysctls) in the container.
  3118. The Sysctls option on services accepts the same sysctls as the
  3119. are supported on containers. Note that while the same sysctls are
  3120. supported, no guarantees or checks are made about their
  3121. suitability for a clustered environment, and it's up to the user
  3122. to determine whether a given sysctl will work properly in a
  3123. Service.
  3124. type: "object"
  3125. additionalProperties:
  3126. type: "string"
  3127. # This option is not used by Windows containers
  3128. CapabilityAdd:
  3129. type: "array"
  3130. description: |
  3131. A list of kernel capabilities to add to the default set
  3132. for the container.
  3133. items:
  3134. type: "string"
  3135. example:
  3136. - "CAP_NET_RAW"
  3137. - "CAP_SYS_ADMIN"
  3138. - "CAP_SYS_CHROOT"
  3139. - "CAP_SYSLOG"
  3140. CapabilityDrop:
  3141. type: "array"
  3142. description: |
  3143. A list of kernel capabilities to drop from the default set
  3144. for the container.
  3145. items:
  3146. type: "string"
  3147. example:
  3148. - "CAP_NET_RAW"
  3149. Ulimits:
  3150. description: |
  3151. A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`"
  3152. type: "array"
  3153. items:
  3154. type: "object"
  3155. properties:
  3156. Name:
  3157. description: "Name of ulimit"
  3158. type: "string"
  3159. Soft:
  3160. description: "Soft limit"
  3161. type: "integer"
  3162. Hard:
  3163. description: "Hard limit"
  3164. type: "integer"
  3165. NetworkAttachmentSpec:
  3166. description: |
  3167. Read-only spec type for non-swarm containers attached to swarm overlay
  3168. networks.
  3169. <p><br /></p>
  3170. > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
  3171. > mutually exclusive. PluginSpec is only used when the Runtime field
  3172. > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
  3173. > field is set to `attachment`.
  3174. type: "object"
  3175. properties:
  3176. ContainerID:
  3177. description: "ID of the container represented by this task"
  3178. type: "string"
  3179. Resources:
  3180. description: |
  3181. Resource requirements which apply to each individual container created
  3182. as part of the service.
  3183. type: "object"
  3184. properties:
  3185. Limits:
  3186. description: "Define resources limits."
  3187. $ref: "#/definitions/Limit"
  3188. Reservation:
  3189. description: "Define resources reservation."
  3190. $ref: "#/definitions/ResourceObject"
  3191. RestartPolicy:
  3192. description: |
  3193. Specification for the restart policy which applies to containers
  3194. created as part of this service.
  3195. type: "object"
  3196. properties:
  3197. Condition:
  3198. description: "Condition for restart."
  3199. type: "string"
  3200. enum:
  3201. - "none"
  3202. - "on-failure"
  3203. - "any"
  3204. Delay:
  3205. description: "Delay between restart attempts."
  3206. type: "integer"
  3207. format: "int64"
  3208. MaxAttempts:
  3209. description: |
  3210. Maximum attempts to restart a given container before giving up
  3211. (default value is 0, which is ignored).
  3212. type: "integer"
  3213. format: "int64"
  3214. default: 0
  3215. Window:
  3216. description: |
  3217. Windows is the time window used to evaluate the restart policy
  3218. (default value is 0, which is unbounded).
  3219. type: "integer"
  3220. format: "int64"
  3221. default: 0
  3222. Placement:
  3223. type: "object"
  3224. properties:
  3225. Constraints:
  3226. description: |
  3227. An array of constraint expressions to limit the set of nodes where
  3228. a task can be scheduled. Constraint expressions can either use a
  3229. _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find
  3230. nodes that satisfy every expression (AND match). Constraints can
  3231. match node or Docker Engine labels as follows:
  3232. node attribute | matches | example
  3233. ---------------------|--------------------------------|-----------------------------------------------
  3234. `node.id` | Node ID | `node.id==2ivku8v2gvtg4`
  3235. `node.hostname` | Node hostname | `node.hostname!=node-2`
  3236. `node.role` | Node role (`manager`/`worker`) | `node.role==manager`
  3237. `node.platform.os` | Node operating system | `node.platform.os==windows`
  3238. `node.platform.arch` | Node architecture | `node.platform.arch==x86_64`
  3239. `node.labels` | User-defined node labels | `node.labels.security==high`
  3240. `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-14.04`
  3241. `engine.labels` apply to Docker Engine labels like operating system,
  3242. drivers, etc. Swarm administrators add `node.labels` for operational
  3243. purposes by using the [`node update endpoint`](#operation/NodeUpdate).
  3244. type: "array"
  3245. items:
  3246. type: "string"
  3247. example:
  3248. - "node.hostname!=node3.corp.example.com"
  3249. - "node.role!=manager"
  3250. - "node.labels.type==production"
  3251. - "node.platform.os==linux"
  3252. - "node.platform.arch==x86_64"
  3253. Preferences:
  3254. description: |
  3255. Preferences provide a way to make the scheduler aware of factors
  3256. such as topology. They are provided in order from highest to
  3257. lowest precedence.
  3258. type: "array"
  3259. items:
  3260. type: "object"
  3261. properties:
  3262. Spread:
  3263. type: "object"
  3264. properties:
  3265. SpreadDescriptor:
  3266. description: |
  3267. label descriptor, such as `engine.labels.az`.
  3268. type: "string"
  3269. example:
  3270. - Spread:
  3271. SpreadDescriptor: "node.labels.datacenter"
  3272. - Spread:
  3273. SpreadDescriptor: "node.labels.rack"
  3274. MaxReplicas:
  3275. description: |
  3276. Maximum number of replicas for per node (default value is 0, which
  3277. is unlimited)
  3278. type: "integer"
  3279. format: "int64"
  3280. default: 0
  3281. Platforms:
  3282. description: |
  3283. Platforms stores all the platforms that the service's image can
  3284. run on. This field is used in the platform filter for scheduling.
  3285. If empty, then the platform filter is off, meaning there are no
  3286. scheduling restrictions.
  3287. type: "array"
  3288. items:
  3289. $ref: "#/definitions/Platform"
  3290. ForceUpdate:
  3291. description: |
  3292. A counter that triggers an update even if no relevant parameters have
  3293. been changed.
  3294. type: "integer"
  3295. Runtime:
  3296. description: |
  3297. Runtime is the type of runtime specified for the task executor.
  3298. type: "string"
  3299. Networks:
  3300. description: "Specifies which networks the service should attach to."
  3301. type: "array"
  3302. items:
  3303. $ref: "#/definitions/NetworkAttachmentConfig"
  3304. LogDriver:
  3305. description: |
  3306. Specifies the log driver to use for tasks created from this spec. If
  3307. not present, the default one for the swarm will be used, finally
  3308. falling back to the engine default if not specified.
  3309. type: "object"
  3310. properties:
  3311. Name:
  3312. type: "string"
  3313. Options:
  3314. type: "object"
  3315. additionalProperties:
  3316. type: "string"
  3317. TaskState:
  3318. type: "string"
  3319. enum:
  3320. - "new"
  3321. - "allocated"
  3322. - "pending"
  3323. - "assigned"
  3324. - "accepted"
  3325. - "preparing"
  3326. - "ready"
  3327. - "starting"
  3328. - "running"
  3329. - "complete"
  3330. - "shutdown"
  3331. - "failed"
  3332. - "rejected"
  3333. - "remove"
  3334. - "orphaned"
  3335. Task:
  3336. type: "object"
  3337. properties:
  3338. ID:
  3339. description: "The ID of the task."
  3340. type: "string"
  3341. Version:
  3342. $ref: "#/definitions/ObjectVersion"
  3343. CreatedAt:
  3344. type: "string"
  3345. format: "dateTime"
  3346. UpdatedAt:
  3347. type: "string"
  3348. format: "dateTime"
  3349. Name:
  3350. description: "Name of the task."
  3351. type: "string"
  3352. Labels:
  3353. description: "User-defined key/value metadata."
  3354. type: "object"
  3355. additionalProperties:
  3356. type: "string"
  3357. Spec:
  3358. $ref: "#/definitions/TaskSpec"
  3359. ServiceID:
  3360. description: "The ID of the service this task is part of."
  3361. type: "string"
  3362. Slot:
  3363. type: "integer"
  3364. NodeID:
  3365. description: "The ID of the node that this task is on."
  3366. type: "string"
  3367. AssignedGenericResources:
  3368. $ref: "#/definitions/GenericResources"
  3369. Status:
  3370. type: "object"
  3371. properties:
  3372. Timestamp:
  3373. type: "string"
  3374. format: "dateTime"
  3375. State:
  3376. $ref: "#/definitions/TaskState"
  3377. Message:
  3378. type: "string"
  3379. Err:
  3380. type: "string"
  3381. ContainerStatus:
  3382. type: "object"
  3383. properties:
  3384. ContainerID:
  3385. type: "string"
  3386. PID:
  3387. type: "integer"
  3388. ExitCode:
  3389. type: "integer"
  3390. DesiredState:
  3391. $ref: "#/definitions/TaskState"
  3392. JobIteration:
  3393. description: |
  3394. If the Service this Task belongs to is a job-mode service, contains
  3395. the JobIteration of the Service this Task was created for. Absent if
  3396. the Task was created for a Replicated or Global Service.
  3397. $ref: "#/definitions/ObjectVersion"
  3398. example:
  3399. ID: "0kzzo1i0y4jz6027t0k7aezc7"
  3400. Version:
  3401. Index: 71
  3402. CreatedAt: "2016-06-07T21:07:31.171892745Z"
  3403. UpdatedAt: "2016-06-07T21:07:31.376370513Z"
  3404. Spec:
  3405. ContainerSpec:
  3406. Image: "redis"
  3407. Resources:
  3408. Limits: {}
  3409. Reservations: {}
  3410. RestartPolicy:
  3411. Condition: "any"
  3412. MaxAttempts: 0
  3413. Placement: {}
  3414. ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  3415. Slot: 1
  3416. NodeID: "60gvrl6tm78dmak4yl7srz94v"
  3417. Status:
  3418. Timestamp: "2016-06-07T21:07:31.290032978Z"
  3419. State: "running"
  3420. Message: "started"
  3421. ContainerStatus:
  3422. ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
  3423. PID: 677
  3424. DesiredState: "running"
  3425. NetworksAttachments:
  3426. - Network:
  3427. ID: "4qvuz4ko70xaltuqbt8956gd1"
  3428. Version:
  3429. Index: 18
  3430. CreatedAt: "2016-06-07T20:31:11.912919752Z"
  3431. UpdatedAt: "2016-06-07T21:07:29.955277358Z"
  3432. Spec:
  3433. Name: "ingress"
  3434. Labels:
  3435. com.docker.swarm.internal: "true"
  3436. DriverConfiguration: {}
  3437. IPAMOptions:
  3438. Driver: {}
  3439. Configs:
  3440. - Subnet: "10.255.0.0/16"
  3441. Gateway: "10.255.0.1"
  3442. DriverState:
  3443. Name: "overlay"
  3444. Options:
  3445. com.docker.network.driver.overlay.vxlanid_list: "256"
  3446. IPAMOptions:
  3447. Driver:
  3448. Name: "default"
  3449. Configs:
  3450. - Subnet: "10.255.0.0/16"
  3451. Gateway: "10.255.0.1"
  3452. Addresses:
  3453. - "10.255.0.10/16"
  3454. AssignedGenericResources:
  3455. - DiscreteResourceSpec:
  3456. Kind: "SSD"
  3457. Value: 3
  3458. - NamedResourceSpec:
  3459. Kind: "GPU"
  3460. Value: "UUID1"
  3461. - NamedResourceSpec:
  3462. Kind: "GPU"
  3463. Value: "UUID2"
  3464. ServiceSpec:
  3465. description: "User modifiable configuration for a service."
  3466. properties:
  3467. Name:
  3468. description: "Name of the service."
  3469. type: "string"
  3470. Labels:
  3471. description: "User-defined key/value metadata."
  3472. type: "object"
  3473. additionalProperties:
  3474. type: "string"
  3475. TaskTemplate:
  3476. $ref: "#/definitions/TaskSpec"
  3477. Mode:
  3478. description: "Scheduling mode for the service."
  3479. type: "object"
  3480. properties:
  3481. Replicated:
  3482. type: "object"
  3483. properties:
  3484. Replicas:
  3485. type: "integer"
  3486. format: "int64"
  3487. Global:
  3488. type: "object"
  3489. ReplicatedJob:
  3490. description: |
  3491. The mode used for services with a finite number of tasks that run
  3492. to a completed state.
  3493. type: "object"
  3494. properties:
  3495. MaxConcurrent:
  3496. description: |
  3497. The maximum number of replicas to run simultaneously.
  3498. type: "integer"
  3499. format: "int64"
  3500. default: 1
  3501. TotalCompletions:
  3502. description: |
  3503. The total number of replicas desired to reach the Completed
  3504. state. If unset, will default to the value of `MaxConcurrent`
  3505. type: "integer"
  3506. format: "int64"
  3507. GlobalJob:
  3508. description: |
  3509. The mode used for services which run a task to the completed state
  3510. on each valid node.
  3511. type: "object"
  3512. UpdateConfig:
  3513. description: "Specification for the update strategy of the service."
  3514. type: "object"
  3515. properties:
  3516. Parallelism:
  3517. description: |
  3518. Maximum number of tasks to be updated in one iteration (0 means
  3519. unlimited parallelism).
  3520. type: "integer"
  3521. format: "int64"
  3522. Delay:
  3523. description: "Amount of time between updates, in nanoseconds."
  3524. type: "integer"
  3525. format: "int64"
  3526. FailureAction:
  3527. description: |
  3528. Action to take if an updated task fails to run, or stops running
  3529. during the update.
  3530. type: "string"
  3531. enum:
  3532. - "continue"
  3533. - "pause"
  3534. - "rollback"
  3535. Monitor:
  3536. description: |
  3537. Amount of time to monitor each updated task for failures, in
  3538. nanoseconds.
  3539. type: "integer"
  3540. format: "int64"
  3541. MaxFailureRatio:
  3542. description: |
  3543. The fraction of tasks that may fail during an update before the
  3544. failure action is invoked, specified as a floating point number
  3545. between 0 and 1.
  3546. type: "number"
  3547. default: 0
  3548. Order:
  3549. description: |
  3550. The order of operations when rolling out an updated task. Either
  3551. the old task is shut down before the new task is started, or the
  3552. new task is started before the old task is shut down.
  3553. type: "string"
  3554. enum:
  3555. - "stop-first"
  3556. - "start-first"
  3557. RollbackConfig:
  3558. description: "Specification for the rollback strategy of the service."
  3559. type: "object"
  3560. properties:
  3561. Parallelism:
  3562. description: |
  3563. Maximum number of tasks to be rolled back in one iteration (0 means
  3564. unlimited parallelism).
  3565. type: "integer"
  3566. format: "int64"
  3567. Delay:
  3568. description: |
  3569. Amount of time between rollback iterations, in nanoseconds.
  3570. type: "integer"
  3571. format: "int64"
  3572. FailureAction:
  3573. description: |
  3574. Action to take if an rolled back task fails to run, or stops
  3575. running during the rollback.
  3576. type: "string"
  3577. enum:
  3578. - "continue"
  3579. - "pause"
  3580. Monitor:
  3581. description: |
  3582. Amount of time to monitor each rolled back task for failures, in
  3583. nanoseconds.
  3584. type: "integer"
  3585. format: "int64"
  3586. MaxFailureRatio:
  3587. description: |
  3588. The fraction of tasks that may fail during a rollback before the
  3589. failure action is invoked, specified as a floating point number
  3590. between 0 and 1.
  3591. type: "number"
  3592. default: 0
  3593. Order:
  3594. description: |
  3595. The order of operations when rolling back a task. Either the old
  3596. task is shut down before the new task is started, or the new task
  3597. is started before the old task is shut down.
  3598. type: "string"
  3599. enum:
  3600. - "stop-first"
  3601. - "start-first"
  3602. Networks:
  3603. description: "Specifies which networks the service should attach to."
  3604. type: "array"
  3605. items:
  3606. $ref: "#/definitions/NetworkAttachmentConfig"
  3607. EndpointSpec:
  3608. $ref: "#/definitions/EndpointSpec"
  3609. EndpointPortConfig:
  3610. type: "object"
  3611. properties:
  3612. Name:
  3613. type: "string"
  3614. Protocol:
  3615. type: "string"
  3616. enum:
  3617. - "tcp"
  3618. - "udp"
  3619. - "sctp"
  3620. TargetPort:
  3621. description: "The port inside the container."
  3622. type: "integer"
  3623. PublishedPort:
  3624. description: "The port on the swarm hosts."
  3625. type: "integer"
  3626. PublishMode:
  3627. description: |
  3628. The mode in which port is published.
  3629. <p><br /></p>
  3630. - "ingress" makes the target port accessible on every node,
  3631. regardless of whether there is a task for the service running on
  3632. that node or not.
  3633. - "host" bypasses the routing mesh and publish the port directly on
  3634. the swarm node where that service is running.
  3635. type: "string"
  3636. enum:
  3637. - "ingress"
  3638. - "host"
  3639. default: "ingress"
  3640. example: "ingress"
  3641. EndpointSpec:
  3642. description: "Properties that can be configured to access and load balance a service."
  3643. type: "object"
  3644. properties:
  3645. Mode:
  3646. description: |
  3647. The mode of resolution to use for internal load balancing between tasks.
  3648. type: "string"
  3649. enum:
  3650. - "vip"
  3651. - "dnsrr"
  3652. default: "vip"
  3653. Ports:
  3654. description: |
  3655. List of exposed ports that this service is accessible on from the
  3656. outside. Ports can only be provided if `vip` resolution mode is used.
  3657. type: "array"
  3658. items:
  3659. $ref: "#/definitions/EndpointPortConfig"
  3660. Service:
  3661. type: "object"
  3662. properties:
  3663. ID:
  3664. type: "string"
  3665. Version:
  3666. $ref: "#/definitions/ObjectVersion"
  3667. CreatedAt:
  3668. type: "string"
  3669. format: "dateTime"
  3670. UpdatedAt:
  3671. type: "string"
  3672. format: "dateTime"
  3673. Spec:
  3674. $ref: "#/definitions/ServiceSpec"
  3675. Endpoint:
  3676. type: "object"
  3677. properties:
  3678. Spec:
  3679. $ref: "#/definitions/EndpointSpec"
  3680. Ports:
  3681. type: "array"
  3682. items:
  3683. $ref: "#/definitions/EndpointPortConfig"
  3684. VirtualIPs:
  3685. type: "array"
  3686. items:
  3687. type: "object"
  3688. properties:
  3689. NetworkID:
  3690. type: "string"
  3691. Addr:
  3692. type: "string"
  3693. UpdateStatus:
  3694. description: "The status of a service update."
  3695. type: "object"
  3696. properties:
  3697. State:
  3698. type: "string"
  3699. enum:
  3700. - "updating"
  3701. - "paused"
  3702. - "completed"
  3703. StartedAt:
  3704. type: "string"
  3705. format: "dateTime"
  3706. CompletedAt:
  3707. type: "string"
  3708. format: "dateTime"
  3709. Message:
  3710. type: "string"
  3711. ServiceStatus:
  3712. description: |
  3713. The status of the service's tasks. Provided only when requested as
  3714. part of a ServiceList operation.
  3715. type: "object"
  3716. properties:
  3717. RunningTasks:
  3718. description: |
  3719. The number of tasks for the service currently in the Running state.
  3720. type: "integer"
  3721. format: "uint64"
  3722. example: 7
  3723. DesiredTasks:
  3724. description: |
  3725. The number of tasks for the service desired to be running.
  3726. For replicated services, this is the replica count from the
  3727. service spec. For global services, this is computed by taking
  3728. count of all tasks for the service with a Desired State other
  3729. than Shutdown.
  3730. type: "integer"
  3731. format: "uint64"
  3732. example: 10
  3733. CompletedTasks:
  3734. description: |
  3735. The number of tasks for a job that are in the Completed state.
  3736. This field must be cross-referenced with the service type, as the
  3737. value of 0 may mean the service is not in a job mode, or it may
  3738. mean the job-mode service has no tasks yet Completed.
  3739. type: "integer"
  3740. format: "uint64"
  3741. JobStatus:
  3742. description: |
  3743. The status of the service when it is in one of ReplicatedJob or
  3744. GlobalJob modes. Absent on Replicated and Global mode services. The
  3745. JobIteration is an ObjectVersion, but unlike the Service's version,
  3746. does not need to be sent with an update request.
  3747. type: "object"
  3748. properties:
  3749. JobIteration:
  3750. description: |
  3751. JobIteration is a value increased each time a Job is executed,
  3752. successfully or otherwise. "Executed", in this case, means the
  3753. job as a whole has been started, not that an individual Task has
  3754. been launched. A job is "Executed" when its ServiceSpec is
  3755. updated. JobIteration can be used to disambiguate Tasks belonging
  3756. to different executions of a job. Though JobIteration will
  3757. increase with each subsequent execution, it may not necessarily
  3758. increase by 1, and so JobIteration should not be used to
  3759. $ref: "#/definitions/ObjectVersion"
  3760. LastExecution:
  3761. description: |
  3762. The last time, as observed by the server, that this job was
  3763. started.
  3764. type: "string"
  3765. format: "dateTime"
  3766. example:
  3767. ID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  3768. Version:
  3769. Index: 19
  3770. CreatedAt: "2016-06-07T21:05:51.880065305Z"
  3771. UpdatedAt: "2016-06-07T21:07:29.962229872Z"
  3772. Spec:
  3773. Name: "hopeful_cori"
  3774. TaskTemplate:
  3775. ContainerSpec:
  3776. Image: "redis"
  3777. Resources:
  3778. Limits: {}
  3779. Reservations: {}
  3780. RestartPolicy:
  3781. Condition: "any"
  3782. MaxAttempts: 0
  3783. Placement: {}
  3784. ForceUpdate: 0
  3785. Mode:
  3786. Replicated:
  3787. Replicas: 1
  3788. UpdateConfig:
  3789. Parallelism: 1
  3790. Delay: 1000000000
  3791. FailureAction: "pause"
  3792. Monitor: 15000000000
  3793. MaxFailureRatio: 0.15
  3794. RollbackConfig:
  3795. Parallelism: 1
  3796. Delay: 1000000000
  3797. FailureAction: "pause"
  3798. Monitor: 15000000000
  3799. MaxFailureRatio: 0.15
  3800. EndpointSpec:
  3801. Mode: "vip"
  3802. Ports:
  3803. -
  3804. Protocol: "tcp"
  3805. TargetPort: 6379
  3806. PublishedPort: 30001
  3807. Endpoint:
  3808. Spec:
  3809. Mode: "vip"
  3810. Ports:
  3811. -
  3812. Protocol: "tcp"
  3813. TargetPort: 6379
  3814. PublishedPort: 30001
  3815. Ports:
  3816. -
  3817. Protocol: "tcp"
  3818. TargetPort: 6379
  3819. PublishedPort: 30001
  3820. VirtualIPs:
  3821. -
  3822. NetworkID: "4qvuz4ko70xaltuqbt8956gd1"
  3823. Addr: "10.255.0.2/16"
  3824. -
  3825. NetworkID: "4qvuz4ko70xaltuqbt8956gd1"
  3826. Addr: "10.255.0.3/16"
  3827. ImageDeleteResponseItem:
  3828. type: "object"
  3829. properties:
  3830. Untagged:
  3831. description: "The image ID of an image that was untagged"
  3832. type: "string"
  3833. Deleted:
  3834. description: "The image ID of an image that was deleted"
  3835. type: "string"
  3836. ServiceUpdateResponse:
  3837. type: "object"
  3838. properties:
  3839. Warnings:
  3840. description: "Optional warning messages"
  3841. type: "array"
  3842. items:
  3843. type: "string"
  3844. example:
  3845. Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"
  3846. ContainerSummary:
  3847. type: "array"
  3848. items:
  3849. type: "object"
  3850. properties:
  3851. Id:
  3852. description: "The ID of this container"
  3853. type: "string"
  3854. x-go-name: "ID"
  3855. Names:
  3856. description: "The names that this container has been given"
  3857. type: "array"
  3858. items:
  3859. type: "string"
  3860. Image:
  3861. description: "The name of the image used when creating this container"
  3862. type: "string"
  3863. ImageID:
  3864. description: "The ID of the image that this container was created from"
  3865. type: "string"
  3866. Command:
  3867. description: "Command to run when starting the container"
  3868. type: "string"
  3869. Created:
  3870. description: "When the container was created"
  3871. type: "integer"
  3872. format: "int64"
  3873. Ports:
  3874. description: "The ports exposed by this container"
  3875. type: "array"
  3876. items:
  3877. $ref: "#/definitions/Port"
  3878. SizeRw:
  3879. description: "The size of files that have been created or changed by this container"
  3880. type: "integer"
  3881. format: "int64"
  3882. SizeRootFs:
  3883. description: "The total size of all the files in this container"
  3884. type: "integer"
  3885. format: "int64"
  3886. Labels:
  3887. description: "User-defined key/value metadata."
  3888. type: "object"
  3889. additionalProperties:
  3890. type: "string"
  3891. State:
  3892. description: "The state of this container (e.g. `Exited`)"
  3893. type: "string"
  3894. Status:
  3895. description: "Additional human-readable status of this container (e.g. `Exit 0`)"
  3896. type: "string"
  3897. HostConfig:
  3898. type: "object"
  3899. properties:
  3900. NetworkMode:
  3901. type: "string"
  3902. NetworkSettings:
  3903. description: "A summary of the container's network settings"
  3904. type: "object"
  3905. properties:
  3906. Networks:
  3907. type: "object"
  3908. additionalProperties:
  3909. $ref: "#/definitions/EndpointSettings"
  3910. Mounts:
  3911. type: "array"
  3912. items:
  3913. $ref: "#/definitions/Mount"
  3914. Driver:
  3915. description: "Driver represents a driver (network, logging, secrets)."
  3916. type: "object"
  3917. required: [Name]
  3918. properties:
  3919. Name:
  3920. description: "Name of the driver."
  3921. type: "string"
  3922. x-nullable: false
  3923. example: "some-driver"
  3924. Options:
  3925. description: "Key/value map of driver-specific options."
  3926. type: "object"
  3927. x-nullable: false
  3928. additionalProperties:
  3929. type: "string"
  3930. example:
  3931. OptionA: "value for driver-specific option A"
  3932. OptionB: "value for driver-specific option B"
  3933. SecretSpec:
  3934. type: "object"
  3935. properties:
  3936. Name:
  3937. description: "User-defined name of the secret."
  3938. type: "string"
  3939. Labels:
  3940. description: "User-defined key/value metadata."
  3941. type: "object"
  3942. additionalProperties:
  3943. type: "string"
  3944. example:
  3945. com.example.some-label: "some-value"
  3946. com.example.some-other-label: "some-other-value"
  3947. Data:
  3948. description: |
  3949. Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5))
  3950. data to store as secret.
  3951. This field is only used to _create_ a secret, and is not returned by
  3952. other endpoints.
  3953. type: "string"
  3954. example: ""
  3955. Driver:
  3956. description: |
  3957. Name of the secrets driver used to fetch the secret's value from an
  3958. external secret store.
  3959. $ref: "#/definitions/Driver"
  3960. Templating:
  3961. description: |
  3962. Templating driver, if applicable
  3963. Templating controls whether and how to evaluate the config payload as
  3964. a template. If no driver is set, no templating is used.
  3965. $ref: "#/definitions/Driver"
  3966. Secret:
  3967. type: "object"
  3968. properties:
  3969. ID:
  3970. type: "string"
  3971. example: "blt1owaxmitz71s9v5zh81zun"
  3972. Version:
  3973. $ref: "#/definitions/ObjectVersion"
  3974. CreatedAt:
  3975. type: "string"
  3976. format: "dateTime"
  3977. example: "2017-07-20T13:55:28.678958722Z"
  3978. UpdatedAt:
  3979. type: "string"
  3980. format: "dateTime"
  3981. example: "2017-07-20T13:55:28.678958722Z"
  3982. Spec:
  3983. $ref: "#/definitions/SecretSpec"
  3984. ConfigSpec:
  3985. type: "object"
  3986. properties:
  3987. Name:
  3988. description: "User-defined name of the config."
  3989. type: "string"
  3990. Labels:
  3991. description: "User-defined key/value metadata."
  3992. type: "object"
  3993. additionalProperties:
  3994. type: "string"
  3995. Data:
  3996. description: |
  3997. Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5))
  3998. config data.
  3999. type: "string"
  4000. Templating:
  4001. description: |
  4002. Templating driver, if applicable
  4003. Templating controls whether and how to evaluate the config payload as
  4004. a template. If no driver is set, no templating is used.
  4005. $ref: "#/definitions/Driver"
  4006. Config:
  4007. type: "object"
  4008. properties:
  4009. ID:
  4010. type: "string"
  4011. Version:
  4012. $ref: "#/definitions/ObjectVersion"
  4013. CreatedAt:
  4014. type: "string"
  4015. format: "dateTime"
  4016. UpdatedAt:
  4017. type: "string"
  4018. format: "dateTime"
  4019. Spec:
  4020. $ref: "#/definitions/ConfigSpec"
  4021. ContainerState:
  4022. description: |
  4023. ContainerState stores container's running state. It's part of ContainerJSONBase
  4024. and will be returned by the "inspect" command.
  4025. type: "object"
  4026. properties:
  4027. Status:
  4028. description: |
  4029. String representation of the container state. Can be one of "created",
  4030. "running", "paused", "restarting", "removing", "exited", or "dead".
  4031. type: "string"
  4032. enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"]
  4033. example: "running"
  4034. Running:
  4035. description: |
  4036. Whether this container is running.
  4037. Note that a running container can be _paused_. The `Running` and `Paused`
  4038. booleans are not mutually exclusive:
  4039. When pausing a container (on Linux), the freezer cgroup is used to suspend
  4040. all processes in the container. Freezing the process requires the process to
  4041. be running. As a result, paused containers are both `Running` _and_ `Paused`.
  4042. Use the `Status` field instead to determine if a container's state is "running".
  4043. type: "boolean"
  4044. example: true
  4045. Paused:
  4046. description: "Whether this container is paused."
  4047. type: "boolean"
  4048. example: false
  4049. Restarting:
  4050. description: "Whether this container is restarting."
  4051. type: "boolean"
  4052. example: false
  4053. OOMKilled:
  4054. description: |
  4055. Whether this container has been killed because it ran out of memory.
  4056. type: "boolean"
  4057. example: false
  4058. Dead:
  4059. type: "boolean"
  4060. example: false
  4061. Pid:
  4062. description: "The process ID of this container"
  4063. type: "integer"
  4064. example: 1234
  4065. ExitCode:
  4066. description: "The last exit code of this container"
  4067. type: "integer"
  4068. example: 0
  4069. Error:
  4070. type: "string"
  4071. StartedAt:
  4072. description: "The time when this container was last started."
  4073. type: "string"
  4074. example: "2020-01-06T09:06:59.461876391Z"
  4075. FinishedAt:
  4076. description: "The time when this container last exited."
  4077. type: "string"
  4078. example: "2020-01-06T09:07:59.461876391Z"
  4079. Health:
  4080. x-nullable: true
  4081. $ref: "#/definitions/Health"
  4082. SystemVersion:
  4083. type: "object"
  4084. description: |
  4085. Response of Engine API: GET "/version"
  4086. properties:
  4087. Platform:
  4088. type: "object"
  4089. required: [Name]
  4090. properties:
  4091. Name:
  4092. type: "string"
  4093. Components:
  4094. type: "array"
  4095. description: |
  4096. Information about system components
  4097. items:
  4098. type: "object"
  4099. x-go-name: ComponentVersion
  4100. required: [Name, Version]
  4101. properties:
  4102. Name:
  4103. description: |
  4104. Name of the component
  4105. type: "string"
  4106. example: "Engine"
  4107. Version:
  4108. description: |
  4109. Version of the component
  4110. type: "string"
  4111. x-nullable: false
  4112. example: "19.03.12"
  4113. Details:
  4114. description: |
  4115. Key/value pairs of strings with additional information about the
  4116. component. These values are intended for informational purposes
  4117. only, and their content is not defined, and not part of the API
  4118. specification.
  4119. These messages can be printed by the client as information to the user.
  4120. type: "object"
  4121. x-nullable: true
  4122. Version:
  4123. description: "The version of the daemon"
  4124. type: "string"
  4125. example: "19.03.12"
  4126. ApiVersion:
  4127. description: |
  4128. The default (and highest) API version that is supported by the daemon
  4129. type: "string"
  4130. example: "1.40"
  4131. MinAPIVersion:
  4132. description: |
  4133. The minimum API version that is supported by the daemon
  4134. type: "string"
  4135. example: "1.12"
  4136. GitCommit:
  4137. description: |
  4138. The Git commit of the source code that was used to build the daemon
  4139. type: "string"
  4140. example: "48a66213fe"
  4141. GoVersion:
  4142. description: |
  4143. The version Go used to compile the daemon, and the version of the Go
  4144. runtime in use.
  4145. type: "string"
  4146. example: "go1.13.14"
  4147. Os:
  4148. description: |
  4149. The operating system that the daemon is running on ("linux" or "windows")
  4150. type: "string"
  4151. example: "linux"
  4152. Arch:
  4153. description: |
  4154. The architecture that the daemon is running on
  4155. type: "string"
  4156. example: "amd64"
  4157. KernelVersion:
  4158. description: |
  4159. The kernel version (`uname -r`) that the daemon is running on.
  4160. This field is omitted when empty.
  4161. type: "string"
  4162. example: "4.19.76-linuxkit"
  4163. Experimental:
  4164. description: |
  4165. Indicates if the daemon is started with experimental features enabled.
  4166. This field is omitted when empty / false.
  4167. type: "boolean"
  4168. example: true
  4169. BuildTime:
  4170. description: |
  4171. The date and time that the daemon was compiled.
  4172. type: "string"
  4173. example: "2020-06-22T15:49:27.000000000+00:00"
  4174. SystemInfo:
  4175. type: "object"
  4176. properties:
  4177. ID:
  4178. description: |
  4179. Unique identifier of the daemon.
  4180. <p><br /></p>
  4181. > **Note**: The format of the ID itself is not part of the API, and
  4182. > should not be considered stable.
  4183. type: "string"
  4184. example: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS"
  4185. Containers:
  4186. description: "Total number of containers on the host."
  4187. type: "integer"
  4188. example: 14
  4189. ContainersRunning:
  4190. description: |
  4191. Number of containers with status `"running"`.
  4192. type: "integer"
  4193. example: 3
  4194. ContainersPaused:
  4195. description: |
  4196. Number of containers with status `"paused"`.
  4197. type: "integer"
  4198. example: 1
  4199. ContainersStopped:
  4200. description: |
  4201. Number of containers with status `"stopped"`.
  4202. type: "integer"
  4203. example: 10
  4204. Images:
  4205. description: |
  4206. Total number of images on the host.
  4207. Both _tagged_ and _untagged_ (dangling) images are counted.
  4208. type: "integer"
  4209. example: 508
  4210. Driver:
  4211. description: "Name of the storage driver in use."
  4212. type: "string"
  4213. example: "overlay2"
  4214. DriverStatus:
  4215. description: |
  4216. Information specific to the storage driver, provided as
  4217. "label" / "value" pairs.
  4218. This information is provided by the storage driver, and formatted
  4219. in a way consistent with the output of `docker info` on the command
  4220. line.
  4221. <p><br /></p>
  4222. > **Note**: The information returned in this field, including the
  4223. > formatting of values and labels, should not be considered stable,
  4224. > and may change without notice.
  4225. type: "array"
  4226. items:
  4227. type: "array"
  4228. items:
  4229. type: "string"
  4230. example:
  4231. - ["Backing Filesystem", "extfs"]
  4232. - ["Supports d_type", "true"]
  4233. - ["Native Overlay Diff", "true"]
  4234. DockerRootDir:
  4235. description: |
  4236. Root directory of persistent Docker state.
  4237. Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker`
  4238. on Windows.
  4239. type: "string"
  4240. example: "/var/lib/docker"
  4241. Plugins:
  4242. $ref: "#/definitions/PluginsInfo"
  4243. MemoryLimit:
  4244. description: "Indicates if the host has memory limit support enabled."
  4245. type: "boolean"
  4246. example: true
  4247. SwapLimit:
  4248. description: "Indicates if the host has memory swap limit support enabled."
  4249. type: "boolean"
  4250. example: true
  4251. KernelMemory:
  4252. description: |
  4253. Indicates if the host has kernel memory limit support enabled.
  4254. <p><br /></p>
  4255. > **Deprecated**: This field is deprecated as the kernel 5.4 deprecated
  4256. > `kmem.limit_in_bytes`.
  4257. type: "boolean"
  4258. example: true
  4259. CpuCfsPeriod:
  4260. description: |
  4261. Indicates if CPU CFS(Completely Fair Scheduler) period is supported by
  4262. the host.
  4263. type: "boolean"
  4264. example: true
  4265. CpuCfsQuota:
  4266. description: |
  4267. Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by
  4268. the host.
  4269. type: "boolean"
  4270. example: true
  4271. CPUShares:
  4272. description: |
  4273. Indicates if CPU Shares limiting is supported by the host.
  4274. type: "boolean"
  4275. example: true
  4276. CPUSet:
  4277. description: |
  4278. Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host.
  4279. See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt)
  4280. type: "boolean"
  4281. example: true
  4282. PidsLimit:
  4283. description: "Indicates if the host kernel has PID limit support enabled."
  4284. type: "boolean"
  4285. example: true
  4286. OomKillDisable:
  4287. description: "Indicates if OOM killer disable is supported on the host."
  4288. type: "boolean"
  4289. IPv4Forwarding:
  4290. description: "Indicates IPv4 forwarding is enabled."
  4291. type: "boolean"
  4292. example: true
  4293. BridgeNfIptables:
  4294. description: "Indicates if `bridge-nf-call-iptables` is available on the host."
  4295. type: "boolean"
  4296. example: true
  4297. BridgeNfIp6tables:
  4298. description: "Indicates if `bridge-nf-call-ip6tables` is available on the host."
  4299. type: "boolean"
  4300. example: true
  4301. Debug:
  4302. description: |
  4303. Indicates if the daemon is running in debug-mode / with debug-level
  4304. logging enabled.
  4305. type: "boolean"
  4306. example: true
  4307. NFd:
  4308. description: |
  4309. The total number of file Descriptors in use by the daemon process.
  4310. This information is only returned if debug-mode is enabled.
  4311. type: "integer"
  4312. example: 64
  4313. NGoroutines:
  4314. description: |
  4315. The number of goroutines that currently exist.
  4316. This information is only returned if debug-mode is enabled.
  4317. type: "integer"
  4318. example: 174
  4319. SystemTime:
  4320. description: |
  4321. Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt)
  4322. format with nano-seconds.
  4323. type: "string"
  4324. example: "2017-08-08T20:28:29.06202363Z"
  4325. LoggingDriver:
  4326. description: |
  4327. The logging driver to use as a default for new containers.
  4328. type: "string"
  4329. CgroupDriver:
  4330. description: |
  4331. The driver to use for managing cgroups.
  4332. type: "string"
  4333. enum: ["cgroupfs", "systemd", "none"]
  4334. default: "cgroupfs"
  4335. example: "cgroupfs"
  4336. CgroupVersion:
  4337. description: |
  4338. The version of the cgroup.
  4339. type: "string"
  4340. enum: ["1", "2"]
  4341. default: "1"
  4342. example: "1"
  4343. NEventsListener:
  4344. description: "Number of event listeners subscribed."
  4345. type: "integer"
  4346. example: 30
  4347. KernelVersion:
  4348. description: |
  4349. Kernel version of the host.
  4350. On Linux, this information obtained from `uname`. On Windows this
  4351. information is queried from the <kbd>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\</kbd>
  4352. registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_.
  4353. type: "string"
  4354. example: "4.9.38-moby"
  4355. OperatingSystem:
  4356. description: |
  4357. Name of the host's operating system, for example: "Ubuntu 16.04.2 LTS"
  4358. or "Windows Server 2016 Datacenter"
  4359. type: "string"
  4360. example: "Alpine Linux v3.5"
  4361. OSVersion:
  4362. description: |
  4363. Version of the host's operating system
  4364. <p><br /></p>
  4365. > **Note**: The information returned in this field, including its
  4366. > very existence, and the formatting of values, should not be considered
  4367. > stable, and may change without notice.
  4368. type: "string"
  4369. example: "16.04"
  4370. OSType:
  4371. description: |
  4372. Generic type of the operating system of the host, as returned by the
  4373. Go runtime (`GOOS`).
  4374. Currently returned values are "linux" and "windows". A full list of
  4375. possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).
  4376. type: "string"
  4377. example: "linux"
  4378. Architecture:
  4379. description: |
  4380. Hardware architecture of the host, as returned by the Go runtime
  4381. (`GOARCH`).
  4382. A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).
  4383. type: "string"
  4384. example: "x86_64"
  4385. NCPU:
  4386. description: |
  4387. The number of logical CPUs usable by the daemon.
  4388. The number of available CPUs is checked by querying the operating
  4389. system when the daemon starts. Changes to operating system CPU
  4390. allocation after the daemon is started are not reflected.
  4391. type: "integer"
  4392. example: 4
  4393. MemTotal:
  4394. description: |
  4395. Total amount of physical memory available on the host, in bytes.
  4396. type: "integer"
  4397. format: "int64"
  4398. example: 2095882240
  4399. IndexServerAddress:
  4400. description: |
  4401. Address / URL of the index server that is used for image search,
  4402. and as a default for user authentication for Docker Hub and Docker Cloud.
  4403. default: "https://index.docker.io/v1/"
  4404. type: "string"
  4405. example: "https://index.docker.io/v1/"
  4406. RegistryConfig:
  4407. $ref: "#/definitions/RegistryServiceConfig"
  4408. GenericResources:
  4409. $ref: "#/definitions/GenericResources"
  4410. HttpProxy:
  4411. description: |
  4412. HTTP-proxy configured for the daemon. This value is obtained from the
  4413. [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable.
  4414. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL
  4415. are masked in the API response.
  4416. Containers do not automatically inherit this configuration.
  4417. type: "string"
  4418. example: "http://xxxxx:xxxxx@proxy.corp.example.com:8080"
  4419. HttpsProxy:
  4420. description: |
  4421. HTTPS-proxy configured for the daemon. This value is obtained from the
  4422. [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable.
  4423. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL
  4424. are masked in the API response.
  4425. Containers do not automatically inherit this configuration.
  4426. type: "string"
  4427. example: "https://xxxxx:xxxxx@proxy.corp.example.com:4443"
  4428. NoProxy:
  4429. description: |
  4430. Comma-separated list of domain extensions for which no proxy should be
  4431. used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html)
  4432. environment variable.
  4433. Containers do not automatically inherit this configuration.
  4434. type: "string"
  4435. example: "*.local, 169.254/16"
  4436. Name:
  4437. description: "Hostname of the host."
  4438. type: "string"
  4439. example: "node5.corp.example.com"
  4440. Labels:
  4441. description: |
  4442. User-defined labels (key/value metadata) as set on the daemon.
  4443. <p><br /></p>
  4444. > **Note**: When part of a Swarm, nodes can both have _daemon_ labels,
  4445. > set through the daemon configuration, and _node_ labels, set from a
  4446. > manager node in the Swarm. Node labels are not included in this
  4447. > field. Node labels can be retrieved using the `/nodes/(id)` endpoint
  4448. > on a manager node in the Swarm.
  4449. type: "array"
  4450. items:
  4451. type: "string"
  4452. example: ["storage=ssd", "production"]
  4453. ExperimentalBuild:
  4454. description: |
  4455. Indicates if experimental features are enabled on the daemon.
  4456. type: "boolean"
  4457. example: true
  4458. ServerVersion:
  4459. description: |
  4460. Version string of the daemon.
  4461. > **Note**: the [standalone Swarm API](https://docs.docker.com/swarm/swarm-api/)
  4462. > returns the Swarm version instead of the daemon version, for example
  4463. > `swarm/1.2.8`.
  4464. type: "string"
  4465. example: "17.06.0-ce"
  4466. ClusterStore:
  4467. description: |
  4468. URL of the distributed storage backend.
  4469. The storage backend is used for multihost networking (to store
  4470. network and endpoint information) and by the node discovery mechanism.
  4471. <p><br /></p>
  4472. > **Deprecated**: This field is only propagated when using standalone Swarm
  4473. > mode, and overlay networking using an external k/v store. Overlay
  4474. > networks with Swarm mode enabled use the built-in raft store, and
  4475. > this field will be empty.
  4476. type: "string"
  4477. example: "consul://consul.corp.example.com:8600/some/path"
  4478. ClusterAdvertise:
  4479. description: |
  4480. The network endpoint that the Engine advertises for the purpose of
  4481. node discovery. ClusterAdvertise is a `host:port` combination on which
  4482. the daemon is reachable by other hosts.
  4483. <p><br /></p>
  4484. > **Deprecated**: This field is only propagated when using standalone Swarm
  4485. > mode, and overlay networking using an external k/v store. Overlay
  4486. > networks with Swarm mode enabled use the built-in raft store, and
  4487. > this field will be empty.
  4488. type: "string"
  4489. example: "node5.corp.example.com:8000"
  4490. Runtimes:
  4491. description: |
  4492. List of [OCI compliant](https://github.com/opencontainers/runtime-spec)
  4493. runtimes configured on the daemon. Keys hold the "name" used to
  4494. reference the runtime.
  4495. The Docker daemon relies on an OCI compliant runtime (invoked via the
  4496. `containerd` daemon) as its interface to the Linux kernel namespaces,
  4497. cgroups, and SELinux.
  4498. The default runtime is `runc`, and automatically configured. Additional
  4499. runtimes can be configured by the user and will be listed here.
  4500. type: "object"
  4501. additionalProperties:
  4502. $ref: "#/definitions/Runtime"
  4503. default:
  4504. runc:
  4505. path: "runc"
  4506. example:
  4507. runc:
  4508. path: "runc"
  4509. runc-master:
  4510. path: "/go/bin/runc"
  4511. custom:
  4512. path: "/usr/local/bin/my-oci-runtime"
  4513. runtimeArgs: ["--debug", "--systemd-cgroup=false"]
  4514. DefaultRuntime:
  4515. description: |
  4516. Name of the default OCI runtime that is used when starting containers.
  4517. The default can be overridden per-container at create time.
  4518. type: "string"
  4519. default: "runc"
  4520. example: "runc"
  4521. Swarm:
  4522. $ref: "#/definitions/SwarmInfo"
  4523. LiveRestoreEnabled:
  4524. description: |
  4525. Indicates if live restore is enabled.
  4526. If enabled, containers are kept running when the daemon is shutdown
  4527. or upon daemon start if running containers are detected.
  4528. type: "boolean"
  4529. default: false
  4530. example: false
  4531. Isolation:
  4532. description: |
  4533. Represents the isolation technology to use as a default for containers.
  4534. The supported values are platform-specific.
  4535. If no isolation value is specified on daemon start, on Windows client,
  4536. the default is `hyperv`, and on Windows server, the default is `process`.
  4537. This option is currently not used on other platforms.
  4538. default: "default"
  4539. type: "string"
  4540. enum:
  4541. - "default"
  4542. - "hyperv"
  4543. - "process"
  4544. InitBinary:
  4545. description: |
  4546. Name and, optional, path of the `docker-init` binary.
  4547. If the path is omitted, the daemon searches the host's `$PATH` for the
  4548. binary and uses the first result.
  4549. type: "string"
  4550. example: "docker-init"
  4551. ContainerdCommit:
  4552. $ref: "#/definitions/Commit"
  4553. RuncCommit:
  4554. $ref: "#/definitions/Commit"
  4555. InitCommit:
  4556. $ref: "#/definitions/Commit"
  4557. SecurityOptions:
  4558. description: |
  4559. List of security features that are enabled on the daemon, such as
  4560. apparmor, seccomp, SELinux, user-namespaces (userns), and rootless.
  4561. Additional configuration options for each security feature may
  4562. be present, and are included as a comma-separated list of key/value
  4563. pairs.
  4564. type: "array"
  4565. items:
  4566. type: "string"
  4567. example:
  4568. - "name=apparmor"
  4569. - "name=seccomp,profile=default"
  4570. - "name=selinux"
  4571. - "name=userns"
  4572. - "name=rootless"
  4573. ProductLicense:
  4574. description: |
  4575. Reports a summary of the product license on the daemon.
  4576. If a commercial license has been applied to the daemon, information
  4577. such as number of nodes, and expiration are included.
  4578. type: "string"
  4579. example: "Community Engine"
  4580. DefaultAddressPools:
  4581. description: |
  4582. List of custom default address pools for local networks, which can be
  4583. specified in the daemon.json file or dockerd option.
  4584. Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256
  4585. 10.10.[0-255].0/24 address pools.
  4586. type: "array"
  4587. items:
  4588. type: "object"
  4589. properties:
  4590. Base:
  4591. description: "The network address in CIDR format"
  4592. type: "string"
  4593. example: "10.10.0.0/16"
  4594. Size:
  4595. description: "The network pool size"
  4596. type: "integer"
  4597. example: "24"
  4598. Warnings:
  4599. description: |
  4600. List of warnings / informational messages about missing features, or
  4601. issues related to the daemon configuration.
  4602. These messages can be printed by the client as information to the user.
  4603. type: "array"
  4604. items:
  4605. type: "string"
  4606. example:
  4607. - "WARNING: No memory limit support"
  4608. - "WARNING: bridge-nf-call-iptables is disabled"
  4609. - "WARNING: bridge-nf-call-ip6tables is disabled"
  4610. # PluginsInfo is a temp struct holding Plugins name
  4611. # registered with docker daemon. It is used by Info struct
  4612. PluginsInfo:
  4613. description: |
  4614. Available plugins per type.
  4615. <p><br /></p>
  4616. > **Note**: Only unmanaged (V1) plugins are included in this list.
  4617. > V1 plugins are "lazily" loaded, and are not returned in this list
  4618. > if there is no resource using the plugin.
  4619. type: "object"
  4620. properties:
  4621. Volume:
  4622. description: "Names of available volume-drivers, and network-driver plugins."
  4623. type: "array"
  4624. items:
  4625. type: "string"
  4626. example: ["local"]
  4627. Network:
  4628. description: "Names of available network-drivers, and network-driver plugins."
  4629. type: "array"
  4630. items:
  4631. type: "string"
  4632. example: ["bridge", "host", "ipvlan", "macvlan", "null", "overlay"]
  4633. Authorization:
  4634. description: "Names of available authorization plugins."
  4635. type: "array"
  4636. items:
  4637. type: "string"
  4638. example: ["img-authz-plugin", "hbm"]
  4639. Log:
  4640. description: "Names of available logging-drivers, and logging-driver plugins."
  4641. type: "array"
  4642. items:
  4643. type: "string"
  4644. example: ["awslogs", "fluentd", "gcplogs", "gelf", "journald", "json-file", "logentries", "splunk", "syslog"]
  4645. RegistryServiceConfig:
  4646. description: |
  4647. RegistryServiceConfig stores daemon registry services configuration.
  4648. type: "object"
  4649. x-nullable: true
  4650. properties:
  4651. AllowNondistributableArtifactsCIDRs:
  4652. description: |
  4653. List of IP ranges to which nondistributable artifacts can be pushed,
  4654. using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632).
  4655. Some images (for example, Windows base images) contain artifacts
  4656. whose distribution is restricted by license. When these images are
  4657. pushed to a registry, restricted artifacts are not included.
  4658. This configuration override this behavior, and enables the daemon to
  4659. push nondistributable artifacts to all registries whose resolved IP
  4660. address is within the subnet described by the CIDR syntax.
  4661. This option is useful when pushing images containing
  4662. nondistributable artifacts to a registry on an air-gapped network so
  4663. hosts on that network can pull the images without connecting to
  4664. another server.
  4665. > **Warning**: Nondistributable artifacts typically have restrictions
  4666. > on how and where they can be distributed and shared. Only use this
  4667. > feature to push artifacts to private registries and ensure that you
  4668. > are in compliance with any terms that cover redistributing
  4669. > nondistributable artifacts.
  4670. type: "array"
  4671. items:
  4672. type: "string"
  4673. example: ["::1/128", "127.0.0.0/8"]
  4674. AllowNondistributableArtifactsHostnames:
  4675. description: |
  4676. List of registry hostnames to which nondistributable artifacts can be
  4677. pushed, using the format `<hostname>[:<port>]` or `<IP address>[:<port>]`.
  4678. Some images (for example, Windows base images) contain artifacts
  4679. whose distribution is restricted by license. When these images are
  4680. pushed to a registry, restricted artifacts are not included.
  4681. This configuration override this behavior for the specified
  4682. registries.
  4683. This option is useful when pushing images containing
  4684. nondistributable artifacts to a registry on an air-gapped network so
  4685. hosts on that network can pull the images without connecting to
  4686. another server.
  4687. > **Warning**: Nondistributable artifacts typically have restrictions
  4688. > on how and where they can be distributed and shared. Only use this
  4689. > feature to push artifacts to private registries and ensure that you
  4690. > are in compliance with any terms that cover redistributing
  4691. > nondistributable artifacts.
  4692. type: "array"
  4693. items:
  4694. type: "string"
  4695. example: ["registry.internal.corp.example.com:3000", "[2001:db8:a0b:12f0::1]:443"]
  4696. InsecureRegistryCIDRs:
  4697. description: |
  4698. List of IP ranges of insecure registries, using the CIDR syntax
  4699. ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries
  4700. accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates
  4701. from unknown CAs) communication.
  4702. By default, local registries (`127.0.0.0/8`) are configured as
  4703. insecure. All other registries are secure. Communicating with an
  4704. insecure registry is not possible if the daemon assumes that registry
  4705. is secure.
  4706. This configuration override this behavior, insecure communication with
  4707. registries whose resolved IP address is within the subnet described by
  4708. the CIDR syntax.
  4709. Registries can also be marked insecure by hostname. Those registries
  4710. are listed under `IndexConfigs` and have their `Secure` field set to
  4711. `false`.
  4712. > **Warning**: Using this option can be useful when running a local
  4713. > registry, but introduces security vulnerabilities. This option
  4714. > should therefore ONLY be used for testing purposes. For increased
  4715. > security, users should add their CA to their system's list of trusted
  4716. > CAs instead of enabling this option.
  4717. type: "array"
  4718. items:
  4719. type: "string"
  4720. example: ["::1/128", "127.0.0.0/8"]
  4721. IndexConfigs:
  4722. type: "object"
  4723. additionalProperties:
  4724. $ref: "#/definitions/IndexInfo"
  4725. example:
  4726. "127.0.0.1:5000":
  4727. "Name": "127.0.0.1:5000"
  4728. "Mirrors": []
  4729. "Secure": false
  4730. "Official": false
  4731. "[2001:db8:a0b:12f0::1]:80":
  4732. "Name": "[2001:db8:a0b:12f0::1]:80"
  4733. "Mirrors": []
  4734. "Secure": false
  4735. "Official": false
  4736. "docker.io":
  4737. Name: "docker.io"
  4738. Mirrors: ["https://hub-mirror.corp.example.com:5000/"]
  4739. Secure: true
  4740. Official: true
  4741. "registry.internal.corp.example.com:3000":
  4742. Name: "registry.internal.corp.example.com:3000"
  4743. Mirrors: []
  4744. Secure: false
  4745. Official: false
  4746. Mirrors:
  4747. description: |
  4748. List of registry URLs that act as a mirror for the official
  4749. (`docker.io`) registry.
  4750. type: "array"
  4751. items:
  4752. type: "string"
  4753. example:
  4754. - "https://hub-mirror.corp.example.com:5000/"
  4755. - "https://[2001:db8:a0b:12f0::1]/"
  4756. IndexInfo:
  4757. description:
  4758. IndexInfo contains information about a registry.
  4759. type: "object"
  4760. x-nullable: true
  4761. properties:
  4762. Name:
  4763. description: |
  4764. Name of the registry, such as "docker.io".
  4765. type: "string"
  4766. example: "docker.io"
  4767. Mirrors:
  4768. description: |
  4769. List of mirrors, expressed as URIs.
  4770. type: "array"
  4771. items:
  4772. type: "string"
  4773. example:
  4774. - "https://hub-mirror.corp.example.com:5000/"
  4775. - "https://registry-2.docker.io/"
  4776. - "https://registry-3.docker.io/"
  4777. Secure:
  4778. description: |
  4779. Indicates if the registry is part of the list of insecure
  4780. registries.
  4781. If `false`, the registry is insecure. Insecure registries accept
  4782. un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from
  4783. unknown CAs) communication.
  4784. > **Warning**: Insecure registries can be useful when running a local
  4785. > registry. However, because its use creates security vulnerabilities
  4786. > it should ONLY be enabled for testing purposes. For increased
  4787. > security, users should add their CA to their system's list of
  4788. > trusted CAs instead of enabling this option.
  4789. type: "boolean"
  4790. example: true
  4791. Official:
  4792. description: |
  4793. Indicates whether this is an official registry (i.e., Docker Hub / docker.io)
  4794. type: "boolean"
  4795. example: true
  4796. Runtime:
  4797. description: |
  4798. Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec)
  4799. runtime.
  4800. The runtime is invoked by the daemon via the `containerd` daemon. OCI
  4801. runtimes act as an interface to the Linux kernel namespaces, cgroups,
  4802. and SELinux.
  4803. type: "object"
  4804. properties:
  4805. path:
  4806. description: |
  4807. Name and, optional, path, of the OCI executable binary.
  4808. If the path is omitted, the daemon searches the host's `$PATH` for the
  4809. binary and uses the first result.
  4810. type: "string"
  4811. example: "/usr/local/bin/my-oci-runtime"
  4812. runtimeArgs:
  4813. description: |
  4814. List of command-line arguments to pass to the runtime when invoked.
  4815. type: "array"
  4816. x-nullable: true
  4817. items:
  4818. type: "string"
  4819. example: ["--debug", "--systemd-cgroup=false"]
  4820. Commit:
  4821. description: |
  4822. Commit holds the Git-commit (SHA1) that a binary was built from, as
  4823. reported in the version-string of external tools, such as `containerd`,
  4824. or `runC`.
  4825. type: "object"
  4826. properties:
  4827. ID:
  4828. description: "Actual commit ID of external tool."
  4829. type: "string"
  4830. example: "cfb82a876ecc11b5ca0977d1733adbe58599088a"
  4831. Expected:
  4832. description: |
  4833. Commit ID of external tool expected by dockerd as set at build time.
  4834. type: "string"
  4835. example: "2d41c047c83e09a6d61d464906feb2a2f3c52aa4"
  4836. SwarmInfo:
  4837. description: |
  4838. Represents generic information about swarm.
  4839. type: "object"
  4840. properties:
  4841. NodeID:
  4842. description: "Unique identifier of for this node in the swarm."
  4843. type: "string"
  4844. default: ""
  4845. example: "k67qz4598weg5unwwffg6z1m1"
  4846. NodeAddr:
  4847. description: |
  4848. IP address at which this node can be reached by other nodes in the
  4849. swarm.
  4850. type: "string"
  4851. default: ""
  4852. example: "10.0.0.46"
  4853. LocalNodeState:
  4854. $ref: "#/definitions/LocalNodeState"
  4855. ControlAvailable:
  4856. type: "boolean"
  4857. default: false
  4858. example: true
  4859. Error:
  4860. type: "string"
  4861. default: ""
  4862. RemoteManagers:
  4863. description: |
  4864. List of ID's and addresses of other managers in the swarm.
  4865. type: "array"
  4866. default: null
  4867. x-nullable: true
  4868. items:
  4869. $ref: "#/definitions/PeerNode"
  4870. example:
  4871. - NodeID: "71izy0goik036k48jg985xnds"
  4872. Addr: "10.0.0.158:2377"
  4873. - NodeID: "79y6h1o4gv8n120drcprv5nmc"
  4874. Addr: "10.0.0.159:2377"
  4875. - NodeID: "k67qz4598weg5unwwffg6z1m1"
  4876. Addr: "10.0.0.46:2377"
  4877. Nodes:
  4878. description: "Total number of nodes in the swarm."
  4879. type: "integer"
  4880. x-nullable: true
  4881. example: 4
  4882. Managers:
  4883. description: "Total number of managers in the swarm."
  4884. type: "integer"
  4885. x-nullable: true
  4886. example: 3
  4887. Cluster:
  4888. $ref: "#/definitions/ClusterInfo"
  4889. LocalNodeState:
  4890. description: "Current local status of this node."
  4891. type: "string"
  4892. default: ""
  4893. enum:
  4894. - ""
  4895. - "inactive"
  4896. - "pending"
  4897. - "active"
  4898. - "error"
  4899. - "locked"
  4900. example: "active"
  4901. PeerNode:
  4902. description: "Represents a peer-node in the swarm"
  4903. properties:
  4904. NodeID:
  4905. description: "Unique identifier of for this node in the swarm."
  4906. type: "string"
  4907. Addr:
  4908. description: |
  4909. IP address and ports at which this node can be reached.
  4910. type: "string"
  4911. NetworkAttachmentConfig:
  4912. description: |
  4913. Specifies how a service should be attached to a particular network.
  4914. type: "object"
  4915. properties:
  4916. Target:
  4917. description: |
  4918. The target network for attachment. Must be a network name or ID.
  4919. type: "string"
  4920. Aliases:
  4921. description: |
  4922. Discoverable alternate names for the service on this network.
  4923. type: "array"
  4924. items:
  4925. type: "string"
  4926. DriverOpts:
  4927. description: |
  4928. Driver attachment options for the network target.
  4929. type: "object"
  4930. additionalProperties:
  4931. type: "string"
  4932. paths:
  4933. /containers/json:
  4934. get:
  4935. summary: "List containers"
  4936. description: |
  4937. Returns a list of containers. For details on the format, see the
  4938. [inspect endpoint](#operation/ContainerInspect).
  4939. Note that it uses a different, smaller representation of a container
  4940. than inspecting a single container. For example, the list of linked
  4941. containers is not propagated .
  4942. operationId: "ContainerList"
  4943. produces:
  4944. - "application/json"
  4945. parameters:
  4946. - name: "all"
  4947. in: "query"
  4948. description: |
  4949. Return all containers. By default, only running containers are shown.
  4950. type: "boolean"
  4951. default: false
  4952. - name: "limit"
  4953. in: "query"
  4954. description: |
  4955. Return this number of most recently created containers, including
  4956. non-running ones.
  4957. type: "integer"
  4958. - name: "size"
  4959. in: "query"
  4960. description: |
  4961. Return the size of container as fields `SizeRw` and `SizeRootFs`.
  4962. type: "boolean"
  4963. default: false
  4964. - name: "filters"
  4965. in: "query"
  4966. description: |
  4967. Filters to process on the container list, encoded as JSON (a
  4968. `map[string][]string`). For example, `{"status": ["paused"]}` will
  4969. only return paused containers.
  4970. Available filters:
  4971. - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`)
  4972. - `before`=(`<container id>` or `<container name>`)
  4973. - `expose`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)
  4974. - `exited=<int>` containers with exit code of `<int>`
  4975. - `health`=(`starting`|`healthy`|`unhealthy`|`none`)
  4976. - `id=<ID>` a container's ID
  4977. - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only)
  4978. - `is-task=`(`true`|`false`)
  4979. - `label=key` or `label="key=value"` of a container label
  4980. - `name=<name>` a container's name
  4981. - `network`=(`<network id>` or `<network name>`)
  4982. - `publish`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)
  4983. - `since`=(`<container id>` or `<container name>`)
  4984. - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`)
  4985. - `volume`=(`<volume name>` or `<mount point destination>`)
  4986. type: "string"
  4987. responses:
  4988. 200:
  4989. description: "no error"
  4990. schema:
  4991. $ref: "#/definitions/ContainerSummary"
  4992. examples:
  4993. application/json:
  4994. - Id: "8dfafdbc3a40"
  4995. Names:
  4996. - "/boring_feynman"
  4997. Image: "ubuntu:latest"
  4998. ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  4999. Command: "echo 1"
  5000. Created: 1367854155
  5001. State: "Exited"
  5002. Status: "Exit 0"
  5003. Ports:
  5004. - PrivatePort: 2222
  5005. PublicPort: 3333
  5006. Type: "tcp"
  5007. Labels:
  5008. com.example.vendor: "Acme"
  5009. com.example.license: "GPL"
  5010. com.example.version: "1.0"
  5011. SizeRw: 12288
  5012. SizeRootFs: 0
  5013. HostConfig:
  5014. NetworkMode: "default"
  5015. NetworkSettings:
  5016. Networks:
  5017. bridge:
  5018. NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  5019. EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f"
  5020. Gateway: "172.17.0.1"
  5021. IPAddress: "172.17.0.2"
  5022. IPPrefixLen: 16
  5023. IPv6Gateway: ""
  5024. GlobalIPv6Address: ""
  5025. GlobalIPv6PrefixLen: 0
  5026. MacAddress: "02:42:ac:11:00:02"
  5027. Mounts:
  5028. - Name: "fac362...80535"
  5029. Source: "/data"
  5030. Destination: "/data"
  5031. Driver: "local"
  5032. Mode: "ro,Z"
  5033. RW: false
  5034. Propagation: ""
  5035. - Id: "9cd87474be90"
  5036. Names:
  5037. - "/coolName"
  5038. Image: "ubuntu:latest"
  5039. ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  5040. Command: "echo 222222"
  5041. Created: 1367854155
  5042. State: "Exited"
  5043. Status: "Exit 0"
  5044. Ports: []
  5045. Labels: {}
  5046. SizeRw: 12288
  5047. SizeRootFs: 0
  5048. HostConfig:
  5049. NetworkMode: "default"
  5050. NetworkSettings:
  5051. Networks:
  5052. bridge:
  5053. NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  5054. EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a"
  5055. Gateway: "172.17.0.1"
  5056. IPAddress: "172.17.0.8"
  5057. IPPrefixLen: 16
  5058. IPv6Gateway: ""
  5059. GlobalIPv6Address: ""
  5060. GlobalIPv6PrefixLen: 0
  5061. MacAddress: "02:42:ac:11:00:08"
  5062. Mounts: []
  5063. - Id: "3176a2479c92"
  5064. Names:
  5065. - "/sleepy_dog"
  5066. Image: "ubuntu:latest"
  5067. ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  5068. Command: "echo 3333333333333333"
  5069. Created: 1367854154
  5070. State: "Exited"
  5071. Status: "Exit 0"
  5072. Ports: []
  5073. Labels: {}
  5074. SizeRw: 12288
  5075. SizeRootFs: 0
  5076. HostConfig:
  5077. NetworkMode: "default"
  5078. NetworkSettings:
  5079. Networks:
  5080. bridge:
  5081. NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  5082. EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d"
  5083. Gateway: "172.17.0.1"
  5084. IPAddress: "172.17.0.6"
  5085. IPPrefixLen: 16
  5086. IPv6Gateway: ""
  5087. GlobalIPv6Address: ""
  5088. GlobalIPv6PrefixLen: 0
  5089. MacAddress: "02:42:ac:11:00:06"
  5090. Mounts: []
  5091. - Id: "4cb07b47f9fb"
  5092. Names:
  5093. - "/running_cat"
  5094. Image: "ubuntu:latest"
  5095. ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  5096. Command: "echo 444444444444444444444444444444444"
  5097. Created: 1367854152
  5098. State: "Exited"
  5099. Status: "Exit 0"
  5100. Ports: []
  5101. Labels: {}
  5102. SizeRw: 12288
  5103. SizeRootFs: 0
  5104. HostConfig:
  5105. NetworkMode: "default"
  5106. NetworkSettings:
  5107. Networks:
  5108. bridge:
  5109. NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  5110. EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9"
  5111. Gateway: "172.17.0.1"
  5112. IPAddress: "172.17.0.5"
  5113. IPPrefixLen: 16
  5114. IPv6Gateway: ""
  5115. GlobalIPv6Address: ""
  5116. GlobalIPv6PrefixLen: 0
  5117. MacAddress: "02:42:ac:11:00:05"
  5118. Mounts: []
  5119. 400:
  5120. description: "bad parameter"
  5121. schema:
  5122. $ref: "#/definitions/ErrorResponse"
  5123. 500:
  5124. description: "server error"
  5125. schema:
  5126. $ref: "#/definitions/ErrorResponse"
  5127. tags: ["Container"]
  5128. /containers/create:
  5129. post:
  5130. summary: "Create a container"
  5131. operationId: "ContainerCreate"
  5132. consumes:
  5133. - "application/json"
  5134. - "application/octet-stream"
  5135. produces:
  5136. - "application/json"
  5137. parameters:
  5138. - name: "name"
  5139. in: "query"
  5140. description: |
  5141. Assign the specified name to the container. Must match
  5142. `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`.
  5143. type: "string"
  5144. pattern: "^/?[a-zA-Z0-9][a-zA-Z0-9_.-]+$"
  5145. - name: "body"
  5146. in: "body"
  5147. description: "Container to create"
  5148. schema:
  5149. allOf:
  5150. - $ref: "#/definitions/ContainerConfig"
  5151. - type: "object"
  5152. properties:
  5153. HostConfig:
  5154. $ref: "#/definitions/HostConfig"
  5155. NetworkingConfig:
  5156. $ref: "#/definitions/NetworkingConfig"
  5157. example:
  5158. Hostname: ""
  5159. Domainname: ""
  5160. User: ""
  5161. AttachStdin: false
  5162. AttachStdout: true
  5163. AttachStderr: true
  5164. Tty: false
  5165. OpenStdin: false
  5166. StdinOnce: false
  5167. Env:
  5168. - "FOO=bar"
  5169. - "BAZ=quux"
  5170. Cmd:
  5171. - "date"
  5172. Entrypoint: ""
  5173. Image: "ubuntu"
  5174. Labels:
  5175. com.example.vendor: "Acme"
  5176. com.example.license: "GPL"
  5177. com.example.version: "1.0"
  5178. Volumes:
  5179. /volumes/data: {}
  5180. WorkingDir: ""
  5181. NetworkDisabled: false
  5182. MacAddress: "12:34:56:78:9a:bc"
  5183. ExposedPorts:
  5184. 22/tcp: {}
  5185. StopSignal: "SIGTERM"
  5186. StopTimeout: 10
  5187. HostConfig:
  5188. Binds:
  5189. - "/tmp:/tmp"
  5190. Links:
  5191. - "redis3:redis"
  5192. Memory: 0
  5193. MemorySwap: 0
  5194. MemoryReservation: 0
  5195. KernelMemory: 0
  5196. NanoCpus: 500000
  5197. CpuPercent: 80
  5198. CpuShares: 512
  5199. CpuPeriod: 100000
  5200. CpuRealtimePeriod: 1000000
  5201. CpuRealtimeRuntime: 10000
  5202. CpuQuota: 50000
  5203. CpusetCpus: "0,1"
  5204. CpusetMems: "0,1"
  5205. MaximumIOps: 0
  5206. MaximumIOBps: 0
  5207. BlkioWeight: 300
  5208. BlkioWeightDevice:
  5209. - {}
  5210. BlkioDeviceReadBps:
  5211. - {}
  5212. BlkioDeviceReadIOps:
  5213. - {}
  5214. BlkioDeviceWriteBps:
  5215. - {}
  5216. BlkioDeviceWriteIOps:
  5217. - {}
  5218. DeviceRequests:
  5219. - Driver: "nvidia"
  5220. Count: -1
  5221. DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"]
  5222. Capabilities: [["gpu", "nvidia", "compute"]]
  5223. Options:
  5224. property1: "string"
  5225. property2: "string"
  5226. MemorySwappiness: 60
  5227. OomKillDisable: false
  5228. OomScoreAdj: 500
  5229. PidMode: ""
  5230. PidsLimit: 0
  5231. PortBindings:
  5232. 22/tcp:
  5233. - HostPort: "11022"
  5234. PublishAllPorts: false
  5235. Privileged: false
  5236. ReadonlyRootfs: false
  5237. Dns:
  5238. - "8.8.8.8"
  5239. DnsOptions:
  5240. - ""
  5241. DnsSearch:
  5242. - ""
  5243. VolumesFrom:
  5244. - "parent"
  5245. - "other:ro"
  5246. CapAdd:
  5247. - "NET_ADMIN"
  5248. CapDrop:
  5249. - "MKNOD"
  5250. GroupAdd:
  5251. - "newgroup"
  5252. RestartPolicy:
  5253. Name: ""
  5254. MaximumRetryCount: 0
  5255. AutoRemove: true
  5256. NetworkMode: "bridge"
  5257. Devices: []
  5258. Ulimits:
  5259. - {}
  5260. LogConfig:
  5261. Type: "json-file"
  5262. Config: {}
  5263. SecurityOpt: []
  5264. StorageOpt: {}
  5265. CgroupParent: ""
  5266. VolumeDriver: ""
  5267. ShmSize: 67108864
  5268. NetworkingConfig:
  5269. EndpointsConfig:
  5270. isolated_nw:
  5271. IPAMConfig:
  5272. IPv4Address: "172.20.30.33"
  5273. IPv6Address: "2001:db8:abcd::3033"
  5274. LinkLocalIPs:
  5275. - "169.254.34.68"
  5276. - "fe80::3468"
  5277. Links:
  5278. - "container_1"
  5279. - "container_2"
  5280. Aliases:
  5281. - "server_x"
  5282. - "server_y"
  5283. required: true
  5284. responses:
  5285. 201:
  5286. description: "Container created successfully"
  5287. schema:
  5288. type: "object"
  5289. title: "ContainerCreateResponse"
  5290. description: "OK response to ContainerCreate operation"
  5291. required: [Id, Warnings]
  5292. properties:
  5293. Id:
  5294. description: "The ID of the created container"
  5295. type: "string"
  5296. x-nullable: false
  5297. Warnings:
  5298. description: "Warnings encountered when creating the container"
  5299. type: "array"
  5300. x-nullable: false
  5301. items:
  5302. type: "string"
  5303. examples:
  5304. application/json:
  5305. Id: "e90e34656806"
  5306. Warnings: []
  5307. 400:
  5308. description: "bad parameter"
  5309. schema:
  5310. $ref: "#/definitions/ErrorResponse"
  5311. 404:
  5312. description: "no such image"
  5313. schema:
  5314. $ref: "#/definitions/ErrorResponse"
  5315. examples:
  5316. application/json:
  5317. message: "No such image: c2ada9df5af8"
  5318. 409:
  5319. description: "conflict"
  5320. schema:
  5321. $ref: "#/definitions/ErrorResponse"
  5322. 500:
  5323. description: "server error"
  5324. schema:
  5325. $ref: "#/definitions/ErrorResponse"
  5326. tags: ["Container"]
  5327. /containers/{id}/json:
  5328. get:
  5329. summary: "Inspect a container"
  5330. description: "Return low-level information about a container."
  5331. operationId: "ContainerInspect"
  5332. produces:
  5333. - "application/json"
  5334. responses:
  5335. 200:
  5336. description: "no error"
  5337. schema:
  5338. type: "object"
  5339. title: "ContainerInspectResponse"
  5340. properties:
  5341. Id:
  5342. description: "The ID of the container"
  5343. type: "string"
  5344. Created:
  5345. description: "The time the container was created"
  5346. type: "string"
  5347. Path:
  5348. description: "The path to the command being run"
  5349. type: "string"
  5350. Args:
  5351. description: "The arguments to the command being run"
  5352. type: "array"
  5353. items:
  5354. type: "string"
  5355. State:
  5356. x-nullable: true
  5357. $ref: "#/definitions/ContainerState"
  5358. Image:
  5359. description: "The container's image ID"
  5360. type: "string"
  5361. ResolvConfPath:
  5362. type: "string"
  5363. HostnamePath:
  5364. type: "string"
  5365. HostsPath:
  5366. type: "string"
  5367. LogPath:
  5368. type: "string"
  5369. Name:
  5370. type: "string"
  5371. RestartCount:
  5372. type: "integer"
  5373. Driver:
  5374. type: "string"
  5375. Platform:
  5376. type: "string"
  5377. MountLabel:
  5378. type: "string"
  5379. ProcessLabel:
  5380. type: "string"
  5381. AppArmorProfile:
  5382. type: "string"
  5383. ExecIDs:
  5384. description: "IDs of exec instances that are running in the container."
  5385. type: "array"
  5386. items:
  5387. type: "string"
  5388. x-nullable: true
  5389. HostConfig:
  5390. $ref: "#/definitions/HostConfig"
  5391. GraphDriver:
  5392. $ref: "#/definitions/GraphDriverData"
  5393. SizeRw:
  5394. description: |
  5395. The size of files that have been created or changed by this
  5396. container.
  5397. type: "integer"
  5398. format: "int64"
  5399. SizeRootFs:
  5400. description: "The total size of all the files in this container."
  5401. type: "integer"
  5402. format: "int64"
  5403. Mounts:
  5404. type: "array"
  5405. items:
  5406. $ref: "#/definitions/MountPoint"
  5407. Config:
  5408. $ref: "#/definitions/ContainerConfig"
  5409. NetworkSettings:
  5410. $ref: "#/definitions/NetworkSettings"
  5411. examples:
  5412. application/json:
  5413. AppArmorProfile: ""
  5414. Args:
  5415. - "-c"
  5416. - "exit 9"
  5417. Config:
  5418. AttachStderr: true
  5419. AttachStdin: false
  5420. AttachStdout: true
  5421. Cmd:
  5422. - "/bin/sh"
  5423. - "-c"
  5424. - "exit 9"
  5425. Domainname: ""
  5426. Env:
  5427. - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  5428. Healthcheck:
  5429. Test: ["CMD-SHELL", "exit 0"]
  5430. Hostname: "ba033ac44011"
  5431. Image: "ubuntu"
  5432. Labels:
  5433. com.example.vendor: "Acme"
  5434. com.example.license: "GPL"
  5435. com.example.version: "1.0"
  5436. MacAddress: ""
  5437. NetworkDisabled: false
  5438. OpenStdin: false
  5439. StdinOnce: false
  5440. Tty: false
  5441. User: ""
  5442. Volumes:
  5443. /volumes/data: {}
  5444. WorkingDir: ""
  5445. StopSignal: "SIGTERM"
  5446. StopTimeout: 10
  5447. Created: "2015-01-06T15:47:31.485331387Z"
  5448. Driver: "devicemapper"
  5449. ExecIDs:
  5450. - "b35395de42bc8abd327f9dd65d913b9ba28c74d2f0734eeeae84fa1c616a0fca"
  5451. - "3fc1232e5cd20c8de182ed81178503dc6437f4e7ef12b52cc5e8de020652f1c4"
  5452. HostConfig:
  5453. MaximumIOps: 0
  5454. MaximumIOBps: 0
  5455. BlkioWeight: 0
  5456. BlkioWeightDevice:
  5457. - {}
  5458. BlkioDeviceReadBps:
  5459. - {}
  5460. BlkioDeviceWriteBps:
  5461. - {}
  5462. BlkioDeviceReadIOps:
  5463. - {}
  5464. BlkioDeviceWriteIOps:
  5465. - {}
  5466. ContainerIDFile: ""
  5467. CpusetCpus: ""
  5468. CpusetMems: ""
  5469. CpuPercent: 80
  5470. CpuShares: 0
  5471. CpuPeriod: 100000
  5472. CpuRealtimePeriod: 1000000
  5473. CpuRealtimeRuntime: 10000
  5474. Devices: []
  5475. DeviceRequests:
  5476. - Driver: "nvidia"
  5477. Count: -1
  5478. DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"]
  5479. Capabilities: [["gpu", "nvidia", "compute"]]
  5480. Options:
  5481. property1: "string"
  5482. property2: "string"
  5483. IpcMode: ""
  5484. LxcConf: []
  5485. Memory: 0
  5486. MemorySwap: 0
  5487. MemoryReservation: 0
  5488. KernelMemory: 0
  5489. OomKillDisable: false
  5490. OomScoreAdj: 500
  5491. NetworkMode: "bridge"
  5492. PidMode: ""
  5493. PortBindings: {}
  5494. Privileged: false
  5495. ReadonlyRootfs: false
  5496. PublishAllPorts: false
  5497. RestartPolicy:
  5498. MaximumRetryCount: 2
  5499. Name: "on-failure"
  5500. LogConfig:
  5501. Type: "json-file"
  5502. Sysctls:
  5503. net.ipv4.ip_forward: "1"
  5504. Ulimits:
  5505. - {}
  5506. VolumeDriver: ""
  5507. ShmSize: 67108864
  5508. HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname"
  5509. HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts"
  5510. LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log"
  5511. Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39"
  5512. Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2"
  5513. MountLabel: ""
  5514. Name: "/boring_euclid"
  5515. NetworkSettings:
  5516. Bridge: ""
  5517. SandboxID: ""
  5518. HairpinMode: false
  5519. LinkLocalIPv6Address: ""
  5520. LinkLocalIPv6PrefixLen: 0
  5521. SandboxKey: ""
  5522. EndpointID: ""
  5523. Gateway: ""
  5524. GlobalIPv6Address: ""
  5525. GlobalIPv6PrefixLen: 0
  5526. IPAddress: ""
  5527. IPPrefixLen: 0
  5528. IPv6Gateway: ""
  5529. MacAddress: ""
  5530. Networks:
  5531. bridge:
  5532. NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  5533. EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d"
  5534. Gateway: "172.17.0.1"
  5535. IPAddress: "172.17.0.2"
  5536. IPPrefixLen: 16
  5537. IPv6Gateway: ""
  5538. GlobalIPv6Address: ""
  5539. GlobalIPv6PrefixLen: 0
  5540. MacAddress: "02:42:ac:12:00:02"
  5541. Path: "/bin/sh"
  5542. ProcessLabel: ""
  5543. ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf"
  5544. RestartCount: 1
  5545. State:
  5546. Error: ""
  5547. ExitCode: 9
  5548. FinishedAt: "2015-01-06T15:47:32.080254511Z"
  5549. Health:
  5550. Status: "healthy"
  5551. FailingStreak: 0
  5552. Log:
  5553. - Start: "2019-12-22T10:59:05.6385933Z"
  5554. End: "2019-12-22T10:59:05.8078452Z"
  5555. ExitCode: 0
  5556. Output: ""
  5557. OOMKilled: false
  5558. Dead: false
  5559. Paused: false
  5560. Pid: 0
  5561. Restarting: false
  5562. Running: true
  5563. StartedAt: "2015-01-06T15:47:32.072697474Z"
  5564. Status: "running"
  5565. Mounts:
  5566. - Name: "fac362...80535"
  5567. Source: "/data"
  5568. Destination: "/data"
  5569. Driver: "local"
  5570. Mode: "ro,Z"
  5571. RW: false
  5572. Propagation: ""
  5573. 404:
  5574. description: "no such container"
  5575. schema:
  5576. $ref: "#/definitions/ErrorResponse"
  5577. examples:
  5578. application/json:
  5579. message: "No such container: c2ada9df5af8"
  5580. 500:
  5581. description: "server error"
  5582. schema:
  5583. $ref: "#/definitions/ErrorResponse"
  5584. parameters:
  5585. - name: "id"
  5586. in: "path"
  5587. required: true
  5588. description: "ID or name of the container"
  5589. type: "string"
  5590. - name: "size"
  5591. in: "query"
  5592. type: "boolean"
  5593. default: false
  5594. description: "Return the size of container as fields `SizeRw` and `SizeRootFs`"
  5595. tags: ["Container"]
  5596. /containers/{id}/top:
  5597. get:
  5598. summary: "List processes running inside a container"
  5599. description: |
  5600. On Unix systems, this is done by running the `ps` command. This endpoint
  5601. is not supported on Windows.
  5602. operationId: "ContainerTop"
  5603. responses:
  5604. 200:
  5605. description: "no error"
  5606. schema:
  5607. type: "object"
  5608. title: "ContainerTopResponse"
  5609. description: "OK response to ContainerTop operation"
  5610. properties:
  5611. Titles:
  5612. description: "The ps column titles"
  5613. type: "array"
  5614. items:
  5615. type: "string"
  5616. Processes:
  5617. description: |
  5618. Each process running in the container, where each is process
  5619. is an array of values corresponding to the titles.
  5620. type: "array"
  5621. items:
  5622. type: "array"
  5623. items:
  5624. type: "string"
  5625. examples:
  5626. application/json:
  5627. Titles:
  5628. - "UID"
  5629. - "PID"
  5630. - "PPID"
  5631. - "C"
  5632. - "STIME"
  5633. - "TTY"
  5634. - "TIME"
  5635. - "CMD"
  5636. Processes:
  5637. -
  5638. - "root"
  5639. - "13642"
  5640. - "882"
  5641. - "0"
  5642. - "17:03"
  5643. - "pts/0"
  5644. - "00:00:00"
  5645. - "/bin/bash"
  5646. -
  5647. - "root"
  5648. - "13735"
  5649. - "13642"
  5650. - "0"
  5651. - "17:06"
  5652. - "pts/0"
  5653. - "00:00:00"
  5654. - "sleep 10"
  5655. 404:
  5656. description: "no such container"
  5657. schema:
  5658. $ref: "#/definitions/ErrorResponse"
  5659. examples:
  5660. application/json:
  5661. message: "No such container: c2ada9df5af8"
  5662. 500:
  5663. description: "server error"
  5664. schema:
  5665. $ref: "#/definitions/ErrorResponse"
  5666. parameters:
  5667. - name: "id"
  5668. in: "path"
  5669. required: true
  5670. description: "ID or name of the container"
  5671. type: "string"
  5672. - name: "ps_args"
  5673. in: "query"
  5674. description: "The arguments to pass to `ps`. For example, `aux`"
  5675. type: "string"
  5676. default: "-ef"
  5677. tags: ["Container"]
  5678. /containers/{id}/logs:
  5679. get:
  5680. summary: "Get container logs"
  5681. description: |
  5682. Get `stdout` and `stderr` logs from a container.
  5683. Note: This endpoint works only for containers with the `json-file` or
  5684. `journald` logging driver.
  5685. operationId: "ContainerLogs"
  5686. responses:
  5687. 200:
  5688. description: |
  5689. logs returned as a stream in response body.
  5690. For the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach).
  5691. Note that unlike the attach endpoint, the logs endpoint does not
  5692. upgrade the connection and does not set Content-Type.
  5693. schema:
  5694. type: "string"
  5695. format: "binary"
  5696. 404:
  5697. description: "no such container"
  5698. schema:
  5699. $ref: "#/definitions/ErrorResponse"
  5700. examples:
  5701. application/json:
  5702. message: "No such container: c2ada9df5af8"
  5703. 500:
  5704. description: "server error"
  5705. schema:
  5706. $ref: "#/definitions/ErrorResponse"
  5707. parameters:
  5708. - name: "id"
  5709. in: "path"
  5710. required: true
  5711. description: "ID or name of the container"
  5712. type: "string"
  5713. - name: "follow"
  5714. in: "query"
  5715. description: "Keep connection after returning logs."
  5716. type: "boolean"
  5717. default: false
  5718. - name: "stdout"
  5719. in: "query"
  5720. description: "Return logs from `stdout`"
  5721. type: "boolean"
  5722. default: false
  5723. - name: "stderr"
  5724. in: "query"
  5725. description: "Return logs from `stderr`"
  5726. type: "boolean"
  5727. default: false
  5728. - name: "since"
  5729. in: "query"
  5730. description: "Only return logs since this time, as a UNIX timestamp"
  5731. type: "integer"
  5732. default: 0
  5733. - name: "until"
  5734. in: "query"
  5735. description: "Only return logs before this time, as a UNIX timestamp"
  5736. type: "integer"
  5737. default: 0
  5738. - name: "timestamps"
  5739. in: "query"
  5740. description: "Add timestamps to every log line"
  5741. type: "boolean"
  5742. default: false
  5743. - name: "tail"
  5744. in: "query"
  5745. description: |
  5746. Only return this number of log lines from the end of the logs.
  5747. Specify as an integer or `all` to output all log lines.
  5748. type: "string"
  5749. default: "all"
  5750. tags: ["Container"]
  5751. /containers/{id}/changes:
  5752. get:
  5753. summary: "Get changes on a container’s filesystem"
  5754. description: |
  5755. Returns which files in a container's filesystem have been added, deleted,
  5756. or modified. The `Kind` of modification can be one of:
  5757. - `0`: Modified
  5758. - `1`: Added
  5759. - `2`: Deleted
  5760. operationId: "ContainerChanges"
  5761. produces: ["application/json"]
  5762. responses:
  5763. 200:
  5764. description: "The list of changes"
  5765. schema:
  5766. type: "array"
  5767. items:
  5768. type: "object"
  5769. x-go-name: "ContainerChangeResponseItem"
  5770. title: "ContainerChangeResponseItem"
  5771. description: "change item in response to ContainerChanges operation"
  5772. required: [Path, Kind]
  5773. properties:
  5774. Path:
  5775. description: "Path to file that has changed"
  5776. type: "string"
  5777. x-nullable: false
  5778. Kind:
  5779. description: "Kind of change"
  5780. type: "integer"
  5781. format: "uint8"
  5782. enum: [0, 1, 2]
  5783. x-nullable: false
  5784. examples:
  5785. application/json:
  5786. - Path: "/dev"
  5787. Kind: 0
  5788. - Path: "/dev/kmsg"
  5789. Kind: 1
  5790. - Path: "/test"
  5791. Kind: 1
  5792. 404:
  5793. description: "no such container"
  5794. schema:
  5795. $ref: "#/definitions/ErrorResponse"
  5796. examples:
  5797. application/json:
  5798. message: "No such container: c2ada9df5af8"
  5799. 500:
  5800. description: "server error"
  5801. schema:
  5802. $ref: "#/definitions/ErrorResponse"
  5803. parameters:
  5804. - name: "id"
  5805. in: "path"
  5806. required: true
  5807. description: "ID or name of the container"
  5808. type: "string"
  5809. tags: ["Container"]
  5810. /containers/{id}/export:
  5811. get:
  5812. summary: "Export a container"
  5813. description: "Export the contents of a container as a tarball."
  5814. operationId: "ContainerExport"
  5815. produces:
  5816. - "application/octet-stream"
  5817. responses:
  5818. 200:
  5819. description: "no error"
  5820. 404:
  5821. description: "no such container"
  5822. schema:
  5823. $ref: "#/definitions/ErrorResponse"
  5824. examples:
  5825. application/json:
  5826. message: "No such container: c2ada9df5af8"
  5827. 500:
  5828. description: "server error"
  5829. schema:
  5830. $ref: "#/definitions/ErrorResponse"
  5831. parameters:
  5832. - name: "id"
  5833. in: "path"
  5834. required: true
  5835. description: "ID or name of the container"
  5836. type: "string"
  5837. tags: ["Container"]
  5838. /containers/{id}/stats:
  5839. get:
  5840. summary: "Get container stats based on resource usage"
  5841. description: |
  5842. This endpoint returns a live stream of a container’s resource usage
  5843. statistics.
  5844. The `precpu_stats` is the CPU statistic of the *previous* read, and is
  5845. used to calculate the CPU usage percentage. It is not an exact copy
  5846. of the `cpu_stats` field.
  5847. If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is
  5848. nil then for compatibility with older daemons the length of the
  5849. corresponding `cpu_usage.percpu_usage` array should be used.
  5850. On a cgroup v2 host, the following fields are not set
  5851. * `blkio_stats`: all fields other than `io_service_bytes_recursive`
  5852. * `cpu_stats`: `cpu_usage.percpu_usage`
  5853. * `memory_stats`: `max_usage` and `failcnt`
  5854. Also, `memory_stats.stats` fields are incompatible with cgroup v1.
  5855. To calculate the values shown by the `stats` command of the docker cli tool
  5856. the following formulas can be used:
  5857. * used_memory = `memory_stats.usage - memory_stats.stats.cache`
  5858. * available_memory = `memory_stats.limit`
  5859. * Memory usage % = `(used_memory / available_memory) * 100.0`
  5860. * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
  5861. * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
  5862. * number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
  5863. * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
  5864. operationId: "ContainerStats"
  5865. produces: ["application/json"]
  5866. responses:
  5867. 200:
  5868. description: "no error"
  5869. schema:
  5870. type: "object"
  5871. examples:
  5872. application/json:
  5873. read: "2015-01-08T22:57:31.547920715Z"
  5874. pids_stats:
  5875. current: 3
  5876. networks:
  5877. eth0:
  5878. rx_bytes: 5338
  5879. rx_dropped: 0
  5880. rx_errors: 0
  5881. rx_packets: 36
  5882. tx_bytes: 648
  5883. tx_dropped: 0
  5884. tx_errors: 0
  5885. tx_packets: 8
  5886. eth5:
  5887. rx_bytes: 4641
  5888. rx_dropped: 0
  5889. rx_errors: 0
  5890. rx_packets: 26
  5891. tx_bytes: 690
  5892. tx_dropped: 0
  5893. tx_errors: 0
  5894. tx_packets: 9
  5895. memory_stats:
  5896. stats:
  5897. total_pgmajfault: 0
  5898. cache: 0
  5899. mapped_file: 0
  5900. total_inactive_file: 0
  5901. pgpgout: 414
  5902. rss: 6537216
  5903. total_mapped_file: 0
  5904. writeback: 0
  5905. unevictable: 0
  5906. pgpgin: 477
  5907. total_unevictable: 0
  5908. pgmajfault: 0
  5909. total_rss: 6537216
  5910. total_rss_huge: 6291456
  5911. total_writeback: 0
  5912. total_inactive_anon: 0
  5913. rss_huge: 6291456
  5914. hierarchical_memory_limit: 67108864
  5915. total_pgfault: 964
  5916. total_active_file: 0
  5917. active_anon: 6537216
  5918. total_active_anon: 6537216
  5919. total_pgpgout: 414
  5920. total_cache: 0
  5921. inactive_anon: 0
  5922. active_file: 0
  5923. pgfault: 964
  5924. inactive_file: 0
  5925. total_pgpgin: 477
  5926. max_usage: 6651904
  5927. usage: 6537216
  5928. failcnt: 0
  5929. limit: 67108864
  5930. blkio_stats: {}
  5931. cpu_stats:
  5932. cpu_usage:
  5933. percpu_usage:
  5934. - 8646879
  5935. - 24472255
  5936. - 36438778
  5937. - 30657443
  5938. usage_in_usermode: 50000000
  5939. total_usage: 100215355
  5940. usage_in_kernelmode: 30000000
  5941. system_cpu_usage: 739306590000000
  5942. online_cpus: 4
  5943. throttling_data:
  5944. periods: 0
  5945. throttled_periods: 0
  5946. throttled_time: 0
  5947. precpu_stats:
  5948. cpu_usage:
  5949. percpu_usage:
  5950. - 8646879
  5951. - 24350896
  5952. - 36438778
  5953. - 30657443
  5954. usage_in_usermode: 50000000
  5955. total_usage: 100093996
  5956. usage_in_kernelmode: 30000000
  5957. system_cpu_usage: 9492140000000
  5958. online_cpus: 4
  5959. throttling_data:
  5960. periods: 0
  5961. throttled_periods: 0
  5962. throttled_time: 0
  5963. 404:
  5964. description: "no such container"
  5965. schema:
  5966. $ref: "#/definitions/ErrorResponse"
  5967. examples:
  5968. application/json:
  5969. message: "No such container: c2ada9df5af8"
  5970. 500:
  5971. description: "server error"
  5972. schema:
  5973. $ref: "#/definitions/ErrorResponse"
  5974. parameters:
  5975. - name: "id"
  5976. in: "path"
  5977. required: true
  5978. description: "ID or name of the container"
  5979. type: "string"
  5980. - name: "stream"
  5981. in: "query"
  5982. description: |
  5983. Stream the output. If false, the stats will be output once and then
  5984. it will disconnect.
  5985. type: "boolean"
  5986. default: true
  5987. - name: "one-shot"
  5988. in: "query"
  5989. description: |
  5990. Only get a single stat instead of waiting for 2 cycles. Must be used
  5991. with `stream=false`.
  5992. type: "boolean"
  5993. default: false
  5994. tags: ["Container"]
  5995. /containers/{id}/resize:
  5996. post:
  5997. summary: "Resize a container TTY"
  5998. description: "Resize the TTY for a container."
  5999. operationId: "ContainerResize"
  6000. consumes:
  6001. - "application/octet-stream"
  6002. produces:
  6003. - "text/plain"
  6004. responses:
  6005. 200:
  6006. description: "no error"
  6007. 404:
  6008. description: "no such container"
  6009. schema:
  6010. $ref: "#/definitions/ErrorResponse"
  6011. examples:
  6012. application/json:
  6013. message: "No such container: c2ada9df5af8"
  6014. 500:
  6015. description: "cannot resize container"
  6016. schema:
  6017. $ref: "#/definitions/ErrorResponse"
  6018. parameters:
  6019. - name: "id"
  6020. in: "path"
  6021. required: true
  6022. description: "ID or name of the container"
  6023. type: "string"
  6024. - name: "h"
  6025. in: "query"
  6026. description: "Height of the TTY session in characters"
  6027. type: "integer"
  6028. - name: "w"
  6029. in: "query"
  6030. description: "Width of the TTY session in characters"
  6031. type: "integer"
  6032. tags: ["Container"]
  6033. /containers/{id}/start:
  6034. post:
  6035. summary: "Start a container"
  6036. operationId: "ContainerStart"
  6037. responses:
  6038. 204:
  6039. description: "no error"
  6040. 304:
  6041. description: "container already started"
  6042. 404:
  6043. description: "no such container"
  6044. schema:
  6045. $ref: "#/definitions/ErrorResponse"
  6046. examples:
  6047. application/json:
  6048. message: "No such container: c2ada9df5af8"
  6049. 500:
  6050. description: "server error"
  6051. schema:
  6052. $ref: "#/definitions/ErrorResponse"
  6053. parameters:
  6054. - name: "id"
  6055. in: "path"
  6056. required: true
  6057. description: "ID or name of the container"
  6058. type: "string"
  6059. - name: "detachKeys"
  6060. in: "query"
  6061. description: |
  6062. Override the key sequence for detaching a container. Format is a
  6063. single character `[a-Z]` or `ctrl-<value>` where `<value>` is one
  6064. of: `a-z`, `@`, `^`, `[`, `,` or `_`.
  6065. type: "string"
  6066. tags: ["Container"]
  6067. /containers/{id}/stop:
  6068. post:
  6069. summary: "Stop a container"
  6070. operationId: "ContainerStop"
  6071. responses:
  6072. 204:
  6073. description: "no error"
  6074. 304:
  6075. description: "container already stopped"
  6076. 404:
  6077. description: "no such container"
  6078. schema:
  6079. $ref: "#/definitions/ErrorResponse"
  6080. examples:
  6081. application/json:
  6082. message: "No such container: c2ada9df5af8"
  6083. 500:
  6084. description: "server error"
  6085. schema:
  6086. $ref: "#/definitions/ErrorResponse"
  6087. parameters:
  6088. - name: "id"
  6089. in: "path"
  6090. required: true
  6091. description: "ID or name of the container"
  6092. type: "string"
  6093. - name: "t"
  6094. in: "query"
  6095. description: "Number of seconds to wait before killing the container"
  6096. type: "integer"
  6097. tags: ["Container"]
  6098. /containers/{id}/restart:
  6099. post:
  6100. summary: "Restart a container"
  6101. operationId: "ContainerRestart"
  6102. responses:
  6103. 204:
  6104. description: "no error"
  6105. 404:
  6106. description: "no such container"
  6107. schema:
  6108. $ref: "#/definitions/ErrorResponse"
  6109. examples:
  6110. application/json:
  6111. message: "No such container: c2ada9df5af8"
  6112. 500:
  6113. description: "server error"
  6114. schema:
  6115. $ref: "#/definitions/ErrorResponse"
  6116. parameters:
  6117. - name: "id"
  6118. in: "path"
  6119. required: true
  6120. description: "ID or name of the container"
  6121. type: "string"
  6122. - name: "t"
  6123. in: "query"
  6124. description: "Number of seconds to wait before killing the container"
  6125. type: "integer"
  6126. tags: ["Container"]
  6127. /containers/{id}/kill:
  6128. post:
  6129. summary: "Kill a container"
  6130. description: |
  6131. Send a POSIX signal to a container, defaulting to killing to the
  6132. container.
  6133. operationId: "ContainerKill"
  6134. responses:
  6135. 204:
  6136. description: "no error"
  6137. 404:
  6138. description: "no such container"
  6139. schema:
  6140. $ref: "#/definitions/ErrorResponse"
  6141. examples:
  6142. application/json:
  6143. message: "No such container: c2ada9df5af8"
  6144. 409:
  6145. description: "container is not running"
  6146. schema:
  6147. $ref: "#/definitions/ErrorResponse"
  6148. examples:
  6149. application/json:
  6150. message: "Container d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 is not running"
  6151. 500:
  6152. description: "server error"
  6153. schema:
  6154. $ref: "#/definitions/ErrorResponse"
  6155. parameters:
  6156. - name: "id"
  6157. in: "path"
  6158. required: true
  6159. description: "ID or name of the container"
  6160. type: "string"
  6161. - name: "signal"
  6162. in: "query"
  6163. description: "Signal to send to the container as an integer or string (e.g. `SIGINT`)"
  6164. type: "string"
  6165. default: "SIGKILL"
  6166. tags: ["Container"]
  6167. /containers/{id}/update:
  6168. post:
  6169. summary: "Update a container"
  6170. description: |
  6171. Change various configuration options of a container without having to
  6172. recreate it.
  6173. operationId: "ContainerUpdate"
  6174. consumes: ["application/json"]
  6175. produces: ["application/json"]
  6176. responses:
  6177. 200:
  6178. description: "The container has been updated."
  6179. schema:
  6180. type: "object"
  6181. title: "ContainerUpdateResponse"
  6182. description: "OK response to ContainerUpdate operation"
  6183. properties:
  6184. Warnings:
  6185. type: "array"
  6186. items:
  6187. type: "string"
  6188. 404:
  6189. description: "no such container"
  6190. schema:
  6191. $ref: "#/definitions/ErrorResponse"
  6192. examples:
  6193. application/json:
  6194. message: "No such container: c2ada9df5af8"
  6195. 500:
  6196. description: "server error"
  6197. schema:
  6198. $ref: "#/definitions/ErrorResponse"
  6199. parameters:
  6200. - name: "id"
  6201. in: "path"
  6202. required: true
  6203. description: "ID or name of the container"
  6204. type: "string"
  6205. - name: "update"
  6206. in: "body"
  6207. required: true
  6208. schema:
  6209. allOf:
  6210. - $ref: "#/definitions/Resources"
  6211. - type: "object"
  6212. properties:
  6213. RestartPolicy:
  6214. $ref: "#/definitions/RestartPolicy"
  6215. example:
  6216. BlkioWeight: 300
  6217. CpuShares: 512
  6218. CpuPeriod: 100000
  6219. CpuQuota: 50000
  6220. CpuRealtimePeriod: 1000000
  6221. CpuRealtimeRuntime: 10000
  6222. CpusetCpus: "0,1"
  6223. CpusetMems: "0"
  6224. Memory: 314572800
  6225. MemorySwap: 514288000
  6226. MemoryReservation: 209715200
  6227. KernelMemory: 52428800
  6228. RestartPolicy:
  6229. MaximumRetryCount: 4
  6230. Name: "on-failure"
  6231. tags: ["Container"]
  6232. /containers/{id}/rename:
  6233. post:
  6234. summary: "Rename a container"
  6235. operationId: "ContainerRename"
  6236. responses:
  6237. 204:
  6238. description: "no error"
  6239. 404:
  6240. description: "no such container"
  6241. schema:
  6242. $ref: "#/definitions/ErrorResponse"
  6243. examples:
  6244. application/json:
  6245. message: "No such container: c2ada9df5af8"
  6246. 409:
  6247. description: "name already in use"
  6248. schema:
  6249. $ref: "#/definitions/ErrorResponse"
  6250. 500:
  6251. description: "server error"
  6252. schema:
  6253. $ref: "#/definitions/ErrorResponse"
  6254. parameters:
  6255. - name: "id"
  6256. in: "path"
  6257. required: true
  6258. description: "ID or name of the container"
  6259. type: "string"
  6260. - name: "name"
  6261. in: "query"
  6262. required: true
  6263. description: "New name for the container"
  6264. type: "string"
  6265. tags: ["Container"]
  6266. /containers/{id}/pause:
  6267. post:
  6268. summary: "Pause a container"
  6269. description: |
  6270. Use the freezer cgroup to suspend all processes in a container.
  6271. Traditionally, when suspending a process the `SIGSTOP` signal is used,
  6272. which is observable by the process being suspended. With the freezer
  6273. cgroup the process is unaware, and unable to capture, that it is being
  6274. suspended, and subsequently resumed.
  6275. operationId: "ContainerPause"
  6276. responses:
  6277. 204:
  6278. description: "no error"
  6279. 404:
  6280. description: "no such container"
  6281. schema:
  6282. $ref: "#/definitions/ErrorResponse"
  6283. examples:
  6284. application/json:
  6285. message: "No such container: c2ada9df5af8"
  6286. 500:
  6287. description: "server error"
  6288. schema:
  6289. $ref: "#/definitions/ErrorResponse"
  6290. parameters:
  6291. - name: "id"
  6292. in: "path"
  6293. required: true
  6294. description: "ID or name of the container"
  6295. type: "string"
  6296. tags: ["Container"]
  6297. /containers/{id}/unpause:
  6298. post:
  6299. summary: "Unpause a container"
  6300. description: "Resume a container which has been paused."
  6301. operationId: "ContainerUnpause"
  6302. responses:
  6303. 204:
  6304. description: "no error"
  6305. 404:
  6306. description: "no such container"
  6307. schema:
  6308. $ref: "#/definitions/ErrorResponse"
  6309. examples:
  6310. application/json:
  6311. message: "No such container: c2ada9df5af8"
  6312. 500:
  6313. description: "server error"
  6314. schema:
  6315. $ref: "#/definitions/ErrorResponse"
  6316. parameters:
  6317. - name: "id"
  6318. in: "path"
  6319. required: true
  6320. description: "ID or name of the container"
  6321. type: "string"
  6322. tags: ["Container"]
  6323. /containers/{id}/attach:
  6324. post:
  6325. summary: "Attach to a container"
  6326. description: |
  6327. Attach to a container to read its output or send it input. You can attach
  6328. to the same container multiple times and you can reattach to containers
  6329. that have been detached.
  6330. Either the `stream` or `logs` parameter must be `true` for this endpoint
  6331. to do anything.
  6332. See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/)
  6333. for more details.
  6334. ### Hijacking
  6335. This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`,
  6336. and `stderr` on the same socket.
  6337. This is the response from the daemon for an attach request:
  6338. ```
  6339. HTTP/1.1 200 OK
  6340. Content-Type: application/vnd.docker.raw-stream
  6341. [STREAM]
  6342. ```
  6343. After the headers and two new lines, the TCP connection can now be used
  6344. for raw, bidirectional communication between the client and server.
  6345. To hint potential proxies about connection hijacking, the Docker client
  6346. can also optionally send connection upgrade headers.
  6347. For example, the client sends this request to upgrade the connection:
  6348. ```
  6349. POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1
  6350. Upgrade: tcp
  6351. Connection: Upgrade
  6352. ```
  6353. The Docker daemon will respond with a `101 UPGRADED` response, and will
  6354. similarly follow with the raw stream:
  6355. ```
  6356. HTTP/1.1 101 UPGRADED
  6357. Content-Type: application/vnd.docker.raw-stream
  6358. Connection: Upgrade
  6359. Upgrade: tcp
  6360. [STREAM]
  6361. ```
  6362. ### Stream format
  6363. When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate),
  6364. the stream over the hijacked connected is multiplexed to separate out
  6365. `stdout` and `stderr`. The stream consists of a series of frames, each
  6366. containing a header and a payload.
  6367. The header contains the information which the stream writes (`stdout` or
  6368. `stderr`). It also contains the size of the associated frame encoded in
  6369. the last four bytes (`uint32`).
  6370. It is encoded on the first eight bytes like this:
  6371. ```go
  6372. header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}
  6373. ```
  6374. `STREAM_TYPE` can be:
  6375. - 0: `stdin` (is written on `stdout`)
  6376. - 1: `stdout`
  6377. - 2: `stderr`
  6378. `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size
  6379. encoded as big endian.
  6380. Following the header is the payload, which is the specified number of
  6381. bytes of `STREAM_TYPE`.
  6382. The simplest way to implement this protocol is the following:
  6383. 1. Read 8 bytes.
  6384. 2. Choose `stdout` or `stderr` depending on the first byte.
  6385. 3. Extract the frame size from the last four bytes.
  6386. 4. Read the extracted size and output it on the correct output.
  6387. 5. Goto 1.
  6388. ### Stream format when using a TTY
  6389. When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate),
  6390. the stream is not multiplexed. The data exchanged over the hijacked
  6391. connection is simply the raw data from the process PTY and client's
  6392. `stdin`.
  6393. operationId: "ContainerAttach"
  6394. produces:
  6395. - "application/vnd.docker.raw-stream"
  6396. responses:
  6397. 101:
  6398. description: "no error, hints proxy about hijacking"
  6399. 200:
  6400. description: "no error, no upgrade header found"
  6401. 400:
  6402. description: "bad parameter"
  6403. schema:
  6404. $ref: "#/definitions/ErrorResponse"
  6405. 404:
  6406. description: "no such container"
  6407. schema:
  6408. $ref: "#/definitions/ErrorResponse"
  6409. examples:
  6410. application/json:
  6411. message: "No such container: c2ada9df5af8"
  6412. 500:
  6413. description: "server error"
  6414. schema:
  6415. $ref: "#/definitions/ErrorResponse"
  6416. parameters:
  6417. - name: "id"
  6418. in: "path"
  6419. required: true
  6420. description: "ID or name of the container"
  6421. type: "string"
  6422. - name: "detachKeys"
  6423. in: "query"
  6424. description: |
  6425. Override the key sequence for detaching a container.Format is a single
  6426. character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`,
  6427. `@`, `^`, `[`, `,` or `_`.
  6428. type: "string"
  6429. - name: "logs"
  6430. in: "query"
  6431. description: |
  6432. Replay previous logs from the container.
  6433. This is useful for attaching to a container that has started and you
  6434. want to output everything since the container started.
  6435. If `stream` is also enabled, once all the previous output has been
  6436. returned, it will seamlessly transition into streaming current
  6437. output.
  6438. type: "boolean"
  6439. default: false
  6440. - name: "stream"
  6441. in: "query"
  6442. description: |
  6443. Stream attached streams from the time the request was made onwards.
  6444. type: "boolean"
  6445. default: false
  6446. - name: "stdin"
  6447. in: "query"
  6448. description: "Attach to `stdin`"
  6449. type: "boolean"
  6450. default: false
  6451. - name: "stdout"
  6452. in: "query"
  6453. description: "Attach to `stdout`"
  6454. type: "boolean"
  6455. default: false
  6456. - name: "stderr"
  6457. in: "query"
  6458. description: "Attach to `stderr`"
  6459. type: "boolean"
  6460. default: false
  6461. tags: ["Container"]
  6462. /containers/{id}/attach/ws:
  6463. get:
  6464. summary: "Attach to a container via a websocket"
  6465. operationId: "ContainerAttachWebsocket"
  6466. responses:
  6467. 101:
  6468. description: "no error, hints proxy about hijacking"
  6469. 200:
  6470. description: "no error, no upgrade header found"
  6471. 400:
  6472. description: "bad parameter"
  6473. schema:
  6474. $ref: "#/definitions/ErrorResponse"
  6475. 404:
  6476. description: "no such container"
  6477. schema:
  6478. $ref: "#/definitions/ErrorResponse"
  6479. examples:
  6480. application/json:
  6481. message: "No such container: c2ada9df5af8"
  6482. 500:
  6483. description: "server error"
  6484. schema:
  6485. $ref: "#/definitions/ErrorResponse"
  6486. parameters:
  6487. - name: "id"
  6488. in: "path"
  6489. required: true
  6490. description: "ID or name of the container"
  6491. type: "string"
  6492. - name: "detachKeys"
  6493. in: "query"
  6494. description: |
  6495. Override the key sequence for detaching a container.Format is a single
  6496. character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`,
  6497. `@`, `^`, `[`, `,`, or `_`.
  6498. type: "string"
  6499. - name: "logs"
  6500. in: "query"
  6501. description: "Return logs"
  6502. type: "boolean"
  6503. default: false
  6504. - name: "stream"
  6505. in: "query"
  6506. description: "Return stream"
  6507. type: "boolean"
  6508. default: false
  6509. - name: "stdin"
  6510. in: "query"
  6511. description: "Attach to `stdin`"
  6512. type: "boolean"
  6513. default: false
  6514. - name: "stdout"
  6515. in: "query"
  6516. description: "Attach to `stdout`"
  6517. type: "boolean"
  6518. default: false
  6519. - name: "stderr"
  6520. in: "query"
  6521. description: "Attach to `stderr`"
  6522. type: "boolean"
  6523. default: false
  6524. tags: ["Container"]
  6525. /containers/{id}/wait:
  6526. post:
  6527. summary: "Wait for a container"
  6528. description: "Block until a container stops, then returns the exit code."
  6529. operationId: "ContainerWait"
  6530. produces: ["application/json"]
  6531. responses:
  6532. 200:
  6533. description: "The container has exit."
  6534. schema:
  6535. type: "object"
  6536. title: "ContainerWaitResponse"
  6537. description: "OK response to ContainerWait operation"
  6538. required: [StatusCode]
  6539. properties:
  6540. StatusCode:
  6541. description: "Exit code of the container"
  6542. type: "integer"
  6543. x-nullable: false
  6544. Error:
  6545. description: "container waiting error, if any"
  6546. type: "object"
  6547. properties:
  6548. Message:
  6549. description: "Details of an error"
  6550. type: "string"
  6551. 404:
  6552. description: "no such container"
  6553. schema:
  6554. $ref: "#/definitions/ErrorResponse"
  6555. examples:
  6556. application/json:
  6557. message: "No such container: c2ada9df5af8"
  6558. 500:
  6559. description: "server error"
  6560. schema:
  6561. $ref: "#/definitions/ErrorResponse"
  6562. parameters:
  6563. - name: "id"
  6564. in: "path"
  6565. required: true
  6566. description: "ID or name of the container"
  6567. type: "string"
  6568. - name: "condition"
  6569. in: "query"
  6570. description: |
  6571. Wait until a container state reaches the given condition, either
  6572. 'not-running' (default), 'next-exit', or 'removed'.
  6573. type: "string"
  6574. default: "not-running"
  6575. tags: ["Container"]
  6576. /containers/{id}:
  6577. delete:
  6578. summary: "Remove a container"
  6579. operationId: "ContainerDelete"
  6580. responses:
  6581. 204:
  6582. description: "no error"
  6583. 400:
  6584. description: "bad parameter"
  6585. schema:
  6586. $ref: "#/definitions/ErrorResponse"
  6587. 404:
  6588. description: "no such container"
  6589. schema:
  6590. $ref: "#/definitions/ErrorResponse"
  6591. examples:
  6592. application/json:
  6593. message: "No such container: c2ada9df5af8"
  6594. 409:
  6595. description: "conflict"
  6596. schema:
  6597. $ref: "#/definitions/ErrorResponse"
  6598. examples:
  6599. application/json:
  6600. message: |
  6601. You cannot remove a running container: c2ada9df5af8. Stop the
  6602. container before attempting removal or force remove
  6603. 500:
  6604. description: "server error"
  6605. schema:
  6606. $ref: "#/definitions/ErrorResponse"
  6607. parameters:
  6608. - name: "id"
  6609. in: "path"
  6610. required: true
  6611. description: "ID or name of the container"
  6612. type: "string"
  6613. - name: "v"
  6614. in: "query"
  6615. description: "Remove anonymous volumes associated with the container."
  6616. type: "boolean"
  6617. default: false
  6618. - name: "force"
  6619. in: "query"
  6620. description: "If the container is running, kill it before removing it."
  6621. type: "boolean"
  6622. default: false
  6623. - name: "link"
  6624. in: "query"
  6625. description: "Remove the specified link associated with the container."
  6626. type: "boolean"
  6627. default: false
  6628. tags: ["Container"]
  6629. /containers/{id}/archive:
  6630. head:
  6631. summary: "Get information about files in a container"
  6632. description: |
  6633. A response header `X-Docker-Container-Path-Stat` is returned, containing
  6634. a base64 - encoded JSON object with some filesystem header information
  6635. about the path.
  6636. operationId: "ContainerArchiveInfo"
  6637. responses:
  6638. 200:
  6639. description: "no error"
  6640. headers:
  6641. X-Docker-Container-Path-Stat:
  6642. type: "string"
  6643. description: |
  6644. A base64 - encoded JSON object with some filesystem header
  6645. information about the path
  6646. 400:
  6647. description: "Bad parameter"
  6648. schema:
  6649. allOf:
  6650. - $ref: "#/definitions/ErrorResponse"
  6651. - type: "object"
  6652. properties:
  6653. message:
  6654. description: |
  6655. The error message. Either "must specify path parameter"
  6656. (path cannot be empty) or "not a directory" (path was
  6657. asserted to be a directory but exists as a file).
  6658. type: "string"
  6659. x-nullable: false
  6660. 404:
  6661. description: "Container or path does not exist"
  6662. schema:
  6663. $ref: "#/definitions/ErrorResponse"
  6664. examples:
  6665. application/json:
  6666. message: "No such container: c2ada9df5af8"
  6667. 500:
  6668. description: "Server error"
  6669. schema:
  6670. $ref: "#/definitions/ErrorResponse"
  6671. parameters:
  6672. - name: "id"
  6673. in: "path"
  6674. required: true
  6675. description: "ID or name of the container"
  6676. type: "string"
  6677. - name: "path"
  6678. in: "query"
  6679. required: true
  6680. description: "Resource in the container’s filesystem to archive."
  6681. type: "string"
  6682. tags: ["Container"]
  6683. get:
  6684. summary: "Get an archive of a filesystem resource in a container"
  6685. description: "Get a tar archive of a resource in the filesystem of container id."
  6686. operationId: "ContainerArchive"
  6687. produces: ["application/x-tar"]
  6688. responses:
  6689. 200:
  6690. description: "no error"
  6691. 400:
  6692. description: "Bad parameter"
  6693. schema:
  6694. allOf:
  6695. - $ref: "#/definitions/ErrorResponse"
  6696. - type: "object"
  6697. properties:
  6698. message:
  6699. description: |
  6700. The error message. Either "must specify path parameter"
  6701. (path cannot be empty) or "not a directory" (path was
  6702. asserted to be a directory but exists as a file).
  6703. type: "string"
  6704. x-nullable: false
  6705. 404:
  6706. description: "Container or path does not exist"
  6707. schema:
  6708. $ref: "#/definitions/ErrorResponse"
  6709. examples:
  6710. application/json:
  6711. message: "No such container: c2ada9df5af8"
  6712. 500:
  6713. description: "server error"
  6714. schema:
  6715. $ref: "#/definitions/ErrorResponse"
  6716. parameters:
  6717. - name: "id"
  6718. in: "path"
  6719. required: true
  6720. description: "ID or name of the container"
  6721. type: "string"
  6722. - name: "path"
  6723. in: "query"
  6724. required: true
  6725. description: "Resource in the container’s filesystem to archive."
  6726. type: "string"
  6727. tags: ["Container"]
  6728. put:
  6729. summary: "Extract an archive of files or folders to a directory in a container"
  6730. description: "Upload a tar archive to be extracted to a path in the filesystem of container id."
  6731. operationId: "PutContainerArchive"
  6732. consumes: ["application/x-tar", "application/octet-stream"]
  6733. responses:
  6734. 200:
  6735. description: "The content was extracted successfully"
  6736. 400:
  6737. description: "Bad parameter"
  6738. schema:
  6739. $ref: "#/definitions/ErrorResponse"
  6740. 403:
  6741. description: "Permission denied, the volume or container rootfs is marked as read-only."
  6742. schema:
  6743. $ref: "#/definitions/ErrorResponse"
  6744. 404:
  6745. description: "No such container or path does not exist inside the container"
  6746. schema:
  6747. $ref: "#/definitions/ErrorResponse"
  6748. examples:
  6749. application/json:
  6750. message: "No such container: c2ada9df5af8"
  6751. 500:
  6752. description: "Server error"
  6753. schema:
  6754. $ref: "#/definitions/ErrorResponse"
  6755. parameters:
  6756. - name: "id"
  6757. in: "path"
  6758. required: true
  6759. description: "ID or name of the container"
  6760. type: "string"
  6761. - name: "path"
  6762. in: "query"
  6763. required: true
  6764. description: "Path to a directory in the container to extract the archive’s contents into. "
  6765. type: "string"
  6766. - name: "noOverwriteDirNonDir"
  6767. in: "query"
  6768. description: |
  6769. If `1`, `true`, or `True` then it will be an error if unpacking the
  6770. given content would cause an existing directory to be replaced with
  6771. a non-directory and vice versa.
  6772. type: "string"
  6773. - name: "copyUIDGID"
  6774. in: "query"
  6775. description: |
  6776. If `1`, `true`, then it will copy UID/GID maps to the dest file or
  6777. dir
  6778. type: "string"
  6779. - name: "inputStream"
  6780. in: "body"
  6781. required: true
  6782. description: |
  6783. The input stream must be a tar archive compressed with one of the
  6784. following algorithms: `identity` (no compression), `gzip`, `bzip2`,
  6785. or `xz`.
  6786. schema:
  6787. type: "string"
  6788. format: "binary"
  6789. tags: ["Container"]
  6790. /containers/prune:
  6791. post:
  6792. summary: "Delete stopped containers"
  6793. produces:
  6794. - "application/json"
  6795. operationId: "ContainerPrune"
  6796. parameters:
  6797. - name: "filters"
  6798. in: "query"
  6799. description: |
  6800. Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  6801. Available filters:
  6802. - `until=<timestamp>` Prune containers created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time.
  6803. - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune containers with (or without, in case `label!=...` is used) the specified labels.
  6804. type: "string"
  6805. responses:
  6806. 200:
  6807. description: "No error"
  6808. schema:
  6809. type: "object"
  6810. title: "ContainerPruneResponse"
  6811. properties:
  6812. ContainersDeleted:
  6813. description: "Container IDs that were deleted"
  6814. type: "array"
  6815. items:
  6816. type: "string"
  6817. SpaceReclaimed:
  6818. description: "Disk space reclaimed in bytes"
  6819. type: "integer"
  6820. format: "int64"
  6821. 500:
  6822. description: "Server error"
  6823. schema:
  6824. $ref: "#/definitions/ErrorResponse"
  6825. tags: ["Container"]
  6826. /images/json:
  6827. get:
  6828. summary: "List Images"
  6829. description: "Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image."
  6830. operationId: "ImageList"
  6831. produces:
  6832. - "application/json"
  6833. responses:
  6834. 200:
  6835. description: "Summary image data for the images matching the query"
  6836. schema:
  6837. type: "array"
  6838. items:
  6839. $ref: "#/definitions/ImageSummary"
  6840. examples:
  6841. application/json:
  6842. - Id: "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8"
  6843. ParentId: ""
  6844. RepoTags:
  6845. - "ubuntu:12.04"
  6846. - "ubuntu:precise"
  6847. RepoDigests:
  6848. - "ubuntu@sha256:992069aee4016783df6345315302fa59681aae51a8eeb2f889dea59290f21787"
  6849. Created: 1474925151
  6850. Size: 103579269
  6851. VirtualSize: 103579269
  6852. SharedSize: 0
  6853. Labels: {}
  6854. Containers: 2
  6855. - Id: "sha256:3e314f95dcace0f5e4fd37b10862fe8398e3c60ed36600bc0ca5fda78b087175"
  6856. ParentId: ""
  6857. RepoTags:
  6858. - "ubuntu:12.10"
  6859. - "ubuntu:quantal"
  6860. RepoDigests:
  6861. - "ubuntu@sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7"
  6862. - "ubuntu@sha256:68ea0200f0b90df725d99d823905b04cf844f6039ef60c60bf3e019915017bd3"
  6863. Created: 1403128455
  6864. Size: 172064416
  6865. VirtualSize: 172064416
  6866. SharedSize: 0
  6867. Labels: {}
  6868. Containers: 5
  6869. 500:
  6870. description: "server error"
  6871. schema:
  6872. $ref: "#/definitions/ErrorResponse"
  6873. parameters:
  6874. - name: "all"
  6875. in: "query"
  6876. description: "Show all images. Only images from a final layer (no children) are shown by default."
  6877. type: "boolean"
  6878. default: false
  6879. - name: "filters"
  6880. in: "query"
  6881. description: |
  6882. A JSON encoded value of the filters (a `map[string][]string`) to
  6883. process on the images list.
  6884. Available filters:
  6885. - `before`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)
  6886. - `dangling=true`
  6887. - `label=key` or `label="key=value"` of an image label
  6888. - `reference`=(`<image-name>[:<tag>]`)
  6889. - `since`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)
  6890. type: "string"
  6891. - name: "digests"
  6892. in: "query"
  6893. description: "Show digest information as a `RepoDigests` field on each image."
  6894. type: "boolean"
  6895. default: false
  6896. tags: ["Image"]
  6897. /build:
  6898. post:
  6899. summary: "Build an image"
  6900. description: |
  6901. Build an image from a tar archive with a `Dockerfile` in it.
  6902. The `Dockerfile` specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the `dockerfile` parameter. [See the `Dockerfile` reference for more information](https://docs.docker.com/engine/reference/builder/).
  6903. The Docker daemon performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output.
  6904. The build is canceled if the client drops the connection by quitting or being killed.
  6905. operationId: "ImageBuild"
  6906. consumes:
  6907. - "application/octet-stream"
  6908. produces:
  6909. - "application/json"
  6910. parameters:
  6911. - name: "inputStream"
  6912. in: "body"
  6913. description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz."
  6914. schema:
  6915. type: "string"
  6916. format: "binary"
  6917. - name: "dockerfile"
  6918. in: "query"
  6919. description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`."
  6920. type: "string"
  6921. default: "Dockerfile"
  6922. - name: "t"
  6923. in: "query"
  6924. description: "A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default `latest` value is assumed. You can provide several `t` parameters."
  6925. type: "string"
  6926. - name: "extrahosts"
  6927. in: "query"
  6928. description: "Extra hosts to add to /etc/hosts"
  6929. type: "string"
  6930. - name: "remote"
  6931. in: "query"
  6932. description: "A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called `Dockerfile` and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball."
  6933. type: "string"
  6934. - name: "q"
  6935. in: "query"
  6936. description: "Suppress verbose build output."
  6937. type: "boolean"
  6938. default: false
  6939. - name: "nocache"
  6940. in: "query"
  6941. description: "Do not use the cache when building the image."
  6942. type: "boolean"
  6943. default: false
  6944. - name: "cachefrom"
  6945. in: "query"
  6946. description: "JSON array of images used for build cache resolution."
  6947. type: "string"
  6948. - name: "pull"
  6949. in: "query"
  6950. description: "Attempt to pull the image even if an older image exists locally."
  6951. type: "string"
  6952. - name: "rm"
  6953. in: "query"
  6954. description: "Remove intermediate containers after a successful build."
  6955. type: "boolean"
  6956. default: true
  6957. - name: "forcerm"
  6958. in: "query"
  6959. description: "Always remove intermediate containers, even upon failure."
  6960. type: "boolean"
  6961. default: false
  6962. - name: "memory"
  6963. in: "query"
  6964. description: "Set memory limit for build."
  6965. type: "integer"
  6966. - name: "memswap"
  6967. in: "query"
  6968. description: "Total memory (memory + swap). Set as `-1` to disable swap."
  6969. type: "integer"
  6970. - name: "cpushares"
  6971. in: "query"
  6972. description: "CPU shares (relative weight)."
  6973. type: "integer"
  6974. - name: "cpusetcpus"
  6975. in: "query"
  6976. description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)."
  6977. type: "string"
  6978. - name: "cpuperiod"
  6979. in: "query"
  6980. description: "The length of a CPU period in microseconds."
  6981. type: "integer"
  6982. - name: "cpuquota"
  6983. in: "query"
  6984. description: "Microseconds of CPU time that the container can get in a CPU period."
  6985. type: "integer"
  6986. - name: "buildargs"
  6987. in: "query"
  6988. description: >
  6989. JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker
  6990. uses the buildargs as the environment context for commands run via the `Dockerfile` RUN
  6991. instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for
  6992. passing secret values.
  6993. For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the
  6994. query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded.
  6995. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)
  6996. type: "string"
  6997. - name: "shmsize"
  6998. in: "query"
  6999. description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB."
  7000. type: "integer"
  7001. - name: "squash"
  7002. in: "query"
  7003. description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*"
  7004. type: "boolean"
  7005. - name: "labels"
  7006. in: "query"
  7007. description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs."
  7008. type: "string"
  7009. - name: "networkmode"
  7010. in: "query"
  7011. description: |
  7012. Sets the networking mode for the run commands during build. Supported
  7013. standard values are: `bridge`, `host`, `none`, and `container:<name|id>`.
  7014. Any other value is taken as a custom network's name or ID to which this
  7015. container should connect to.
  7016. type: "string"
  7017. - name: "Content-type"
  7018. in: "header"
  7019. type: "string"
  7020. enum:
  7021. - "application/x-tar"
  7022. default: "application/x-tar"
  7023. - name: "X-Registry-Config"
  7024. in: "header"
  7025. description: |
  7026. This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to.
  7027. The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example:
  7028. ```
  7029. {
  7030. "docker.example.com": {
  7031. "username": "janedoe",
  7032. "password": "hunter2"
  7033. },
  7034. "https://index.docker.io/v1/": {
  7035. "username": "mobydock",
  7036. "password": "conta1n3rize14"
  7037. }
  7038. }
  7039. ```
  7040. Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a `https://` prefix and a `/v1/` suffix even though Docker will prefer to use the v2 registry API.
  7041. type: "string"
  7042. - name: "platform"
  7043. in: "query"
  7044. description: "Platform in the format os[/arch[/variant]]"
  7045. type: "string"
  7046. default: ""
  7047. - name: "target"
  7048. in: "query"
  7049. description: "Target build stage"
  7050. type: "string"
  7051. default: ""
  7052. - name: "outputs"
  7053. in: "query"
  7054. description: "BuildKit output configuration"
  7055. type: "string"
  7056. default: ""
  7057. responses:
  7058. 200:
  7059. description: "no error"
  7060. 400:
  7061. description: "Bad parameter"
  7062. schema:
  7063. $ref: "#/definitions/ErrorResponse"
  7064. 500:
  7065. description: "server error"
  7066. schema:
  7067. $ref: "#/definitions/ErrorResponse"
  7068. tags: ["Image"]
  7069. /build/prune:
  7070. post:
  7071. summary: "Delete builder cache"
  7072. produces:
  7073. - "application/json"
  7074. operationId: "BuildPrune"
  7075. parameters:
  7076. - name: "keep-storage"
  7077. in: "query"
  7078. description: "Amount of disk space in bytes to keep for cache"
  7079. type: "integer"
  7080. format: "int64"
  7081. - name: "all"
  7082. in: "query"
  7083. type: "boolean"
  7084. description: "Remove all types of build cache"
  7085. - name: "filters"
  7086. in: "query"
  7087. type: "string"
  7088. description: |
  7089. A JSON encoded value of the filters (a `map[string][]string`) to
  7090. process on the list of build cache objects.
  7091. Available filters:
  7092. - `until=<duration>`: duration relative to daemon's time, during which build cache was not used, in Go's duration format (e.g., '24h')
  7093. - `id=<id>`
  7094. - `parent=<id>`
  7095. - `type=<string>`
  7096. - `description=<string>`
  7097. - `inuse`
  7098. - `shared`
  7099. - `private`
  7100. responses:
  7101. 200:
  7102. description: "No error"
  7103. schema:
  7104. type: "object"
  7105. title: "BuildPruneResponse"
  7106. properties:
  7107. CachesDeleted:
  7108. type: "array"
  7109. items:
  7110. description: "ID of build cache object"
  7111. type: "string"
  7112. SpaceReclaimed:
  7113. description: "Disk space reclaimed in bytes"
  7114. type: "integer"
  7115. format: "int64"
  7116. 500:
  7117. description: "Server error"
  7118. schema:
  7119. $ref: "#/definitions/ErrorResponse"
  7120. tags: ["Image"]
  7121. /images/create:
  7122. post:
  7123. summary: "Create an image"
  7124. description: "Create an image by either pulling it from a registry or importing it."
  7125. operationId: "ImageCreate"
  7126. consumes:
  7127. - "text/plain"
  7128. - "application/octet-stream"
  7129. produces:
  7130. - "application/json"
  7131. responses:
  7132. 200:
  7133. description: "no error"
  7134. 404:
  7135. description: "repository does not exist or no read access"
  7136. schema:
  7137. $ref: "#/definitions/ErrorResponse"
  7138. 500:
  7139. description: "server error"
  7140. schema:
  7141. $ref: "#/definitions/ErrorResponse"
  7142. parameters:
  7143. - name: "fromImage"
  7144. in: "query"
  7145. description: "Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed."
  7146. type: "string"
  7147. - name: "fromSrc"
  7148. in: "query"
  7149. description: "Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image."
  7150. type: "string"
  7151. - name: "repo"
  7152. in: "query"
  7153. description: "Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image."
  7154. type: "string"
  7155. - name: "tag"
  7156. in: "query"
  7157. description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled."
  7158. type: "string"
  7159. - name: "message"
  7160. in: "query"
  7161. description: "Set commit message for imported image."
  7162. type: "string"
  7163. - name: "inputImage"
  7164. in: "body"
  7165. description: "Image content if the value `-` has been specified in fromSrc query parameter"
  7166. schema:
  7167. type: "string"
  7168. required: false
  7169. - name: "X-Registry-Auth"
  7170. in: "header"
  7171. description: |
  7172. A base64url-encoded auth configuration.
  7173. Refer to the [authentication section](#section/Authentication) for
  7174. details.
  7175. type: "string"
  7176. - name: "platform"
  7177. in: "query"
  7178. description: "Platform in the format os[/arch[/variant]]"
  7179. type: "string"
  7180. default: ""
  7181. tags: ["Image"]
  7182. /images/{name}/json:
  7183. get:
  7184. summary: "Inspect an image"
  7185. description: "Return low-level information about an image."
  7186. operationId: "ImageInspect"
  7187. produces:
  7188. - "application/json"
  7189. responses:
  7190. 200:
  7191. description: "No error"
  7192. schema:
  7193. $ref: "#/definitions/Image"
  7194. examples:
  7195. application/json:
  7196. Id: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c"
  7197. Container: "cb91e48a60d01f1e27028b4fc6819f4f290b3cf12496c8176ec714d0d390984a"
  7198. Comment: ""
  7199. Os: "linux"
  7200. Architecture: "amd64"
  7201. Parent: "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
  7202. ContainerConfig:
  7203. Tty: false
  7204. Hostname: "e611e15f9c9d"
  7205. Domainname: ""
  7206. AttachStdout: false
  7207. PublishService: ""
  7208. AttachStdin: false
  7209. OpenStdin: false
  7210. StdinOnce: false
  7211. NetworkDisabled: false
  7212. OnBuild: []
  7213. Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
  7214. User: ""
  7215. WorkingDir: ""
  7216. MacAddress: ""
  7217. AttachStderr: false
  7218. Labels:
  7219. com.example.license: "GPL"
  7220. com.example.version: "1.0"
  7221. com.example.vendor: "Acme"
  7222. Env:
  7223. - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  7224. Cmd:
  7225. - "/bin/sh"
  7226. - "-c"
  7227. - "#(nop) LABEL com.example.vendor=Acme com.example.license=GPL com.example.version=1.0"
  7228. DockerVersion: "1.9.0-dev"
  7229. VirtualSize: 188359297
  7230. Size: 0
  7231. Author: ""
  7232. Created: "2015-09-10T08:30:53.26995814Z"
  7233. GraphDriver:
  7234. Name: "aufs"
  7235. Data: {}
  7236. RepoDigests:
  7237. - "localhost:5000/test/busybox/example@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf"
  7238. RepoTags:
  7239. - "example:1.0"
  7240. - "example:latest"
  7241. - "example:stable"
  7242. Config:
  7243. Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
  7244. NetworkDisabled: false
  7245. OnBuild: []
  7246. StdinOnce: false
  7247. PublishService: ""
  7248. AttachStdin: false
  7249. OpenStdin: false
  7250. Domainname: ""
  7251. AttachStdout: false
  7252. Tty: false
  7253. Hostname: "e611e15f9c9d"
  7254. Cmd:
  7255. - "/bin/bash"
  7256. Env:
  7257. - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  7258. Labels:
  7259. com.example.vendor: "Acme"
  7260. com.example.version: "1.0"
  7261. com.example.license: "GPL"
  7262. MacAddress: ""
  7263. AttachStderr: false
  7264. WorkingDir: ""
  7265. User: ""
  7266. RootFS:
  7267. Type: "layers"
  7268. Layers:
  7269. - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6"
  7270. - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
  7271. 404:
  7272. description: "No such image"
  7273. schema:
  7274. $ref: "#/definitions/ErrorResponse"
  7275. examples:
  7276. application/json:
  7277. message: "No such image: someimage (tag: latest)"
  7278. 500:
  7279. description: "Server error"
  7280. schema:
  7281. $ref: "#/definitions/ErrorResponse"
  7282. parameters:
  7283. - name: "name"
  7284. in: "path"
  7285. description: "Image name or id"
  7286. type: "string"
  7287. required: true
  7288. tags: ["Image"]
  7289. /images/{name}/history:
  7290. get:
  7291. summary: "Get the history of an image"
  7292. description: "Return parent layers of an image."
  7293. operationId: "ImageHistory"
  7294. produces: ["application/json"]
  7295. responses:
  7296. 200:
  7297. description: "List of image layers"
  7298. schema:
  7299. type: "array"
  7300. items:
  7301. type: "object"
  7302. x-go-name: HistoryResponseItem
  7303. title: "HistoryResponseItem"
  7304. description: "individual image layer information in response to ImageHistory operation"
  7305. required: [Id, Created, CreatedBy, Tags, Size, Comment]
  7306. properties:
  7307. Id:
  7308. type: "string"
  7309. x-nullable: false
  7310. Created:
  7311. type: "integer"
  7312. format: "int64"
  7313. x-nullable: false
  7314. CreatedBy:
  7315. type: "string"
  7316. x-nullable: false
  7317. Tags:
  7318. type: "array"
  7319. items:
  7320. type: "string"
  7321. Size:
  7322. type: "integer"
  7323. format: "int64"
  7324. x-nullable: false
  7325. Comment:
  7326. type: "string"
  7327. x-nullable: false
  7328. examples:
  7329. application/json:
  7330. - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710"
  7331. Created: 1398108230
  7332. CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /"
  7333. Tags:
  7334. - "ubuntu:lucid"
  7335. - "ubuntu:10.04"
  7336. Size: 182964289
  7337. Comment: ""
  7338. - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8"
  7339. Created: 1398108222
  7340. CreatedBy: "/bin/sh -c #(nop) MAINTAINER Tianon Gravi <admwiggin@gmail.com> - mkimage-debootstrap.sh -i iproute,iputils-ping,ubuntu-minimal -t lucid.tar.xz lucid http://archive.ubuntu.com/ubuntu/"
  7341. Tags: []
  7342. Size: 0
  7343. Comment: ""
  7344. - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158"
  7345. Created: 1371157430
  7346. CreatedBy: ""
  7347. Tags:
  7348. - "scratch12:latest"
  7349. - "scratch:latest"
  7350. Size: 0
  7351. Comment: "Imported from -"
  7352. 404:
  7353. description: "No such image"
  7354. schema:
  7355. $ref: "#/definitions/ErrorResponse"
  7356. 500:
  7357. description: "Server error"
  7358. schema:
  7359. $ref: "#/definitions/ErrorResponse"
  7360. parameters:
  7361. - name: "name"
  7362. in: "path"
  7363. description: "Image name or ID"
  7364. type: "string"
  7365. required: true
  7366. tags: ["Image"]
  7367. /images/{name}/push:
  7368. post:
  7369. summary: "Push an image"
  7370. description: |
  7371. Push an image to a registry.
  7372. If you wish to push an image on to a private registry, that image must
  7373. already have a tag which references the registry. For example,
  7374. `registry.example.com/myimage:latest`.
  7375. The push is cancelled if the HTTP connection is closed.
  7376. operationId: "ImagePush"
  7377. consumes:
  7378. - "application/octet-stream"
  7379. responses:
  7380. 200:
  7381. description: "No error"
  7382. 404:
  7383. description: "No such image"
  7384. schema:
  7385. $ref: "#/definitions/ErrorResponse"
  7386. 500:
  7387. description: "Server error"
  7388. schema:
  7389. $ref: "#/definitions/ErrorResponse"
  7390. parameters:
  7391. - name: "name"
  7392. in: "path"
  7393. description: "Image name or ID."
  7394. type: "string"
  7395. required: true
  7396. - name: "tag"
  7397. in: "query"
  7398. description: "The tag to associate with the image on the registry."
  7399. type: "string"
  7400. - name: "X-Registry-Auth"
  7401. in: "header"
  7402. description: |
  7403. A base64url-encoded auth configuration.
  7404. Refer to the [authentication section](#section/Authentication) for
  7405. details.
  7406. type: "string"
  7407. required: true
  7408. tags: ["Image"]
  7409. /images/{name}/tag:
  7410. post:
  7411. summary: "Tag an image"
  7412. description: "Tag an image so that it becomes part of a repository."
  7413. operationId: "ImageTag"
  7414. responses:
  7415. 201:
  7416. description: "No error"
  7417. 400:
  7418. description: "Bad parameter"
  7419. schema:
  7420. $ref: "#/definitions/ErrorResponse"
  7421. 404:
  7422. description: "No such image"
  7423. schema:
  7424. $ref: "#/definitions/ErrorResponse"
  7425. 409:
  7426. description: "Conflict"
  7427. schema:
  7428. $ref: "#/definitions/ErrorResponse"
  7429. 500:
  7430. description: "Server error"
  7431. schema:
  7432. $ref: "#/definitions/ErrorResponse"
  7433. parameters:
  7434. - name: "name"
  7435. in: "path"
  7436. description: "Image name or ID to tag."
  7437. type: "string"
  7438. required: true
  7439. - name: "repo"
  7440. in: "query"
  7441. description: "The repository to tag in. For example, `someuser/someimage`."
  7442. type: "string"
  7443. - name: "tag"
  7444. in: "query"
  7445. description: "The name of the new tag."
  7446. type: "string"
  7447. tags: ["Image"]
  7448. /images/{name}:
  7449. delete:
  7450. summary: "Remove an image"
  7451. description: |
  7452. Remove an image, along with any untagged parent images that were
  7453. referenced by that image.
  7454. Images can't be removed if they have descendant images, are being
  7455. used by a running container or are being used by a build.
  7456. operationId: "ImageDelete"
  7457. produces: ["application/json"]
  7458. responses:
  7459. 200:
  7460. description: "The image was deleted successfully"
  7461. schema:
  7462. type: "array"
  7463. items:
  7464. $ref: "#/definitions/ImageDeleteResponseItem"
  7465. examples:
  7466. application/json:
  7467. - Untagged: "3e2f21a89f"
  7468. - Deleted: "3e2f21a89f"
  7469. - Deleted: "53b4f83ac9"
  7470. 404:
  7471. description: "No such image"
  7472. schema:
  7473. $ref: "#/definitions/ErrorResponse"
  7474. 409:
  7475. description: "Conflict"
  7476. schema:
  7477. $ref: "#/definitions/ErrorResponse"
  7478. 500:
  7479. description: "Server error"
  7480. schema:
  7481. $ref: "#/definitions/ErrorResponse"
  7482. parameters:
  7483. - name: "name"
  7484. in: "path"
  7485. description: "Image name or ID"
  7486. type: "string"
  7487. required: true
  7488. - name: "force"
  7489. in: "query"
  7490. description: "Remove the image even if it is being used by stopped containers or has other tags"
  7491. type: "boolean"
  7492. default: false
  7493. - name: "noprune"
  7494. in: "query"
  7495. description: "Do not delete untagged parent images"
  7496. type: "boolean"
  7497. default: false
  7498. tags: ["Image"]
  7499. /images/search:
  7500. get:
  7501. summary: "Search images"
  7502. description: "Search for an image on Docker Hub."
  7503. operationId: "ImageSearch"
  7504. produces:
  7505. - "application/json"
  7506. responses:
  7507. 200:
  7508. description: "No error"
  7509. schema:
  7510. type: "array"
  7511. items:
  7512. type: "object"
  7513. title: "ImageSearchResponseItem"
  7514. properties:
  7515. description:
  7516. type: "string"
  7517. is_official:
  7518. type: "boolean"
  7519. is_automated:
  7520. type: "boolean"
  7521. name:
  7522. type: "string"
  7523. star_count:
  7524. type: "integer"
  7525. examples:
  7526. application/json:
  7527. - description: ""
  7528. is_official: false
  7529. is_automated: false
  7530. name: "wma55/u1210sshd"
  7531. star_count: 0
  7532. - description: ""
  7533. is_official: false
  7534. is_automated: false
  7535. name: "jdswinbank/sshd"
  7536. star_count: 0
  7537. - description: ""
  7538. is_official: false
  7539. is_automated: false
  7540. name: "vgauthier/sshd"
  7541. star_count: 0
  7542. 500:
  7543. description: "Server error"
  7544. schema:
  7545. $ref: "#/definitions/ErrorResponse"
  7546. parameters:
  7547. - name: "term"
  7548. in: "query"
  7549. description: "Term to search"
  7550. type: "string"
  7551. required: true
  7552. - name: "limit"
  7553. in: "query"
  7554. description: "Maximum number of results to return"
  7555. type: "integer"
  7556. - name: "filters"
  7557. in: "query"
  7558. description: |
  7559. A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:
  7560. - `is-automated=(true|false)`
  7561. - `is-official=(true|false)`
  7562. - `stars=<number>` Matches images that has at least 'number' stars.
  7563. type: "string"
  7564. tags: ["Image"]
  7565. /images/prune:
  7566. post:
  7567. summary: "Delete unused images"
  7568. produces:
  7569. - "application/json"
  7570. operationId: "ImagePrune"
  7571. parameters:
  7572. - name: "filters"
  7573. in: "query"
  7574. description: |
  7575. Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters:
  7576. - `dangling=<boolean>` When set to `true` (or `1`), prune only
  7577. unused *and* untagged images. When set to `false`
  7578. (or `0`), all unused images are pruned.
  7579. - `until=<string>` Prune images created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time.
  7580. - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune images with (or without, in case `label!=...` is used) the specified labels.
  7581. type: "string"
  7582. responses:
  7583. 200:
  7584. description: "No error"
  7585. schema:
  7586. type: "object"
  7587. title: "ImagePruneResponse"
  7588. properties:
  7589. ImagesDeleted:
  7590. description: "Images that were deleted"
  7591. type: "array"
  7592. items:
  7593. $ref: "#/definitions/ImageDeleteResponseItem"
  7594. SpaceReclaimed:
  7595. description: "Disk space reclaimed in bytes"
  7596. type: "integer"
  7597. format: "int64"
  7598. 500:
  7599. description: "Server error"
  7600. schema:
  7601. $ref: "#/definitions/ErrorResponse"
  7602. tags: ["Image"]
  7603. /auth:
  7604. post:
  7605. summary: "Check auth configuration"
  7606. description: |
  7607. Validate credentials for a registry and, if available, get an identity
  7608. token for accessing the registry without password.
  7609. operationId: "SystemAuth"
  7610. consumes: ["application/json"]
  7611. produces: ["application/json"]
  7612. responses:
  7613. 200:
  7614. description: "An identity token was generated successfully."
  7615. schema:
  7616. type: "object"
  7617. title: "SystemAuthResponse"
  7618. required: [Status]
  7619. properties:
  7620. Status:
  7621. description: "The status of the authentication"
  7622. type: "string"
  7623. x-nullable: false
  7624. IdentityToken:
  7625. description: "An opaque token used to authenticate a user after a successful login"
  7626. type: "string"
  7627. x-nullable: false
  7628. examples:
  7629. application/json:
  7630. Status: "Login Succeeded"
  7631. IdentityToken: "9cbaf023786cd7..."
  7632. 204:
  7633. description: "No error"
  7634. 500:
  7635. description: "Server error"
  7636. schema:
  7637. $ref: "#/definitions/ErrorResponse"
  7638. parameters:
  7639. - name: "authConfig"
  7640. in: "body"
  7641. description: "Authentication to check"
  7642. schema:
  7643. $ref: "#/definitions/AuthConfig"
  7644. tags: ["System"]
  7645. /info:
  7646. get:
  7647. summary: "Get system information"
  7648. operationId: "SystemInfo"
  7649. produces:
  7650. - "application/json"
  7651. responses:
  7652. 200:
  7653. description: "No error"
  7654. schema:
  7655. $ref: "#/definitions/SystemInfo"
  7656. 500:
  7657. description: "Server error"
  7658. schema:
  7659. $ref: "#/definitions/ErrorResponse"
  7660. tags: ["System"]
  7661. /version:
  7662. get:
  7663. summary: "Get version"
  7664. description: "Returns the version of Docker that is running and various information about the system that Docker is running on."
  7665. operationId: "SystemVersion"
  7666. produces: ["application/json"]
  7667. responses:
  7668. 200:
  7669. description: "no error"
  7670. schema:
  7671. $ref: "#/definitions/SystemVersion"
  7672. 500:
  7673. description: "server error"
  7674. schema:
  7675. $ref: "#/definitions/ErrorResponse"
  7676. tags: ["System"]
  7677. /_ping:
  7678. get:
  7679. summary: "Ping"
  7680. description: "This is a dummy endpoint you can use to test if the server is accessible."
  7681. operationId: "SystemPing"
  7682. produces: ["text/plain"]
  7683. responses:
  7684. 200:
  7685. description: "no error"
  7686. schema:
  7687. type: "string"
  7688. example: "OK"
  7689. headers:
  7690. API-Version:
  7691. type: "string"
  7692. description: "Max API Version the server supports"
  7693. Builder-Version:
  7694. type: "string"
  7695. description: "Default version of docker image builder"
  7696. Docker-Experimental:
  7697. type: "boolean"
  7698. description: "If the server is running with experimental mode enabled"
  7699. Cache-Control:
  7700. type: "string"
  7701. default: "no-cache, no-store, must-revalidate"
  7702. Pragma:
  7703. type: "string"
  7704. default: "no-cache"
  7705. 500:
  7706. description: "server error"
  7707. schema:
  7708. $ref: "#/definitions/ErrorResponse"
  7709. headers:
  7710. Cache-Control:
  7711. type: "string"
  7712. default: "no-cache, no-store, must-revalidate"
  7713. Pragma:
  7714. type: "string"
  7715. default: "no-cache"
  7716. tags: ["System"]
  7717. head:
  7718. summary: "Ping"
  7719. description: "This is a dummy endpoint you can use to test if the server is accessible."
  7720. operationId: "SystemPingHead"
  7721. produces: ["text/plain"]
  7722. responses:
  7723. 200:
  7724. description: "no error"
  7725. schema:
  7726. type: "string"
  7727. example: "(empty)"
  7728. headers:
  7729. API-Version:
  7730. type: "string"
  7731. description: "Max API Version the server supports"
  7732. Builder-Version:
  7733. type: "string"
  7734. description: "Default version of docker image builder"
  7735. Docker-Experimental:
  7736. type: "boolean"
  7737. description: "If the server is running with experimental mode enabled"
  7738. Cache-Control:
  7739. type: "string"
  7740. default: "no-cache, no-store, must-revalidate"
  7741. Pragma:
  7742. type: "string"
  7743. default: "no-cache"
  7744. 500:
  7745. description: "server error"
  7746. schema:
  7747. $ref: "#/definitions/ErrorResponse"
  7748. tags: ["System"]
  7749. /commit:
  7750. post:
  7751. summary: "Create a new image from a container"
  7752. operationId: "ImageCommit"
  7753. consumes:
  7754. - "application/json"
  7755. produces:
  7756. - "application/json"
  7757. responses:
  7758. 201:
  7759. description: "no error"
  7760. schema:
  7761. $ref: "#/definitions/IdResponse"
  7762. 404:
  7763. description: "no such container"
  7764. schema:
  7765. $ref: "#/definitions/ErrorResponse"
  7766. examples:
  7767. application/json:
  7768. message: "No such container: c2ada9df5af8"
  7769. 500:
  7770. description: "server error"
  7771. schema:
  7772. $ref: "#/definitions/ErrorResponse"
  7773. parameters:
  7774. - name: "containerConfig"
  7775. in: "body"
  7776. description: "The container configuration"
  7777. schema:
  7778. $ref: "#/definitions/ContainerConfig"
  7779. - name: "container"
  7780. in: "query"
  7781. description: "The ID or name of the container to commit"
  7782. type: "string"
  7783. - name: "repo"
  7784. in: "query"
  7785. description: "Repository name for the created image"
  7786. type: "string"
  7787. - name: "tag"
  7788. in: "query"
  7789. description: "Tag name for the create image"
  7790. type: "string"
  7791. - name: "comment"
  7792. in: "query"
  7793. description: "Commit message"
  7794. type: "string"
  7795. - name: "author"
  7796. in: "query"
  7797. description: "Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)"
  7798. type: "string"
  7799. - name: "pause"
  7800. in: "query"
  7801. description: "Whether to pause the container before committing"
  7802. type: "boolean"
  7803. default: true
  7804. - name: "changes"
  7805. in: "query"
  7806. description: "`Dockerfile` instructions to apply while committing"
  7807. type: "string"
  7808. tags: ["Image"]
  7809. /events:
  7810. get:
  7811. summary: "Monitor events"
  7812. description: |
  7813. Stream real-time events from the server.
  7814. Various objects within Docker report events when something happens to them.
  7815. Containers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `exec_die`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, `update`, and `prune`
  7816. Images report these events: `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune`
  7817. Volumes report these events: `create`, `mount`, `unmount`, `destroy`, and `prune`
  7818. Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, `remove`, and `prune`
  7819. The Docker daemon reports these events: `reload`
  7820. Services report these events: `create`, `update`, and `remove`
  7821. Nodes report these events: `create`, `update`, and `remove`
  7822. Secrets report these events: `create`, `update`, and `remove`
  7823. Configs report these events: `create`, `update`, and `remove`
  7824. The Builder reports `prune` events
  7825. operationId: "SystemEvents"
  7826. produces:
  7827. - "application/json"
  7828. responses:
  7829. 200:
  7830. description: "no error"
  7831. schema:
  7832. type: "object"
  7833. title: "SystemEventsResponse"
  7834. properties:
  7835. Type:
  7836. description: "The type of object emitting the event"
  7837. type: "string"
  7838. Action:
  7839. description: "The type of event"
  7840. type: "string"
  7841. Actor:
  7842. type: "object"
  7843. properties:
  7844. ID:
  7845. description: "The ID of the object emitting the event"
  7846. type: "string"
  7847. Attributes:
  7848. description: "Various key/value attributes of the object, depending on its type"
  7849. type: "object"
  7850. additionalProperties:
  7851. type: "string"
  7852. time:
  7853. description: "Timestamp of event"
  7854. type: "integer"
  7855. timeNano:
  7856. description: "Timestamp of event, with nanosecond accuracy"
  7857. type: "integer"
  7858. format: "int64"
  7859. examples:
  7860. application/json:
  7861. Type: "container"
  7862. Action: "create"
  7863. Actor:
  7864. ID: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743"
  7865. Attributes:
  7866. com.example.some-label: "some-label-value"
  7867. image: "alpine"
  7868. name: "my-container"
  7869. time: 1461943101
  7870. 400:
  7871. description: "bad parameter"
  7872. schema:
  7873. $ref: "#/definitions/ErrorResponse"
  7874. 500:
  7875. description: "server error"
  7876. schema:
  7877. $ref: "#/definitions/ErrorResponse"
  7878. parameters:
  7879. - name: "since"
  7880. in: "query"
  7881. description: "Show events created since this timestamp then stream new events."
  7882. type: "string"
  7883. - name: "until"
  7884. in: "query"
  7885. description: "Show events created until this timestamp then stop streaming."
  7886. type: "string"
  7887. - name: "filters"
  7888. in: "query"
  7889. description: |
  7890. A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters:
  7891. - `config=<string>` config name or ID
  7892. - `container=<string>` container name or ID
  7893. - `daemon=<string>` daemon name or ID
  7894. - `event=<string>` event type
  7895. - `image=<string>` image name or ID
  7896. - `label=<string>` image or container label
  7897. - `network=<string>` network name or ID
  7898. - `node=<string>` node ID
  7899. - `plugin`=<string> plugin name or ID
  7900. - `scope`=<string> local or swarm
  7901. - `secret=<string>` secret name or ID
  7902. - `service=<string>` service name or ID
  7903. - `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config`
  7904. - `volume=<string>` volume name
  7905. type: "string"
  7906. tags: ["System"]
  7907. /system/df:
  7908. get:
  7909. summary: "Get data usage information"
  7910. operationId: "SystemDataUsage"
  7911. responses:
  7912. 200:
  7913. description: "no error"
  7914. schema:
  7915. type: "object"
  7916. title: "SystemDataUsageResponse"
  7917. properties:
  7918. LayersSize:
  7919. type: "integer"
  7920. format: "int64"
  7921. Images:
  7922. type: "array"
  7923. items:
  7924. $ref: "#/definitions/ImageSummary"
  7925. Containers:
  7926. type: "array"
  7927. items:
  7928. $ref: "#/definitions/ContainerSummary"
  7929. Volumes:
  7930. type: "array"
  7931. items:
  7932. $ref: "#/definitions/Volume"
  7933. BuildCache:
  7934. type: "array"
  7935. items:
  7936. $ref: "#/definitions/BuildCache"
  7937. example:
  7938. LayersSize: 1092588
  7939. Images:
  7940. -
  7941. Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
  7942. ParentId: ""
  7943. RepoTags:
  7944. - "busybox:latest"
  7945. RepoDigests:
  7946. - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6"
  7947. Created: 1466724217
  7948. Size: 1092588
  7949. SharedSize: 0
  7950. VirtualSize: 1092588
  7951. Labels: {}
  7952. Containers: 1
  7953. Containers:
  7954. -
  7955. Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148"
  7956. Names:
  7957. - "/top"
  7958. Image: "busybox"
  7959. ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
  7960. Command: "top"
  7961. Created: 1472592424
  7962. Ports: []
  7963. SizeRootFs: 1092588
  7964. Labels: {}
  7965. State: "exited"
  7966. Status: "Exited (0) 56 minutes ago"
  7967. HostConfig:
  7968. NetworkMode: "default"
  7969. NetworkSettings:
  7970. Networks:
  7971. bridge:
  7972. IPAMConfig: null
  7973. Links: null
  7974. Aliases: null
  7975. NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92"
  7976. EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a"
  7977. Gateway: "172.18.0.1"
  7978. IPAddress: "172.18.0.2"
  7979. IPPrefixLen: 16
  7980. IPv6Gateway: ""
  7981. GlobalIPv6Address: ""
  7982. GlobalIPv6PrefixLen: 0
  7983. MacAddress: "02:42:ac:12:00:02"
  7984. Mounts: []
  7985. Volumes:
  7986. -
  7987. Name: "my-volume"
  7988. Driver: "local"
  7989. Mountpoint: "/var/lib/docker/volumes/my-volume/_data"
  7990. Labels: null
  7991. Scope: "local"
  7992. Options: null
  7993. UsageData:
  7994. Size: 10920104
  7995. RefCount: 2
  7996. 500:
  7997. description: "server error"
  7998. schema:
  7999. $ref: "#/definitions/ErrorResponse"
  8000. tags: ["System"]
  8001. /images/{name}/get:
  8002. get:
  8003. summary: "Export an image"
  8004. description: |
  8005. Get a tarball containing all images and metadata for a repository.
  8006. If `name` is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned. If `name` is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the `repositories` file in the tarball, as there were no image names referenced.
  8007. ### Image tarball format
  8008. An image tarball contains one directory per image layer (named using its long ID), each containing these files:
  8009. - `VERSION`: currently `1.0` - the file format version
  8010. - `json`: detailed layer information, similar to `docker inspect layer_id`
  8011. - `layer.tar`: A tarfile containing the filesystem changes in this layer
  8012. The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions.
  8013. If the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs.
  8014. ```json
  8015. {
  8016. "hello-world": {
  8017. "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"
  8018. }
  8019. }
  8020. ```
  8021. operationId: "ImageGet"
  8022. produces:
  8023. - "application/x-tar"
  8024. responses:
  8025. 200:
  8026. description: "no error"
  8027. schema:
  8028. type: "string"
  8029. format: "binary"
  8030. 500:
  8031. description: "server error"
  8032. schema:
  8033. $ref: "#/definitions/ErrorResponse"
  8034. parameters:
  8035. - name: "name"
  8036. in: "path"
  8037. description: "Image name or ID"
  8038. type: "string"
  8039. required: true
  8040. tags: ["Image"]
  8041. /images/get:
  8042. get:
  8043. summary: "Export several images"
  8044. description: |
  8045. Get a tarball containing all images and metadata for several image
  8046. repositories.
  8047. For each value of the `names` parameter: if it is a specific name and
  8048. tag (e.g. `ubuntu:latest`), then only that image (and its parents) are
  8049. returned; if it is an image ID, similarly only that image (and its parents)
  8050. are returned and there would be no names referenced in the 'repositories'
  8051. file for this image ID.
  8052. For details on the format, see the [export image endpoint](#operation/ImageGet).
  8053. operationId: "ImageGetAll"
  8054. produces:
  8055. - "application/x-tar"
  8056. responses:
  8057. 200:
  8058. description: "no error"
  8059. schema:
  8060. type: "string"
  8061. format: "binary"
  8062. 500:
  8063. description: "server error"
  8064. schema:
  8065. $ref: "#/definitions/ErrorResponse"
  8066. parameters:
  8067. - name: "names"
  8068. in: "query"
  8069. description: "Image names to filter by"
  8070. type: "array"
  8071. items:
  8072. type: "string"
  8073. tags: ["Image"]
  8074. /images/load:
  8075. post:
  8076. summary: "Import images"
  8077. description: |
  8078. Load a set of images and tags into a repository.
  8079. For details on the format, see the [export image endpoint](#operation/ImageGet).
  8080. operationId: "ImageLoad"
  8081. consumes:
  8082. - "application/x-tar"
  8083. produces:
  8084. - "application/json"
  8085. responses:
  8086. 200:
  8087. description: "no error"
  8088. 500:
  8089. description: "server error"
  8090. schema:
  8091. $ref: "#/definitions/ErrorResponse"
  8092. parameters:
  8093. - name: "imagesTarball"
  8094. in: "body"
  8095. description: "Tar archive containing images"
  8096. schema:
  8097. type: "string"
  8098. format: "binary"
  8099. - name: "quiet"
  8100. in: "query"
  8101. description: "Suppress progress details during load."
  8102. type: "boolean"
  8103. default: false
  8104. tags: ["Image"]
  8105. /containers/{id}/exec:
  8106. post:
  8107. summary: "Create an exec instance"
  8108. description: "Run a command inside a running container."
  8109. operationId: "ContainerExec"
  8110. consumes:
  8111. - "application/json"
  8112. produces:
  8113. - "application/json"
  8114. responses:
  8115. 201:
  8116. description: "no error"
  8117. schema:
  8118. $ref: "#/definitions/IdResponse"
  8119. 404:
  8120. description: "no such container"
  8121. schema:
  8122. $ref: "#/definitions/ErrorResponse"
  8123. examples:
  8124. application/json:
  8125. message: "No such container: c2ada9df5af8"
  8126. 409:
  8127. description: "container is paused"
  8128. schema:
  8129. $ref: "#/definitions/ErrorResponse"
  8130. 500:
  8131. description: "Server error"
  8132. schema:
  8133. $ref: "#/definitions/ErrorResponse"
  8134. parameters:
  8135. - name: "execConfig"
  8136. in: "body"
  8137. description: "Exec configuration"
  8138. schema:
  8139. type: "object"
  8140. properties:
  8141. AttachStdin:
  8142. type: "boolean"
  8143. description: "Attach to `stdin` of the exec command."
  8144. AttachStdout:
  8145. type: "boolean"
  8146. description: "Attach to `stdout` of the exec command."
  8147. AttachStderr:
  8148. type: "boolean"
  8149. description: "Attach to `stderr` of the exec command."
  8150. DetachKeys:
  8151. type: "string"
  8152. description: |
  8153. Override the key sequence for detaching a container. Format is
  8154. a single character `[a-Z]` or `ctrl-<value>` where `<value>`
  8155. is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
  8156. Tty:
  8157. type: "boolean"
  8158. description: "Allocate a pseudo-TTY."
  8159. Env:
  8160. description: |
  8161. A list of environment variables in the form `["VAR=value", ...]`.
  8162. type: "array"
  8163. items:
  8164. type: "string"
  8165. Cmd:
  8166. type: "array"
  8167. description: "Command to run, as a string or array of strings."
  8168. items:
  8169. type: "string"
  8170. Privileged:
  8171. type: "boolean"
  8172. description: "Runs the exec process with extended privileges."
  8173. default: false
  8174. User:
  8175. type: "string"
  8176. description: |
  8177. The user, and optionally, group to run the exec process inside
  8178. the container. Format is one of: `user`, `user:group`, `uid`,
  8179. or `uid:gid`.
  8180. WorkingDir:
  8181. type: "string"
  8182. description: |
  8183. The working directory for the exec process inside the container.
  8184. example:
  8185. AttachStdin: false
  8186. AttachStdout: true
  8187. AttachStderr: true
  8188. DetachKeys: "ctrl-p,ctrl-q"
  8189. Tty: false
  8190. Cmd:
  8191. - "date"
  8192. Env:
  8193. - "FOO=bar"
  8194. - "BAZ=quux"
  8195. required: true
  8196. - name: "id"
  8197. in: "path"
  8198. description: "ID or name of container"
  8199. type: "string"
  8200. required: true
  8201. tags: ["Exec"]
  8202. /exec/{id}/start:
  8203. post:
  8204. summary: "Start an exec instance"
  8205. description: |
  8206. Starts a previously set up exec instance. If detach is true, this endpoint
  8207. returns immediately after starting the command. Otherwise, it sets up an
  8208. interactive session with the command.
  8209. operationId: "ExecStart"
  8210. consumes:
  8211. - "application/json"
  8212. produces:
  8213. - "application/vnd.docker.raw-stream"
  8214. responses:
  8215. 200:
  8216. description: "No error"
  8217. 404:
  8218. description: "No such exec instance"
  8219. schema:
  8220. $ref: "#/definitions/ErrorResponse"
  8221. 409:
  8222. description: "Container is stopped or paused"
  8223. schema:
  8224. $ref: "#/definitions/ErrorResponse"
  8225. parameters:
  8226. - name: "execStartConfig"
  8227. in: "body"
  8228. schema:
  8229. type: "object"
  8230. properties:
  8231. Detach:
  8232. type: "boolean"
  8233. description: "Detach from the command."
  8234. Tty:
  8235. type: "boolean"
  8236. description: "Allocate a pseudo-TTY."
  8237. example:
  8238. Detach: false
  8239. Tty: false
  8240. - name: "id"
  8241. in: "path"
  8242. description: "Exec instance ID"
  8243. required: true
  8244. type: "string"
  8245. tags: ["Exec"]
  8246. /exec/{id}/resize:
  8247. post:
  8248. summary: "Resize an exec instance"
  8249. description: |
  8250. Resize the TTY session used by an exec instance. This endpoint only works
  8251. if `tty` was specified as part of creating and starting the exec instance.
  8252. operationId: "ExecResize"
  8253. responses:
  8254. 201:
  8255. description: "No error"
  8256. 404:
  8257. description: "No such exec instance"
  8258. schema:
  8259. $ref: "#/definitions/ErrorResponse"
  8260. parameters:
  8261. - name: "id"
  8262. in: "path"
  8263. description: "Exec instance ID"
  8264. required: true
  8265. type: "string"
  8266. - name: "h"
  8267. in: "query"
  8268. description: "Height of the TTY session in characters"
  8269. type: "integer"
  8270. - name: "w"
  8271. in: "query"
  8272. description: "Width of the TTY session in characters"
  8273. type: "integer"
  8274. tags: ["Exec"]
  8275. /exec/{id}/json:
  8276. get:
  8277. summary: "Inspect an exec instance"
  8278. description: "Return low-level information about an exec instance."
  8279. operationId: "ExecInspect"
  8280. produces:
  8281. - "application/json"
  8282. responses:
  8283. 200:
  8284. description: "No error"
  8285. schema:
  8286. type: "object"
  8287. title: "ExecInspectResponse"
  8288. properties:
  8289. CanRemove:
  8290. type: "boolean"
  8291. DetachKeys:
  8292. type: "string"
  8293. ID:
  8294. type: "string"
  8295. Running:
  8296. type: "boolean"
  8297. ExitCode:
  8298. type: "integer"
  8299. ProcessConfig:
  8300. $ref: "#/definitions/ProcessConfig"
  8301. OpenStdin:
  8302. type: "boolean"
  8303. OpenStderr:
  8304. type: "boolean"
  8305. OpenStdout:
  8306. type: "boolean"
  8307. ContainerID:
  8308. type: "string"
  8309. Pid:
  8310. type: "integer"
  8311. description: "The system process ID for the exec process."
  8312. examples:
  8313. application/json:
  8314. CanRemove: false
  8315. ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126"
  8316. DetachKeys: ""
  8317. ExitCode: 2
  8318. ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b"
  8319. OpenStderr: true
  8320. OpenStdin: true
  8321. OpenStdout: true
  8322. ProcessConfig:
  8323. arguments:
  8324. - "-c"
  8325. - "exit 2"
  8326. entrypoint: "sh"
  8327. privileged: false
  8328. tty: true
  8329. user: "1000"
  8330. Running: false
  8331. Pid: 42000
  8332. 404:
  8333. description: "No such exec instance"
  8334. schema:
  8335. $ref: "#/definitions/ErrorResponse"
  8336. 500:
  8337. description: "Server error"
  8338. schema:
  8339. $ref: "#/definitions/ErrorResponse"
  8340. parameters:
  8341. - name: "id"
  8342. in: "path"
  8343. description: "Exec instance ID"
  8344. required: true
  8345. type: "string"
  8346. tags: ["Exec"]
  8347. /volumes:
  8348. get:
  8349. summary: "List volumes"
  8350. operationId: "VolumeList"
  8351. produces: ["application/json"]
  8352. responses:
  8353. 200:
  8354. description: "Summary volume data that matches the query"
  8355. schema:
  8356. type: "object"
  8357. title: "VolumeListResponse"
  8358. description: "Volume list response"
  8359. required: [Volumes, Warnings]
  8360. properties:
  8361. Volumes:
  8362. type: "array"
  8363. x-nullable: false
  8364. description: "List of volumes"
  8365. items:
  8366. $ref: "#/definitions/Volume"
  8367. Warnings:
  8368. type: "array"
  8369. x-nullable: false
  8370. description: |
  8371. Warnings that occurred when fetching the list of volumes.
  8372. items:
  8373. type: "string"
  8374. examples:
  8375. application/json:
  8376. Volumes:
  8377. - CreatedAt: "2017-07-19T12:00:26Z"
  8378. Name: "tardis"
  8379. Driver: "local"
  8380. Mountpoint: "/var/lib/docker/volumes/tardis"
  8381. Labels:
  8382. com.example.some-label: "some-value"
  8383. com.example.some-other-label: "some-other-value"
  8384. Scope: "local"
  8385. Options:
  8386. device: "tmpfs"
  8387. o: "size=100m,uid=1000"
  8388. type: "tmpfs"
  8389. Warnings: []
  8390. 500:
  8391. description: "Server error"
  8392. schema:
  8393. $ref: "#/definitions/ErrorResponse"
  8394. parameters:
  8395. - name: "filters"
  8396. in: "query"
  8397. description: |
  8398. JSON encoded value of the filters (a `map[string][]string`) to
  8399. process on the volumes list. Available filters:
  8400. - `dangling=<boolean>` When set to `true` (or `1`), returns all
  8401. volumes that are not in use by a container. When set to `false`
  8402. (or `0`), only volumes that are in use by one or more
  8403. containers are returned.
  8404. - `driver=<volume-driver-name>` Matches volumes based on their driver.
  8405. - `label=<key>` or `label=<key>:<value>` Matches volumes based on
  8406. the presence of a `label` alone or a `label` and a value.
  8407. - `name=<volume-name>` Matches all or part of a volume name.
  8408. type: "string"
  8409. format: "json"
  8410. tags: ["Volume"]
  8411. /volumes/create:
  8412. post:
  8413. summary: "Create a volume"
  8414. operationId: "VolumeCreate"
  8415. consumes: ["application/json"]
  8416. produces: ["application/json"]
  8417. responses:
  8418. 201:
  8419. description: "The volume was created successfully"
  8420. schema:
  8421. $ref: "#/definitions/Volume"
  8422. 500:
  8423. description: "Server error"
  8424. schema:
  8425. $ref: "#/definitions/ErrorResponse"
  8426. parameters:
  8427. - name: "volumeConfig"
  8428. in: "body"
  8429. required: true
  8430. description: "Volume configuration"
  8431. schema:
  8432. type: "object"
  8433. description: "Volume configuration"
  8434. title: "VolumeConfig"
  8435. properties:
  8436. Name:
  8437. description: |
  8438. The new volume's name. If not specified, Docker generates a name.
  8439. type: "string"
  8440. x-nullable: false
  8441. Driver:
  8442. description: "Name of the volume driver to use."
  8443. type: "string"
  8444. default: "local"
  8445. x-nullable: false
  8446. DriverOpts:
  8447. description: |
  8448. A mapping of driver options and values. These options are
  8449. passed directly to the driver and are driver specific.
  8450. type: "object"
  8451. additionalProperties:
  8452. type: "string"
  8453. Labels:
  8454. description: "User-defined key/value metadata."
  8455. type: "object"
  8456. additionalProperties:
  8457. type: "string"
  8458. example:
  8459. Name: "tardis"
  8460. Labels:
  8461. com.example.some-label: "some-value"
  8462. com.example.some-other-label: "some-other-value"
  8463. Driver: "custom"
  8464. tags: ["Volume"]
  8465. /volumes/{name}:
  8466. get:
  8467. summary: "Inspect a volume"
  8468. operationId: "VolumeInspect"
  8469. produces: ["application/json"]
  8470. responses:
  8471. 200:
  8472. description: "No error"
  8473. schema:
  8474. $ref: "#/definitions/Volume"
  8475. 404:
  8476. description: "No such volume"
  8477. schema:
  8478. $ref: "#/definitions/ErrorResponse"
  8479. 500:
  8480. description: "Server error"
  8481. schema:
  8482. $ref: "#/definitions/ErrorResponse"
  8483. parameters:
  8484. - name: "name"
  8485. in: "path"
  8486. required: true
  8487. description: "Volume name or ID"
  8488. type: "string"
  8489. tags: ["Volume"]
  8490. delete:
  8491. summary: "Remove a volume"
  8492. description: "Instruct the driver to remove the volume."
  8493. operationId: "VolumeDelete"
  8494. responses:
  8495. 204:
  8496. description: "The volume was removed"
  8497. 404:
  8498. description: "No such volume or volume driver"
  8499. schema:
  8500. $ref: "#/definitions/ErrorResponse"
  8501. 409:
  8502. description: "Volume is in use and cannot be removed"
  8503. schema:
  8504. $ref: "#/definitions/ErrorResponse"
  8505. 500:
  8506. description: "Server error"
  8507. schema:
  8508. $ref: "#/definitions/ErrorResponse"
  8509. parameters:
  8510. - name: "name"
  8511. in: "path"
  8512. required: true
  8513. description: "Volume name or ID"
  8514. type: "string"
  8515. - name: "force"
  8516. in: "query"
  8517. description: "Force the removal of the volume"
  8518. type: "boolean"
  8519. default: false
  8520. tags: ["Volume"]
  8521. /volumes/prune:
  8522. post:
  8523. summary: "Delete unused volumes"
  8524. produces:
  8525. - "application/json"
  8526. operationId: "VolumePrune"
  8527. parameters:
  8528. - name: "filters"
  8529. in: "query"
  8530. description: |
  8531. Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  8532. Available filters:
  8533. - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune volumes with (or without, in case `label!=...` is used) the specified labels.
  8534. type: "string"
  8535. responses:
  8536. 200:
  8537. description: "No error"
  8538. schema:
  8539. type: "object"
  8540. title: "VolumePruneResponse"
  8541. properties:
  8542. VolumesDeleted:
  8543. description: "Volumes that were deleted"
  8544. type: "array"
  8545. items:
  8546. type: "string"
  8547. SpaceReclaimed:
  8548. description: "Disk space reclaimed in bytes"
  8549. type: "integer"
  8550. format: "int64"
  8551. 500:
  8552. description: "Server error"
  8553. schema:
  8554. $ref: "#/definitions/ErrorResponse"
  8555. tags: ["Volume"]
  8556. /networks:
  8557. get:
  8558. summary: "List networks"
  8559. description: |
  8560. Returns a list of networks. For details on the format, see the
  8561. [network inspect endpoint](#operation/NetworkInspect).
  8562. Note that it uses a different, smaller representation of a network than
  8563. inspecting a single network. For example, the list of containers attached
  8564. to the network is not propagated in API versions 1.28 and up.
  8565. operationId: "NetworkList"
  8566. produces:
  8567. - "application/json"
  8568. responses:
  8569. 200:
  8570. description: "No error"
  8571. schema:
  8572. type: "array"
  8573. items:
  8574. $ref: "#/definitions/Network"
  8575. examples:
  8576. application/json:
  8577. - Name: "bridge"
  8578. Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566"
  8579. Created: "2016-10-19T06:21:00.416543526Z"
  8580. Scope: "local"
  8581. Driver: "bridge"
  8582. EnableIPv6: false
  8583. Internal: false
  8584. Attachable: false
  8585. Ingress: false
  8586. IPAM:
  8587. Driver: "default"
  8588. Config:
  8589. -
  8590. Subnet: "172.17.0.0/16"
  8591. Options:
  8592. com.docker.network.bridge.default_bridge: "true"
  8593. com.docker.network.bridge.enable_icc: "true"
  8594. com.docker.network.bridge.enable_ip_masquerade: "true"
  8595. com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  8596. com.docker.network.bridge.name: "docker0"
  8597. com.docker.network.driver.mtu: "1500"
  8598. - Name: "none"
  8599. Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794"
  8600. Created: "0001-01-01T00:00:00Z"
  8601. Scope: "local"
  8602. Driver: "null"
  8603. EnableIPv6: false
  8604. Internal: false
  8605. Attachable: false
  8606. Ingress: false
  8607. IPAM:
  8608. Driver: "default"
  8609. Config: []
  8610. Containers: {}
  8611. Options: {}
  8612. - Name: "host"
  8613. Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e"
  8614. Created: "0001-01-01T00:00:00Z"
  8615. Scope: "local"
  8616. Driver: "host"
  8617. EnableIPv6: false
  8618. Internal: false
  8619. Attachable: false
  8620. Ingress: false
  8621. IPAM:
  8622. Driver: "default"
  8623. Config: []
  8624. Containers: {}
  8625. Options: {}
  8626. 500:
  8627. description: "Server error"
  8628. schema:
  8629. $ref: "#/definitions/ErrorResponse"
  8630. parameters:
  8631. - name: "filters"
  8632. in: "query"
  8633. description: |
  8634. JSON encoded value of the filters (a `map[string][]string`) to process
  8635. on the networks list.
  8636. Available filters:
  8637. - `dangling=<boolean>` When set to `true` (or `1`), returns all
  8638. networks that are not in use by a container. When set to `false`
  8639. (or `0`), only networks that are in use by one or more
  8640. containers are returned.
  8641. - `driver=<driver-name>` Matches a network's driver.
  8642. - `id=<network-id>` Matches all or part of a network ID.
  8643. - `label=<key>` or `label=<key>=<value>` of a network label.
  8644. - `name=<network-name>` Matches all or part of a network name.
  8645. - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`).
  8646. - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks.
  8647. type: "string"
  8648. tags: ["Network"]
  8649. /networks/{id}:
  8650. get:
  8651. summary: "Inspect a network"
  8652. operationId: "NetworkInspect"
  8653. produces:
  8654. - "application/json"
  8655. responses:
  8656. 200:
  8657. description: "No error"
  8658. schema:
  8659. $ref: "#/definitions/Network"
  8660. 404:
  8661. description: "Network not found"
  8662. schema:
  8663. $ref: "#/definitions/ErrorResponse"
  8664. 500:
  8665. description: "Server error"
  8666. schema:
  8667. $ref: "#/definitions/ErrorResponse"
  8668. parameters:
  8669. - name: "id"
  8670. in: "path"
  8671. description: "Network ID or name"
  8672. required: true
  8673. type: "string"
  8674. - name: "verbose"
  8675. in: "query"
  8676. description: "Detailed inspect output for troubleshooting"
  8677. type: "boolean"
  8678. default: false
  8679. - name: "scope"
  8680. in: "query"
  8681. description: "Filter the network by scope (swarm, global, or local)"
  8682. type: "string"
  8683. tags: ["Network"]
  8684. delete:
  8685. summary: "Remove a network"
  8686. operationId: "NetworkDelete"
  8687. responses:
  8688. 204:
  8689. description: "No error"
  8690. 403:
  8691. description: "operation not supported for pre-defined networks"
  8692. schema:
  8693. $ref: "#/definitions/ErrorResponse"
  8694. 404:
  8695. description: "no such network"
  8696. schema:
  8697. $ref: "#/definitions/ErrorResponse"
  8698. 500:
  8699. description: "Server error"
  8700. schema:
  8701. $ref: "#/definitions/ErrorResponse"
  8702. parameters:
  8703. - name: "id"
  8704. in: "path"
  8705. description: "Network ID or name"
  8706. required: true
  8707. type: "string"
  8708. tags: ["Network"]
  8709. /networks/create:
  8710. post:
  8711. summary: "Create a network"
  8712. operationId: "NetworkCreate"
  8713. consumes:
  8714. - "application/json"
  8715. produces:
  8716. - "application/json"
  8717. responses:
  8718. 201:
  8719. description: "No error"
  8720. schema:
  8721. type: "object"
  8722. title: "NetworkCreateResponse"
  8723. properties:
  8724. Id:
  8725. description: "The ID of the created network."
  8726. type: "string"
  8727. Warning:
  8728. type: "string"
  8729. example:
  8730. Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30"
  8731. Warning: ""
  8732. 403:
  8733. description: "operation not supported for pre-defined networks"
  8734. schema:
  8735. $ref: "#/definitions/ErrorResponse"
  8736. 404:
  8737. description: "plugin not found"
  8738. schema:
  8739. $ref: "#/definitions/ErrorResponse"
  8740. 500:
  8741. description: "Server error"
  8742. schema:
  8743. $ref: "#/definitions/ErrorResponse"
  8744. parameters:
  8745. - name: "networkConfig"
  8746. in: "body"
  8747. description: "Network configuration"
  8748. required: true
  8749. schema:
  8750. type: "object"
  8751. required: ["Name"]
  8752. properties:
  8753. Name:
  8754. description: "The network's name."
  8755. type: "string"
  8756. CheckDuplicate:
  8757. description: |
  8758. Check for networks with duplicate names. Since Network is
  8759. primarily keyed based on a random ID and not on the name, and
  8760. network name is strictly a user-friendly alias to the network
  8761. which is uniquely identified using ID, there is no guaranteed
  8762. way to check for duplicates. CheckDuplicate is there to provide
  8763. a best effort checking of any networks which has the same name
  8764. but it is not guaranteed to catch all name collisions.
  8765. type: "boolean"
  8766. Driver:
  8767. description: "Name of the network driver plugin to use."
  8768. type: "string"
  8769. default: "bridge"
  8770. Internal:
  8771. description: "Restrict external access to the network."
  8772. type: "boolean"
  8773. Attachable:
  8774. description: |
  8775. Globally scoped network is manually attachable by regular
  8776. containers from workers in swarm mode.
  8777. type: "boolean"
  8778. Ingress:
  8779. description: |
  8780. Ingress network is the network which provides the routing-mesh
  8781. in swarm mode.
  8782. type: "boolean"
  8783. IPAM:
  8784. description: "Optional custom IP scheme for the network."
  8785. $ref: "#/definitions/IPAM"
  8786. EnableIPv6:
  8787. description: "Enable IPv6 on the network."
  8788. type: "boolean"
  8789. Options:
  8790. description: "Network specific options to be used by the drivers."
  8791. type: "object"
  8792. additionalProperties:
  8793. type: "string"
  8794. Labels:
  8795. description: "User-defined key/value metadata."
  8796. type: "object"
  8797. additionalProperties:
  8798. type: "string"
  8799. example:
  8800. Name: "isolated_nw"
  8801. CheckDuplicate: false
  8802. Driver: "bridge"
  8803. EnableIPv6: true
  8804. IPAM:
  8805. Driver: "default"
  8806. Config:
  8807. - Subnet: "172.20.0.0/16"
  8808. IPRange: "172.20.10.0/24"
  8809. Gateway: "172.20.10.11"
  8810. - Subnet: "2001:db8:abcd::/64"
  8811. Gateway: "2001:db8:abcd::1011"
  8812. Options:
  8813. foo: "bar"
  8814. Internal: true
  8815. Attachable: false
  8816. Ingress: false
  8817. Options:
  8818. com.docker.network.bridge.default_bridge: "true"
  8819. com.docker.network.bridge.enable_icc: "true"
  8820. com.docker.network.bridge.enable_ip_masquerade: "true"
  8821. com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  8822. com.docker.network.bridge.name: "docker0"
  8823. com.docker.network.driver.mtu: "1500"
  8824. Labels:
  8825. com.example.some-label: "some-value"
  8826. com.example.some-other-label: "some-other-value"
  8827. tags: ["Network"]
  8828. /networks/{id}/connect:
  8829. post:
  8830. summary: "Connect a container to a network"
  8831. operationId: "NetworkConnect"
  8832. consumes:
  8833. - "application/json"
  8834. responses:
  8835. 200:
  8836. description: "No error"
  8837. 403:
  8838. description: "Operation not supported for swarm scoped networks"
  8839. schema:
  8840. $ref: "#/definitions/ErrorResponse"
  8841. 404:
  8842. description: "Network or container not found"
  8843. schema:
  8844. $ref: "#/definitions/ErrorResponse"
  8845. 500:
  8846. description: "Server error"
  8847. schema:
  8848. $ref: "#/definitions/ErrorResponse"
  8849. parameters:
  8850. - name: "id"
  8851. in: "path"
  8852. description: "Network ID or name"
  8853. required: true
  8854. type: "string"
  8855. - name: "container"
  8856. in: "body"
  8857. required: true
  8858. schema:
  8859. type: "object"
  8860. properties:
  8861. Container:
  8862. type: "string"
  8863. description: "The ID or name of the container to connect to the network."
  8864. EndpointConfig:
  8865. $ref: "#/definitions/EndpointSettings"
  8866. example:
  8867. Container: "3613f73ba0e4"
  8868. EndpointConfig:
  8869. IPAMConfig:
  8870. IPv4Address: "172.24.56.89"
  8871. IPv6Address: "2001:db8::5689"
  8872. tags: ["Network"]
  8873. /networks/{id}/disconnect:
  8874. post:
  8875. summary: "Disconnect a container from a network"
  8876. operationId: "NetworkDisconnect"
  8877. consumes:
  8878. - "application/json"
  8879. responses:
  8880. 200:
  8881. description: "No error"
  8882. 403:
  8883. description: "Operation not supported for swarm scoped networks"
  8884. schema:
  8885. $ref: "#/definitions/ErrorResponse"
  8886. 404:
  8887. description: "Network or container not found"
  8888. schema:
  8889. $ref: "#/definitions/ErrorResponse"
  8890. 500:
  8891. description: "Server error"
  8892. schema:
  8893. $ref: "#/definitions/ErrorResponse"
  8894. parameters:
  8895. - name: "id"
  8896. in: "path"
  8897. description: "Network ID or name"
  8898. required: true
  8899. type: "string"
  8900. - name: "container"
  8901. in: "body"
  8902. required: true
  8903. schema:
  8904. type: "object"
  8905. properties:
  8906. Container:
  8907. type: "string"
  8908. description: |
  8909. The ID or name of the container to disconnect from the network.
  8910. Force:
  8911. type: "boolean"
  8912. description: |
  8913. Force the container to disconnect from the network.
  8914. tags: ["Network"]
  8915. /networks/prune:
  8916. post:
  8917. summary: "Delete unused networks"
  8918. produces:
  8919. - "application/json"
  8920. operationId: "NetworkPrune"
  8921. parameters:
  8922. - name: "filters"
  8923. in: "query"
  8924. description: |
  8925. Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  8926. Available filters:
  8927. - `until=<timestamp>` Prune networks created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time.
  8928. - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune networks with (or without, in case `label!=...` is used) the specified labels.
  8929. type: "string"
  8930. responses:
  8931. 200:
  8932. description: "No error"
  8933. schema:
  8934. type: "object"
  8935. title: "NetworkPruneResponse"
  8936. properties:
  8937. NetworksDeleted:
  8938. description: "Networks that were deleted"
  8939. type: "array"
  8940. items:
  8941. type: "string"
  8942. 500:
  8943. description: "Server error"
  8944. schema:
  8945. $ref: "#/definitions/ErrorResponse"
  8946. tags: ["Network"]
  8947. /plugins:
  8948. get:
  8949. summary: "List plugins"
  8950. operationId: "PluginList"
  8951. description: "Returns information about installed plugins."
  8952. produces: ["application/json"]
  8953. responses:
  8954. 200:
  8955. description: "No error"
  8956. schema:
  8957. type: "array"
  8958. items:
  8959. $ref: "#/definitions/Plugin"
  8960. 500:
  8961. description: "Server error"
  8962. schema:
  8963. $ref: "#/definitions/ErrorResponse"
  8964. parameters:
  8965. - name: "filters"
  8966. in: "query"
  8967. type: "string"
  8968. description: |
  8969. A JSON encoded value of the filters (a `map[string][]string`) to
  8970. process on the plugin list.
  8971. Available filters:
  8972. - `capability=<capability name>`
  8973. - `enable=<true>|<false>`
  8974. tags: ["Plugin"]
  8975. /plugins/privileges:
  8976. get:
  8977. summary: "Get plugin privileges"
  8978. operationId: "GetPluginPrivileges"
  8979. responses:
  8980. 200:
  8981. description: "no error"
  8982. schema:
  8983. type: "array"
  8984. items:
  8985. description: |
  8986. Describes a permission the user has to accept upon installing
  8987. the plugin.
  8988. type: "object"
  8989. title: "PluginPrivilegeItem"
  8990. properties:
  8991. Name:
  8992. type: "string"
  8993. Description:
  8994. type: "string"
  8995. Value:
  8996. type: "array"
  8997. items:
  8998. type: "string"
  8999. example:
  9000. - Name: "network"
  9001. Description: ""
  9002. Value:
  9003. - "host"
  9004. - Name: "mount"
  9005. Description: ""
  9006. Value:
  9007. - "/data"
  9008. - Name: "device"
  9009. Description: ""
  9010. Value:
  9011. - "/dev/cpu_dma_latency"
  9012. 500:
  9013. description: "server error"
  9014. schema:
  9015. $ref: "#/definitions/ErrorResponse"
  9016. parameters:
  9017. - name: "remote"
  9018. in: "query"
  9019. description: |
  9020. The name of the plugin. The `:latest` tag is optional, and is the
  9021. default if omitted.
  9022. required: true
  9023. type: "string"
  9024. tags:
  9025. - "Plugin"
  9026. /plugins/pull:
  9027. post:
  9028. summary: "Install a plugin"
  9029. operationId: "PluginPull"
  9030. description: |
  9031. Pulls and installs a plugin. After the plugin is installed, it can be
  9032. enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable).
  9033. produces:
  9034. - "application/json"
  9035. responses:
  9036. 204:
  9037. description: "no error"
  9038. 500:
  9039. description: "server error"
  9040. schema:
  9041. $ref: "#/definitions/ErrorResponse"
  9042. parameters:
  9043. - name: "remote"
  9044. in: "query"
  9045. description: |
  9046. Remote reference for plugin to install.
  9047. The `:latest` tag is optional, and is used as the default if omitted.
  9048. required: true
  9049. type: "string"
  9050. - name: "name"
  9051. in: "query"
  9052. description: |
  9053. Local name for the pulled plugin.
  9054. The `:latest` tag is optional, and is used as the default if omitted.
  9055. required: false
  9056. type: "string"
  9057. - name: "X-Registry-Auth"
  9058. in: "header"
  9059. description: |
  9060. A base64url-encoded auth configuration to use when pulling a plugin
  9061. from a registry.
  9062. Refer to the [authentication section](#section/Authentication) for
  9063. details.
  9064. type: "string"
  9065. - name: "body"
  9066. in: "body"
  9067. schema:
  9068. type: "array"
  9069. items:
  9070. description: |
  9071. Describes a permission accepted by the user upon installing the
  9072. plugin.
  9073. type: "object"
  9074. properties:
  9075. Name:
  9076. type: "string"
  9077. Description:
  9078. type: "string"
  9079. Value:
  9080. type: "array"
  9081. items:
  9082. type: "string"
  9083. example:
  9084. - Name: "network"
  9085. Description: ""
  9086. Value:
  9087. - "host"
  9088. - Name: "mount"
  9089. Description: ""
  9090. Value:
  9091. - "/data"
  9092. - Name: "device"
  9093. Description: ""
  9094. Value:
  9095. - "/dev/cpu_dma_latency"
  9096. tags: ["Plugin"]
  9097. /plugins/{name}/json:
  9098. get:
  9099. summary: "Inspect a plugin"
  9100. operationId: "PluginInspect"
  9101. responses:
  9102. 200:
  9103. description: "no error"
  9104. schema:
  9105. $ref: "#/definitions/Plugin"
  9106. 404:
  9107. description: "plugin is not installed"
  9108. schema:
  9109. $ref: "#/definitions/ErrorResponse"
  9110. 500:
  9111. description: "server error"
  9112. schema:
  9113. $ref: "#/definitions/ErrorResponse"
  9114. parameters:
  9115. - name: "name"
  9116. in: "path"
  9117. description: |
  9118. The name of the plugin. The `:latest` tag is optional, and is the
  9119. default if omitted.
  9120. required: true
  9121. type: "string"
  9122. tags: ["Plugin"]
  9123. /plugins/{name}:
  9124. delete:
  9125. summary: "Remove a plugin"
  9126. operationId: "PluginDelete"
  9127. responses:
  9128. 200:
  9129. description: "no error"
  9130. schema:
  9131. $ref: "#/definitions/Plugin"
  9132. 404:
  9133. description: "plugin is not installed"
  9134. schema:
  9135. $ref: "#/definitions/ErrorResponse"
  9136. 500:
  9137. description: "server error"
  9138. schema:
  9139. $ref: "#/definitions/ErrorResponse"
  9140. parameters:
  9141. - name: "name"
  9142. in: "path"
  9143. description: |
  9144. The name of the plugin. The `:latest` tag is optional, and is the
  9145. default if omitted.
  9146. required: true
  9147. type: "string"
  9148. - name: "force"
  9149. in: "query"
  9150. description: |
  9151. Disable the plugin before removing. This may result in issues if the
  9152. plugin is in use by a container.
  9153. type: "boolean"
  9154. default: false
  9155. tags: ["Plugin"]
  9156. /plugins/{name}/enable:
  9157. post:
  9158. summary: "Enable a plugin"
  9159. operationId: "PluginEnable"
  9160. responses:
  9161. 200:
  9162. description: "no error"
  9163. 404:
  9164. description: "plugin is not installed"
  9165. schema:
  9166. $ref: "#/definitions/ErrorResponse"
  9167. 500:
  9168. description: "server error"
  9169. schema:
  9170. $ref: "#/definitions/ErrorResponse"
  9171. parameters:
  9172. - name: "name"
  9173. in: "path"
  9174. description: |
  9175. The name of the plugin. The `:latest` tag is optional, and is the
  9176. default if omitted.
  9177. required: true
  9178. type: "string"
  9179. - name: "timeout"
  9180. in: "query"
  9181. description: "Set the HTTP client timeout (in seconds)"
  9182. type: "integer"
  9183. default: 0
  9184. tags: ["Plugin"]
  9185. /plugins/{name}/disable:
  9186. post:
  9187. summary: "Disable a plugin"
  9188. operationId: "PluginDisable"
  9189. responses:
  9190. 200:
  9191. description: "no error"
  9192. 404:
  9193. description: "plugin is not installed"
  9194. schema:
  9195. $ref: "#/definitions/ErrorResponse"
  9196. 500:
  9197. description: "server error"
  9198. schema:
  9199. $ref: "#/definitions/ErrorResponse"
  9200. parameters:
  9201. - name: "name"
  9202. in: "path"
  9203. description: |
  9204. The name of the plugin. The `:latest` tag is optional, and is the
  9205. default if omitted.
  9206. required: true
  9207. type: "string"
  9208. tags: ["Plugin"]
  9209. /plugins/{name}/upgrade:
  9210. post:
  9211. summary: "Upgrade a plugin"
  9212. operationId: "PluginUpgrade"
  9213. responses:
  9214. 204:
  9215. description: "no error"
  9216. 404:
  9217. description: "plugin not installed"
  9218. schema:
  9219. $ref: "#/definitions/ErrorResponse"
  9220. 500:
  9221. description: "server error"
  9222. schema:
  9223. $ref: "#/definitions/ErrorResponse"
  9224. parameters:
  9225. - name: "name"
  9226. in: "path"
  9227. description: |
  9228. The name of the plugin. The `:latest` tag is optional, and is the
  9229. default if omitted.
  9230. required: true
  9231. type: "string"
  9232. - name: "remote"
  9233. in: "query"
  9234. description: |
  9235. Remote reference to upgrade to.
  9236. The `:latest` tag is optional, and is used as the default if omitted.
  9237. required: true
  9238. type: "string"
  9239. - name: "X-Registry-Auth"
  9240. in: "header"
  9241. description: |
  9242. A base64url-encoded auth configuration to use when pulling a plugin
  9243. from a registry.
  9244. Refer to the [authentication section](#section/Authentication) for
  9245. details.
  9246. type: "string"
  9247. - name: "body"
  9248. in: "body"
  9249. schema:
  9250. type: "array"
  9251. items:
  9252. description: |
  9253. Describes a permission accepted by the user upon installing the
  9254. plugin.
  9255. type: "object"
  9256. properties:
  9257. Name:
  9258. type: "string"
  9259. Description:
  9260. type: "string"
  9261. Value:
  9262. type: "array"
  9263. items:
  9264. type: "string"
  9265. example:
  9266. - Name: "network"
  9267. Description: ""
  9268. Value:
  9269. - "host"
  9270. - Name: "mount"
  9271. Description: ""
  9272. Value:
  9273. - "/data"
  9274. - Name: "device"
  9275. Description: ""
  9276. Value:
  9277. - "/dev/cpu_dma_latency"
  9278. tags: ["Plugin"]
  9279. /plugins/create:
  9280. post:
  9281. summary: "Create a plugin"
  9282. operationId: "PluginCreate"
  9283. consumes:
  9284. - "application/x-tar"
  9285. responses:
  9286. 204:
  9287. description: "no error"
  9288. 500:
  9289. description: "server error"
  9290. schema:
  9291. $ref: "#/definitions/ErrorResponse"
  9292. parameters:
  9293. - name: "name"
  9294. in: "query"
  9295. description: |
  9296. The name of the plugin. The `:latest` tag is optional, and is the
  9297. default if omitted.
  9298. required: true
  9299. type: "string"
  9300. - name: "tarContext"
  9301. in: "body"
  9302. description: "Path to tar containing plugin rootfs and manifest"
  9303. schema:
  9304. type: "string"
  9305. format: "binary"
  9306. tags: ["Plugin"]
  9307. /plugins/{name}/push:
  9308. post:
  9309. summary: "Push a plugin"
  9310. operationId: "PluginPush"
  9311. description: |
  9312. Push a plugin to the registry.
  9313. parameters:
  9314. - name: "name"
  9315. in: "path"
  9316. description: |
  9317. The name of the plugin. The `:latest` tag is optional, and is the
  9318. default if omitted.
  9319. required: true
  9320. type: "string"
  9321. responses:
  9322. 200:
  9323. description: "no error"
  9324. 404:
  9325. description: "plugin not installed"
  9326. schema:
  9327. $ref: "#/definitions/ErrorResponse"
  9328. 500:
  9329. description: "server error"
  9330. schema:
  9331. $ref: "#/definitions/ErrorResponse"
  9332. tags: ["Plugin"]
  9333. /plugins/{name}/set:
  9334. post:
  9335. summary: "Configure a plugin"
  9336. operationId: "PluginSet"
  9337. consumes:
  9338. - "application/json"
  9339. parameters:
  9340. - name: "name"
  9341. in: "path"
  9342. description: |
  9343. The name of the plugin. The `:latest` tag is optional, and is the
  9344. default if omitted.
  9345. required: true
  9346. type: "string"
  9347. - name: "body"
  9348. in: "body"
  9349. schema:
  9350. type: "array"
  9351. items:
  9352. type: "string"
  9353. example: ["DEBUG=1"]
  9354. responses:
  9355. 204:
  9356. description: "No error"
  9357. 404:
  9358. description: "Plugin not installed"
  9359. schema:
  9360. $ref: "#/definitions/ErrorResponse"
  9361. 500:
  9362. description: "Server error"
  9363. schema:
  9364. $ref: "#/definitions/ErrorResponse"
  9365. tags: ["Plugin"]
  9366. /nodes:
  9367. get:
  9368. summary: "List nodes"
  9369. operationId: "NodeList"
  9370. responses:
  9371. 200:
  9372. description: "no error"
  9373. schema:
  9374. type: "array"
  9375. items:
  9376. $ref: "#/definitions/Node"
  9377. 500:
  9378. description: "server error"
  9379. schema:
  9380. $ref: "#/definitions/ErrorResponse"
  9381. 503:
  9382. description: "node is not part of a swarm"
  9383. schema:
  9384. $ref: "#/definitions/ErrorResponse"
  9385. parameters:
  9386. - name: "filters"
  9387. in: "query"
  9388. description: |
  9389. Filters to process on the nodes list, encoded as JSON (a `map[string][]string`).
  9390. Available filters:
  9391. - `id=<node id>`
  9392. - `label=<engine label>`
  9393. - `membership=`(`accepted`|`pending`)`
  9394. - `name=<node name>`
  9395. - `node.label=<node label>`
  9396. - `role=`(`manager`|`worker`)`
  9397. type: "string"
  9398. tags: ["Node"]
  9399. /nodes/{id}:
  9400. get:
  9401. summary: "Inspect a node"
  9402. operationId: "NodeInspect"
  9403. responses:
  9404. 200:
  9405. description: "no error"
  9406. schema:
  9407. $ref: "#/definitions/Node"
  9408. 404:
  9409. description: "no such node"
  9410. schema:
  9411. $ref: "#/definitions/ErrorResponse"
  9412. 500:
  9413. description: "server error"
  9414. schema:
  9415. $ref: "#/definitions/ErrorResponse"
  9416. 503:
  9417. description: "node is not part of a swarm"
  9418. schema:
  9419. $ref: "#/definitions/ErrorResponse"
  9420. parameters:
  9421. - name: "id"
  9422. in: "path"
  9423. description: "The ID or name of the node"
  9424. type: "string"
  9425. required: true
  9426. tags: ["Node"]
  9427. delete:
  9428. summary: "Delete a node"
  9429. operationId: "NodeDelete"
  9430. responses:
  9431. 200:
  9432. description: "no error"
  9433. 404:
  9434. description: "no such node"
  9435. schema:
  9436. $ref: "#/definitions/ErrorResponse"
  9437. 500:
  9438. description: "server error"
  9439. schema:
  9440. $ref: "#/definitions/ErrorResponse"
  9441. 503:
  9442. description: "node is not part of a swarm"
  9443. schema:
  9444. $ref: "#/definitions/ErrorResponse"
  9445. parameters:
  9446. - name: "id"
  9447. in: "path"
  9448. description: "The ID or name of the node"
  9449. type: "string"
  9450. required: true
  9451. - name: "force"
  9452. in: "query"
  9453. description: "Force remove a node from the swarm"
  9454. default: false
  9455. type: "boolean"
  9456. tags: ["Node"]
  9457. /nodes/{id}/update:
  9458. post:
  9459. summary: "Update a node"
  9460. operationId: "NodeUpdate"
  9461. responses:
  9462. 200:
  9463. description: "no error"
  9464. 400:
  9465. description: "bad parameter"
  9466. schema:
  9467. $ref: "#/definitions/ErrorResponse"
  9468. 404:
  9469. description: "no such node"
  9470. schema:
  9471. $ref: "#/definitions/ErrorResponse"
  9472. 500:
  9473. description: "server error"
  9474. schema:
  9475. $ref: "#/definitions/ErrorResponse"
  9476. 503:
  9477. description: "node is not part of a swarm"
  9478. schema:
  9479. $ref: "#/definitions/ErrorResponse"
  9480. parameters:
  9481. - name: "id"
  9482. in: "path"
  9483. description: "The ID of the node"
  9484. type: "string"
  9485. required: true
  9486. - name: "body"
  9487. in: "body"
  9488. schema:
  9489. $ref: "#/definitions/NodeSpec"
  9490. - name: "version"
  9491. in: "query"
  9492. description: |
  9493. The version number of the node object being updated. This is required
  9494. to avoid conflicting writes.
  9495. type: "integer"
  9496. format: "int64"
  9497. required: true
  9498. tags: ["Node"]
  9499. /swarm:
  9500. get:
  9501. summary: "Inspect swarm"
  9502. operationId: "SwarmInspect"
  9503. responses:
  9504. 200:
  9505. description: "no error"
  9506. schema:
  9507. $ref: "#/definitions/Swarm"
  9508. 404:
  9509. description: "no such swarm"
  9510. schema:
  9511. $ref: "#/definitions/ErrorResponse"
  9512. 500:
  9513. description: "server error"
  9514. schema:
  9515. $ref: "#/definitions/ErrorResponse"
  9516. 503:
  9517. description: "node is not part of a swarm"
  9518. schema:
  9519. $ref: "#/definitions/ErrorResponse"
  9520. tags: ["Swarm"]
  9521. /swarm/init:
  9522. post:
  9523. summary: "Initialize a new swarm"
  9524. operationId: "SwarmInit"
  9525. produces:
  9526. - "application/json"
  9527. - "text/plain"
  9528. responses:
  9529. 200:
  9530. description: "no error"
  9531. schema:
  9532. description: "The node ID"
  9533. type: "string"
  9534. example: "7v2t30z9blmxuhnyo6s4cpenp"
  9535. 400:
  9536. description: "bad parameter"
  9537. schema:
  9538. $ref: "#/definitions/ErrorResponse"
  9539. 500:
  9540. description: "server error"
  9541. schema:
  9542. $ref: "#/definitions/ErrorResponse"
  9543. 503:
  9544. description: "node is already part of a swarm"
  9545. schema:
  9546. $ref: "#/definitions/ErrorResponse"
  9547. parameters:
  9548. - name: "body"
  9549. in: "body"
  9550. required: true
  9551. schema:
  9552. type: "object"
  9553. properties:
  9554. ListenAddr:
  9555. description: |
  9556. Listen address used for inter-manager communication, as well
  9557. as determining the networking interface used for the VXLAN
  9558. Tunnel Endpoint (VTEP). This can either be an address/port
  9559. combination in the form `192.168.1.1:4567`, or an interface
  9560. followed by a port number, like `eth0:4567`. If the port number
  9561. is omitted, the default swarm listening port is used.
  9562. type: "string"
  9563. AdvertiseAddr:
  9564. description: |
  9565. Externally reachable address advertised to other nodes. This
  9566. can either be an address/port combination in the form
  9567. `192.168.1.1:4567`, or an interface followed by a port number,
  9568. like `eth0:4567`. If the port number is omitted, the port
  9569. number from the listen address is used. If `AdvertiseAddr` is
  9570. not specified, it will be automatically detected when possible.
  9571. type: "string"
  9572. DataPathAddr:
  9573. description: |
  9574. Address or interface to use for data path traffic (format:
  9575. `<ip|interface>`), for example, `192.168.1.1`, or an interface,
  9576. like `eth0`. If `DataPathAddr` is unspecified, the same address
  9577. as `AdvertiseAddr` is used.
  9578. The `DataPathAddr` specifies the address that global scope
  9579. network drivers will publish towards other nodes in order to
  9580. reach the containers running on this node. Using this parameter
  9581. it is possible to separate the container data traffic from the
  9582. management traffic of the cluster.
  9583. type: "string"
  9584. DataPathPort:
  9585. description: |
  9586. DataPathPort specifies the data path port number for data traffic.
  9587. Acceptable port range is 1024 to 49151.
  9588. if no port is set or is set to 0, default port 4789 will be used.
  9589. type: "integer"
  9590. format: "uint32"
  9591. DefaultAddrPool:
  9592. description: |
  9593. Default Address Pool specifies default subnet pools for global
  9594. scope networks.
  9595. type: "array"
  9596. items:
  9597. type: "string"
  9598. example: ["10.10.0.0/16", "20.20.0.0/16"]
  9599. ForceNewCluster:
  9600. description: "Force creation of a new swarm."
  9601. type: "boolean"
  9602. SubnetSize:
  9603. description: |
  9604. SubnetSize specifies the subnet size of the networks created
  9605. from the default subnet pool.
  9606. type: "integer"
  9607. format: "uint32"
  9608. Spec:
  9609. $ref: "#/definitions/SwarmSpec"
  9610. example:
  9611. ListenAddr: "0.0.0.0:2377"
  9612. AdvertiseAddr: "192.168.1.1:2377"
  9613. DataPathPort: 4789
  9614. DefaultAddrPool: ["10.10.0.0/8", "20.20.0.0/8"]
  9615. SubnetSize: 24
  9616. ForceNewCluster: false
  9617. Spec:
  9618. Orchestration: {}
  9619. Raft: {}
  9620. Dispatcher: {}
  9621. CAConfig: {}
  9622. EncryptionConfig:
  9623. AutoLockManagers: false
  9624. tags: ["Swarm"]
  9625. /swarm/join:
  9626. post:
  9627. summary: "Join an existing swarm"
  9628. operationId: "SwarmJoin"
  9629. responses:
  9630. 200:
  9631. description: "no error"
  9632. 400:
  9633. description: "bad parameter"
  9634. schema:
  9635. $ref: "#/definitions/ErrorResponse"
  9636. 500:
  9637. description: "server error"
  9638. schema:
  9639. $ref: "#/definitions/ErrorResponse"
  9640. 503:
  9641. description: "node is already part of a swarm"
  9642. schema:
  9643. $ref: "#/definitions/ErrorResponse"
  9644. parameters:
  9645. - name: "body"
  9646. in: "body"
  9647. required: true
  9648. schema:
  9649. type: "object"
  9650. properties:
  9651. ListenAddr:
  9652. description: |
  9653. Listen address used for inter-manager communication if the node
  9654. gets promoted to manager, as well as determining the networking
  9655. interface used for the VXLAN Tunnel Endpoint (VTEP).
  9656. type: "string"
  9657. AdvertiseAddr:
  9658. description: |
  9659. Externally reachable address advertised to other nodes. This
  9660. can either be an address/port combination in the form
  9661. `192.168.1.1:4567`, or an interface followed by a port number,
  9662. like `eth0:4567`. If the port number is omitted, the port
  9663. number from the listen address is used. If `AdvertiseAddr` is
  9664. not specified, it will be automatically detected when possible.
  9665. type: "string"
  9666. DataPathAddr:
  9667. description: |
  9668. Address or interface to use for data path traffic (format:
  9669. `<ip|interface>`), for example, `192.168.1.1`, or an interface,
  9670. like `eth0`. If `DataPathAddr` is unspecified, the same address
  9671. as `AdvertiseAddr` is used.
  9672. The `DataPathAddr` specifies the address that global scope
  9673. network drivers will publish towards other nodes in order to
  9674. reach the containers running on this node. Using this parameter
  9675. it is possible to separate the container data traffic from the
  9676. management traffic of the cluster.
  9677. type: "string"
  9678. RemoteAddrs:
  9679. description: |
  9680. Addresses of manager nodes already participating in the swarm.
  9681. type: "array"
  9682. items:
  9683. type: "string"
  9684. JoinToken:
  9685. description: "Secret token for joining this swarm."
  9686. type: "string"
  9687. example:
  9688. ListenAddr: "0.0.0.0:2377"
  9689. AdvertiseAddr: "192.168.1.1:2377"
  9690. RemoteAddrs:
  9691. - "node1:2377"
  9692. JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2"
  9693. tags: ["Swarm"]
  9694. /swarm/leave:
  9695. post:
  9696. summary: "Leave a swarm"
  9697. operationId: "SwarmLeave"
  9698. responses:
  9699. 200:
  9700. description: "no error"
  9701. 500:
  9702. description: "server error"
  9703. schema:
  9704. $ref: "#/definitions/ErrorResponse"
  9705. 503:
  9706. description: "node is not part of a swarm"
  9707. schema:
  9708. $ref: "#/definitions/ErrorResponse"
  9709. parameters:
  9710. - name: "force"
  9711. description: |
  9712. Force leave swarm, even if this is the last manager or that it will
  9713. break the cluster.
  9714. in: "query"
  9715. type: "boolean"
  9716. default: false
  9717. tags: ["Swarm"]
  9718. /swarm/update:
  9719. post:
  9720. summary: "Update a swarm"
  9721. operationId: "SwarmUpdate"
  9722. responses:
  9723. 200:
  9724. description: "no error"
  9725. 400:
  9726. description: "bad parameter"
  9727. schema:
  9728. $ref: "#/definitions/ErrorResponse"
  9729. 500:
  9730. description: "server error"
  9731. schema:
  9732. $ref: "#/definitions/ErrorResponse"
  9733. 503:
  9734. description: "node is not part of a swarm"
  9735. schema:
  9736. $ref: "#/definitions/ErrorResponse"
  9737. parameters:
  9738. - name: "body"
  9739. in: "body"
  9740. required: true
  9741. schema:
  9742. $ref: "#/definitions/SwarmSpec"
  9743. - name: "version"
  9744. in: "query"
  9745. description: |
  9746. The version number of the swarm object being updated. This is
  9747. required to avoid conflicting writes.
  9748. type: "integer"
  9749. format: "int64"
  9750. required: true
  9751. - name: "rotateWorkerToken"
  9752. in: "query"
  9753. description: "Rotate the worker join token."
  9754. type: "boolean"
  9755. default: false
  9756. - name: "rotateManagerToken"
  9757. in: "query"
  9758. description: "Rotate the manager join token."
  9759. type: "boolean"
  9760. default: false
  9761. - name: "rotateManagerUnlockKey"
  9762. in: "query"
  9763. description: "Rotate the manager unlock key."
  9764. type: "boolean"
  9765. default: false
  9766. tags: ["Swarm"]
  9767. /swarm/unlockkey:
  9768. get:
  9769. summary: "Get the unlock key"
  9770. operationId: "SwarmUnlockkey"
  9771. consumes:
  9772. - "application/json"
  9773. responses:
  9774. 200:
  9775. description: "no error"
  9776. schema:
  9777. type: "object"
  9778. title: "UnlockKeyResponse"
  9779. properties:
  9780. UnlockKey:
  9781. description: "The swarm's unlock key."
  9782. type: "string"
  9783. example:
  9784. UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
  9785. 500:
  9786. description: "server error"
  9787. schema:
  9788. $ref: "#/definitions/ErrorResponse"
  9789. 503:
  9790. description: "node is not part of a swarm"
  9791. schema:
  9792. $ref: "#/definitions/ErrorResponse"
  9793. tags: ["Swarm"]
  9794. /swarm/unlock:
  9795. post:
  9796. summary: "Unlock a locked manager"
  9797. operationId: "SwarmUnlock"
  9798. consumes:
  9799. - "application/json"
  9800. produces:
  9801. - "application/json"
  9802. parameters:
  9803. - name: "body"
  9804. in: "body"
  9805. required: true
  9806. schema:
  9807. type: "object"
  9808. properties:
  9809. UnlockKey:
  9810. description: "The swarm's unlock key."
  9811. type: "string"
  9812. example:
  9813. UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
  9814. responses:
  9815. 200:
  9816. description: "no error"
  9817. 500:
  9818. description: "server error"
  9819. schema:
  9820. $ref: "#/definitions/ErrorResponse"
  9821. 503:
  9822. description: "node is not part of a swarm"
  9823. schema:
  9824. $ref: "#/definitions/ErrorResponse"
  9825. tags: ["Swarm"]
  9826. /services:
  9827. get:
  9828. summary: "List services"
  9829. operationId: "ServiceList"
  9830. responses:
  9831. 200:
  9832. description: "no error"
  9833. schema:
  9834. type: "array"
  9835. items:
  9836. $ref: "#/definitions/Service"
  9837. 500:
  9838. description: "server error"
  9839. schema:
  9840. $ref: "#/definitions/ErrorResponse"
  9841. 503:
  9842. description: "node is not part of a swarm"
  9843. schema:
  9844. $ref: "#/definitions/ErrorResponse"
  9845. parameters:
  9846. - name: "filters"
  9847. in: "query"
  9848. type: "string"
  9849. description: |
  9850. A JSON encoded value of the filters (a `map[string][]string`) to
  9851. process on the services list.
  9852. Available filters:
  9853. - `id=<service id>`
  9854. - `label=<service label>`
  9855. - `mode=["replicated"|"global"]`
  9856. - `name=<service name>`
  9857. - name: "status"
  9858. in: "query"
  9859. type: "boolean"
  9860. description: |
  9861. Include service status, with count of running and desired tasks.
  9862. tags: ["Service"]
  9863. /services/create:
  9864. post:
  9865. summary: "Create a service"
  9866. operationId: "ServiceCreate"
  9867. consumes:
  9868. - "application/json"
  9869. produces:
  9870. - "application/json"
  9871. responses:
  9872. 201:
  9873. description: "no error"
  9874. schema:
  9875. type: "object"
  9876. title: "ServiceCreateResponse"
  9877. properties:
  9878. ID:
  9879. description: "The ID of the created service."
  9880. type: "string"
  9881. Warning:
  9882. description: "Optional warning message"
  9883. type: "string"
  9884. example:
  9885. ID: "ak7w3gjqoa3kuz8xcpnyy0pvl"
  9886. Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"
  9887. 400:
  9888. description: "bad parameter"
  9889. schema:
  9890. $ref: "#/definitions/ErrorResponse"
  9891. 403:
  9892. description: "network is not eligible for services"
  9893. schema:
  9894. $ref: "#/definitions/ErrorResponse"
  9895. 409:
  9896. description: "name conflicts with an existing service"
  9897. schema:
  9898. $ref: "#/definitions/ErrorResponse"
  9899. 500:
  9900. description: "server error"
  9901. schema:
  9902. $ref: "#/definitions/ErrorResponse"
  9903. 503:
  9904. description: "node is not part of a swarm"
  9905. schema:
  9906. $ref: "#/definitions/ErrorResponse"
  9907. parameters:
  9908. - name: "body"
  9909. in: "body"
  9910. required: true
  9911. schema:
  9912. allOf:
  9913. - $ref: "#/definitions/ServiceSpec"
  9914. - type: "object"
  9915. example:
  9916. Name: "web"
  9917. TaskTemplate:
  9918. ContainerSpec:
  9919. Image: "nginx:alpine"
  9920. Mounts:
  9921. -
  9922. ReadOnly: true
  9923. Source: "web-data"
  9924. Target: "/usr/share/nginx/html"
  9925. Type: "volume"
  9926. VolumeOptions:
  9927. DriverConfig: {}
  9928. Labels:
  9929. com.example.something: "something-value"
  9930. Hosts: ["10.10.10.10 host1", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"]
  9931. User: "33"
  9932. DNSConfig:
  9933. Nameservers: ["8.8.8.8"]
  9934. Search: ["example.org"]
  9935. Options: ["timeout:3"]
  9936. Secrets:
  9937. -
  9938. File:
  9939. Name: "www.example.org.key"
  9940. UID: "33"
  9941. GID: "33"
  9942. Mode: 384
  9943. SecretID: "fpjqlhnwb19zds35k8wn80lq9"
  9944. SecretName: "example_org_domain_key"
  9945. LogDriver:
  9946. Name: "json-file"
  9947. Options:
  9948. max-file: "3"
  9949. max-size: "10M"
  9950. Placement: {}
  9951. Resources:
  9952. Limits:
  9953. MemoryBytes: 104857600
  9954. Reservations: {}
  9955. RestartPolicy:
  9956. Condition: "on-failure"
  9957. Delay: 10000000000
  9958. MaxAttempts: 10
  9959. Mode:
  9960. Replicated:
  9961. Replicas: 4
  9962. UpdateConfig:
  9963. Parallelism: 2
  9964. Delay: 1000000000
  9965. FailureAction: "pause"
  9966. Monitor: 15000000000
  9967. MaxFailureRatio: 0.15
  9968. RollbackConfig:
  9969. Parallelism: 1
  9970. Delay: 1000000000
  9971. FailureAction: "pause"
  9972. Monitor: 15000000000
  9973. MaxFailureRatio: 0.15
  9974. EndpointSpec:
  9975. Ports:
  9976. -
  9977. Protocol: "tcp"
  9978. PublishedPort: 8080
  9979. TargetPort: 80
  9980. Labels:
  9981. foo: "bar"
  9982. - name: "X-Registry-Auth"
  9983. in: "header"
  9984. description: |
  9985. A base64url-encoded auth configuration for pulling from private
  9986. registries.
  9987. Refer to the [authentication section](#section/Authentication) for
  9988. details.
  9989. type: "string"
  9990. tags: ["Service"]
  9991. /services/{id}:
  9992. get:
  9993. summary: "Inspect a service"
  9994. operationId: "ServiceInspect"
  9995. responses:
  9996. 200:
  9997. description: "no error"
  9998. schema:
  9999. $ref: "#/definitions/Service"
  10000. 404:
  10001. description: "no such service"
  10002. schema:
  10003. $ref: "#/definitions/ErrorResponse"
  10004. 500:
  10005. description: "server error"
  10006. schema:
  10007. $ref: "#/definitions/ErrorResponse"
  10008. 503:
  10009. description: "node is not part of a swarm"
  10010. schema:
  10011. $ref: "#/definitions/ErrorResponse"
  10012. parameters:
  10013. - name: "id"
  10014. in: "path"
  10015. description: "ID or name of service."
  10016. required: true
  10017. type: "string"
  10018. - name: "insertDefaults"
  10019. in: "query"
  10020. description: "Fill empty fields with default values."
  10021. type: "boolean"
  10022. default: false
  10023. tags: ["Service"]
  10024. delete:
  10025. summary: "Delete a service"
  10026. operationId: "ServiceDelete"
  10027. responses:
  10028. 200:
  10029. description: "no error"
  10030. 404:
  10031. description: "no such service"
  10032. schema:
  10033. $ref: "#/definitions/ErrorResponse"
  10034. 500:
  10035. description: "server error"
  10036. schema:
  10037. $ref: "#/definitions/ErrorResponse"
  10038. 503:
  10039. description: "node is not part of a swarm"
  10040. schema:
  10041. $ref: "#/definitions/ErrorResponse"
  10042. parameters:
  10043. - name: "id"
  10044. in: "path"
  10045. description: "ID or name of service."
  10046. required: true
  10047. type: "string"
  10048. tags: ["Service"]
  10049. /services/{id}/update:
  10050. post:
  10051. summary: "Update a service"
  10052. operationId: "ServiceUpdate"
  10053. consumes: ["application/json"]
  10054. produces: ["application/json"]
  10055. responses:
  10056. 200:
  10057. description: "no error"
  10058. schema:
  10059. $ref: "#/definitions/ServiceUpdateResponse"
  10060. 400:
  10061. description: "bad parameter"
  10062. schema:
  10063. $ref: "#/definitions/ErrorResponse"
  10064. 404:
  10065. description: "no such service"
  10066. schema:
  10067. $ref: "#/definitions/ErrorResponse"
  10068. 500:
  10069. description: "server error"
  10070. schema:
  10071. $ref: "#/definitions/ErrorResponse"
  10072. 503:
  10073. description: "node is not part of a swarm"
  10074. schema:
  10075. $ref: "#/definitions/ErrorResponse"
  10076. parameters:
  10077. - name: "id"
  10078. in: "path"
  10079. description: "ID or name of service."
  10080. required: true
  10081. type: "string"
  10082. - name: "body"
  10083. in: "body"
  10084. required: true
  10085. schema:
  10086. allOf:
  10087. - $ref: "#/definitions/ServiceSpec"
  10088. - type: "object"
  10089. example:
  10090. Name: "top"
  10091. TaskTemplate:
  10092. ContainerSpec:
  10093. Image: "busybox"
  10094. Args:
  10095. - "top"
  10096. Resources:
  10097. Limits: {}
  10098. Reservations: {}
  10099. RestartPolicy:
  10100. Condition: "any"
  10101. MaxAttempts: 0
  10102. Placement: {}
  10103. ForceUpdate: 0
  10104. Mode:
  10105. Replicated:
  10106. Replicas: 1
  10107. UpdateConfig:
  10108. Parallelism: 2
  10109. Delay: 1000000000
  10110. FailureAction: "pause"
  10111. Monitor: 15000000000
  10112. MaxFailureRatio: 0.15
  10113. RollbackConfig:
  10114. Parallelism: 1
  10115. Delay: 1000000000
  10116. FailureAction: "pause"
  10117. Monitor: 15000000000
  10118. MaxFailureRatio: 0.15
  10119. EndpointSpec:
  10120. Mode: "vip"
  10121. - name: "version"
  10122. in: "query"
  10123. description: |
  10124. The version number of the service object being updated. This is
  10125. required to avoid conflicting writes.
  10126. This version number should be the value as currently set on the
  10127. service *before* the update. You can find the current version by
  10128. calling `GET /services/{id}`
  10129. required: true
  10130. type: "integer"
  10131. - name: "registryAuthFrom"
  10132. in: "query"
  10133. description: |
  10134. If the `X-Registry-Auth` header is not specified, this parameter
  10135. indicates where to find registry authorization credentials.
  10136. type: "string"
  10137. enum: ["spec", "previous-spec"]
  10138. default: "spec"
  10139. - name: "rollback"
  10140. in: "query"
  10141. description: |
  10142. Set to this parameter to `previous` to cause a server-side rollback
  10143. to the previous service spec. The supplied spec will be ignored in
  10144. this case.
  10145. type: "string"
  10146. - name: "X-Registry-Auth"
  10147. in: "header"
  10148. description: |
  10149. A base64url-encoded auth configuration for pulling from private
  10150. registries.
  10151. Refer to the [authentication section](#section/Authentication) for
  10152. details.
  10153. type: "string"
  10154. tags: ["Service"]
  10155. /services/{id}/logs:
  10156. get:
  10157. summary: "Get service logs"
  10158. description: |
  10159. Get `stdout` and `stderr` logs from a service. See also
  10160. [`/containers/{id}/logs`](#operation/ContainerLogs).
  10161. **Note**: This endpoint works only for services with the `local`,
  10162. `json-file` or `journald` logging drivers.
  10163. operationId: "ServiceLogs"
  10164. responses:
  10165. 200:
  10166. description: "logs returned as a stream in response body"
  10167. schema:
  10168. type: "string"
  10169. format: "binary"
  10170. 404:
  10171. description: "no such service"
  10172. schema:
  10173. $ref: "#/definitions/ErrorResponse"
  10174. examples:
  10175. application/json:
  10176. message: "No such service: c2ada9df5af8"
  10177. 500:
  10178. description: "server error"
  10179. schema:
  10180. $ref: "#/definitions/ErrorResponse"
  10181. 503:
  10182. description: "node is not part of a swarm"
  10183. schema:
  10184. $ref: "#/definitions/ErrorResponse"
  10185. parameters:
  10186. - name: "id"
  10187. in: "path"
  10188. required: true
  10189. description: "ID or name of the service"
  10190. type: "string"
  10191. - name: "details"
  10192. in: "query"
  10193. description: "Show service context and extra details provided to logs."
  10194. type: "boolean"
  10195. default: false
  10196. - name: "follow"
  10197. in: "query"
  10198. description: "Keep connection after returning logs."
  10199. type: "boolean"
  10200. default: false
  10201. - name: "stdout"
  10202. in: "query"
  10203. description: "Return logs from `stdout`"
  10204. type: "boolean"
  10205. default: false
  10206. - name: "stderr"
  10207. in: "query"
  10208. description: "Return logs from `stderr`"
  10209. type: "boolean"
  10210. default: false
  10211. - name: "since"
  10212. in: "query"
  10213. description: "Only return logs since this time, as a UNIX timestamp"
  10214. type: "integer"
  10215. default: 0
  10216. - name: "timestamps"
  10217. in: "query"
  10218. description: "Add timestamps to every log line"
  10219. type: "boolean"
  10220. default: false
  10221. - name: "tail"
  10222. in: "query"
  10223. description: |
  10224. Only return this number of log lines from the end of the logs.
  10225. Specify as an integer or `all` to output all log lines.
  10226. type: "string"
  10227. default: "all"
  10228. tags: ["Service"]
  10229. /tasks:
  10230. get:
  10231. summary: "List tasks"
  10232. operationId: "TaskList"
  10233. produces:
  10234. - "application/json"
  10235. responses:
  10236. 200:
  10237. description: "no error"
  10238. schema:
  10239. type: "array"
  10240. items:
  10241. $ref: "#/definitions/Task"
  10242. example:
  10243. - ID: "0kzzo1i0y4jz6027t0k7aezc7"
  10244. Version:
  10245. Index: 71
  10246. CreatedAt: "2016-06-07T21:07:31.171892745Z"
  10247. UpdatedAt: "2016-06-07T21:07:31.376370513Z"
  10248. Spec:
  10249. ContainerSpec:
  10250. Image: "redis"
  10251. Resources:
  10252. Limits: {}
  10253. Reservations: {}
  10254. RestartPolicy:
  10255. Condition: "any"
  10256. MaxAttempts: 0
  10257. Placement: {}
  10258. ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  10259. Slot: 1
  10260. NodeID: "60gvrl6tm78dmak4yl7srz94v"
  10261. Status:
  10262. Timestamp: "2016-06-07T21:07:31.290032978Z"
  10263. State: "running"
  10264. Message: "started"
  10265. ContainerStatus:
  10266. ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
  10267. PID: 677
  10268. DesiredState: "running"
  10269. NetworksAttachments:
  10270. - Network:
  10271. ID: "4qvuz4ko70xaltuqbt8956gd1"
  10272. Version:
  10273. Index: 18
  10274. CreatedAt: "2016-06-07T20:31:11.912919752Z"
  10275. UpdatedAt: "2016-06-07T21:07:29.955277358Z"
  10276. Spec:
  10277. Name: "ingress"
  10278. Labels:
  10279. com.docker.swarm.internal: "true"
  10280. DriverConfiguration: {}
  10281. IPAMOptions:
  10282. Driver: {}
  10283. Configs:
  10284. - Subnet: "10.255.0.0/16"
  10285. Gateway: "10.255.0.1"
  10286. DriverState:
  10287. Name: "overlay"
  10288. Options:
  10289. com.docker.network.driver.overlay.vxlanid_list: "256"
  10290. IPAMOptions:
  10291. Driver:
  10292. Name: "default"
  10293. Configs:
  10294. - Subnet: "10.255.0.0/16"
  10295. Gateway: "10.255.0.1"
  10296. Addresses:
  10297. - "10.255.0.10/16"
  10298. - ID: "1yljwbmlr8er2waf8orvqpwms"
  10299. Version:
  10300. Index: 30
  10301. CreatedAt: "2016-06-07T21:07:30.019104782Z"
  10302. UpdatedAt: "2016-06-07T21:07:30.231958098Z"
  10303. Name: "hopeful_cori"
  10304. Spec:
  10305. ContainerSpec:
  10306. Image: "redis"
  10307. Resources:
  10308. Limits: {}
  10309. Reservations: {}
  10310. RestartPolicy:
  10311. Condition: "any"
  10312. MaxAttempts: 0
  10313. Placement: {}
  10314. ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  10315. Slot: 1
  10316. NodeID: "60gvrl6tm78dmak4yl7srz94v"
  10317. Status:
  10318. Timestamp: "2016-06-07T21:07:30.202183143Z"
  10319. State: "shutdown"
  10320. Message: "shutdown"
  10321. ContainerStatus:
  10322. ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213"
  10323. DesiredState: "shutdown"
  10324. NetworksAttachments:
  10325. - Network:
  10326. ID: "4qvuz4ko70xaltuqbt8956gd1"
  10327. Version:
  10328. Index: 18
  10329. CreatedAt: "2016-06-07T20:31:11.912919752Z"
  10330. UpdatedAt: "2016-06-07T21:07:29.955277358Z"
  10331. Spec:
  10332. Name: "ingress"
  10333. Labels:
  10334. com.docker.swarm.internal: "true"
  10335. DriverConfiguration: {}
  10336. IPAMOptions:
  10337. Driver: {}
  10338. Configs:
  10339. - Subnet: "10.255.0.0/16"
  10340. Gateway: "10.255.0.1"
  10341. DriverState:
  10342. Name: "overlay"
  10343. Options:
  10344. com.docker.network.driver.overlay.vxlanid_list: "256"
  10345. IPAMOptions:
  10346. Driver:
  10347. Name: "default"
  10348. Configs:
  10349. - Subnet: "10.255.0.0/16"
  10350. Gateway: "10.255.0.1"
  10351. Addresses:
  10352. - "10.255.0.5/16"
  10353. 500:
  10354. description: "server error"
  10355. schema:
  10356. $ref: "#/definitions/ErrorResponse"
  10357. 503:
  10358. description: "node is not part of a swarm"
  10359. schema:
  10360. $ref: "#/definitions/ErrorResponse"
  10361. parameters:
  10362. - name: "filters"
  10363. in: "query"
  10364. type: "string"
  10365. description: |
  10366. A JSON encoded value of the filters (a `map[string][]string`) to
  10367. process on the tasks list.
  10368. Available filters:
  10369. - `desired-state=(running | shutdown | accepted)`
  10370. - `id=<task id>`
  10371. - `label=key` or `label="key=value"`
  10372. - `name=<task name>`
  10373. - `node=<node id or name>`
  10374. - `service=<service name>`
  10375. tags: ["Task"]
  10376. /tasks/{id}:
  10377. get:
  10378. summary: "Inspect a task"
  10379. operationId: "TaskInspect"
  10380. produces:
  10381. - "application/json"
  10382. responses:
  10383. 200:
  10384. description: "no error"
  10385. schema:
  10386. $ref: "#/definitions/Task"
  10387. 404:
  10388. description: "no such task"
  10389. schema:
  10390. $ref: "#/definitions/ErrorResponse"
  10391. 500:
  10392. description: "server error"
  10393. schema:
  10394. $ref: "#/definitions/ErrorResponse"
  10395. 503:
  10396. description: "node is not part of a swarm"
  10397. schema:
  10398. $ref: "#/definitions/ErrorResponse"
  10399. parameters:
  10400. - name: "id"
  10401. in: "path"
  10402. description: "ID of the task"
  10403. required: true
  10404. type: "string"
  10405. tags: ["Task"]
  10406. /tasks/{id}/logs:
  10407. get:
  10408. summary: "Get task logs"
  10409. description: |
  10410. Get `stdout` and `stderr` logs from a task.
  10411. See also [`/containers/{id}/logs`](#operation/ContainerLogs).
  10412. **Note**: This endpoint works only for services with the `local`,
  10413. `json-file` or `journald` logging drivers.
  10414. operationId: "TaskLogs"
  10415. responses:
  10416. 200:
  10417. description: "logs returned as a stream in response body"
  10418. schema:
  10419. type: "string"
  10420. format: "binary"
  10421. 404:
  10422. description: "no such task"
  10423. schema:
  10424. $ref: "#/definitions/ErrorResponse"
  10425. examples:
  10426. application/json:
  10427. message: "No such task: c2ada9df5af8"
  10428. 500:
  10429. description: "server error"
  10430. schema:
  10431. $ref: "#/definitions/ErrorResponse"
  10432. 503:
  10433. description: "node is not part of a swarm"
  10434. schema:
  10435. $ref: "#/definitions/ErrorResponse"
  10436. parameters:
  10437. - name: "id"
  10438. in: "path"
  10439. required: true
  10440. description: "ID of the task"
  10441. type: "string"
  10442. - name: "details"
  10443. in: "query"
  10444. description: "Show task context and extra details provided to logs."
  10445. type: "boolean"
  10446. default: false
  10447. - name: "follow"
  10448. in: "query"
  10449. description: "Keep connection after returning logs."
  10450. type: "boolean"
  10451. default: false
  10452. - name: "stdout"
  10453. in: "query"
  10454. description: "Return logs from `stdout`"
  10455. type: "boolean"
  10456. default: false
  10457. - name: "stderr"
  10458. in: "query"
  10459. description: "Return logs from `stderr`"
  10460. type: "boolean"
  10461. default: false
  10462. - name: "since"
  10463. in: "query"
  10464. description: "Only return logs since this time, as a UNIX timestamp"
  10465. type: "integer"
  10466. default: 0
  10467. - name: "timestamps"
  10468. in: "query"
  10469. description: "Add timestamps to every log line"
  10470. type: "boolean"
  10471. default: false
  10472. - name: "tail"
  10473. in: "query"
  10474. description: |
  10475. Only return this number of log lines from the end of the logs.
  10476. Specify as an integer or `all` to output all log lines.
  10477. type: "string"
  10478. default: "all"
  10479. tags: ["Task"]
  10480. /secrets:
  10481. get:
  10482. summary: "List secrets"
  10483. operationId: "SecretList"
  10484. produces:
  10485. - "application/json"
  10486. responses:
  10487. 200:
  10488. description: "no error"
  10489. schema:
  10490. type: "array"
  10491. items:
  10492. $ref: "#/definitions/Secret"
  10493. example:
  10494. - ID: "blt1owaxmitz71s9v5zh81zun"
  10495. Version:
  10496. Index: 85
  10497. CreatedAt: "2017-07-20T13:55:28.678958722Z"
  10498. UpdatedAt: "2017-07-20T13:55:28.678958722Z"
  10499. Spec:
  10500. Name: "mysql-passwd"
  10501. Labels:
  10502. some.label: "some.value"
  10503. Driver:
  10504. Name: "secret-bucket"
  10505. Options:
  10506. OptionA: "value for driver option A"
  10507. OptionB: "value for driver option B"
  10508. - ID: "ktnbjxoalbkvbvedmg1urrz8h"
  10509. Version:
  10510. Index: 11
  10511. CreatedAt: "2016-11-05T01:20:17.327670065Z"
  10512. UpdatedAt: "2016-11-05T01:20:17.327670065Z"
  10513. Spec:
  10514. Name: "app-dev.crt"
  10515. Labels:
  10516. foo: "bar"
  10517. 500:
  10518. description: "server error"
  10519. schema:
  10520. $ref: "#/definitions/ErrorResponse"
  10521. 503:
  10522. description: "node is not part of a swarm"
  10523. schema:
  10524. $ref: "#/definitions/ErrorResponse"
  10525. parameters:
  10526. - name: "filters"
  10527. in: "query"
  10528. type: "string"
  10529. description: |
  10530. A JSON encoded value of the filters (a `map[string][]string`) to
  10531. process on the secrets list.
  10532. Available filters:
  10533. - `id=<secret id>`
  10534. - `label=<key> or label=<key>=value`
  10535. - `name=<secret name>`
  10536. - `names=<secret name>`
  10537. tags: ["Secret"]
  10538. /secrets/create:
  10539. post:
  10540. summary: "Create a secret"
  10541. operationId: "SecretCreate"
  10542. consumes:
  10543. - "application/json"
  10544. produces:
  10545. - "application/json"
  10546. responses:
  10547. 201:
  10548. description: "no error"
  10549. schema:
  10550. $ref: "#/definitions/IdResponse"
  10551. 409:
  10552. description: "name conflicts with an existing object"
  10553. schema:
  10554. $ref: "#/definitions/ErrorResponse"
  10555. 500:
  10556. description: "server error"
  10557. schema:
  10558. $ref: "#/definitions/ErrorResponse"
  10559. 503:
  10560. description: "node is not part of a swarm"
  10561. schema:
  10562. $ref: "#/definitions/ErrorResponse"
  10563. parameters:
  10564. - name: "body"
  10565. in: "body"
  10566. schema:
  10567. allOf:
  10568. - $ref: "#/definitions/SecretSpec"
  10569. - type: "object"
  10570. example:
  10571. Name: "app-key.crt"
  10572. Labels:
  10573. foo: "bar"
  10574. Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg=="
  10575. Driver:
  10576. Name: "secret-bucket"
  10577. Options:
  10578. OptionA: "value for driver option A"
  10579. OptionB: "value for driver option B"
  10580. tags: ["Secret"]
  10581. /secrets/{id}:
  10582. get:
  10583. summary: "Inspect a secret"
  10584. operationId: "SecretInspect"
  10585. produces:
  10586. - "application/json"
  10587. responses:
  10588. 200:
  10589. description: "no error"
  10590. schema:
  10591. $ref: "#/definitions/Secret"
  10592. examples:
  10593. application/json:
  10594. ID: "ktnbjxoalbkvbvedmg1urrz8h"
  10595. Version:
  10596. Index: 11
  10597. CreatedAt: "2016-11-05T01:20:17.327670065Z"
  10598. UpdatedAt: "2016-11-05T01:20:17.327670065Z"
  10599. Spec:
  10600. Name: "app-dev.crt"
  10601. Labels:
  10602. foo: "bar"
  10603. Driver:
  10604. Name: "secret-bucket"
  10605. Options:
  10606. OptionA: "value for driver option A"
  10607. OptionB: "value for driver option B"
  10608. 404:
  10609. description: "secret not found"
  10610. schema:
  10611. $ref: "#/definitions/ErrorResponse"
  10612. 500:
  10613. description: "server error"
  10614. schema:
  10615. $ref: "#/definitions/ErrorResponse"
  10616. 503:
  10617. description: "node is not part of a swarm"
  10618. schema:
  10619. $ref: "#/definitions/ErrorResponse"
  10620. parameters:
  10621. - name: "id"
  10622. in: "path"
  10623. required: true
  10624. type: "string"
  10625. description: "ID of the secret"
  10626. tags: ["Secret"]
  10627. delete:
  10628. summary: "Delete a secret"
  10629. operationId: "SecretDelete"
  10630. produces:
  10631. - "application/json"
  10632. responses:
  10633. 204:
  10634. description: "no error"
  10635. 404:
  10636. description: "secret not found"
  10637. schema:
  10638. $ref: "#/definitions/ErrorResponse"
  10639. 500:
  10640. description: "server error"
  10641. schema:
  10642. $ref: "#/definitions/ErrorResponse"
  10643. 503:
  10644. description: "node is not part of a swarm"
  10645. schema:
  10646. $ref: "#/definitions/ErrorResponse"
  10647. parameters:
  10648. - name: "id"
  10649. in: "path"
  10650. required: true
  10651. type: "string"
  10652. description: "ID of the secret"
  10653. tags: ["Secret"]
  10654. /secrets/{id}/update:
  10655. post:
  10656. summary: "Update a Secret"
  10657. operationId: "SecretUpdate"
  10658. responses:
  10659. 200:
  10660. description: "no error"
  10661. 400:
  10662. description: "bad parameter"
  10663. schema:
  10664. $ref: "#/definitions/ErrorResponse"
  10665. 404:
  10666. description: "no such secret"
  10667. schema:
  10668. $ref: "#/definitions/ErrorResponse"
  10669. 500:
  10670. description: "server error"
  10671. schema:
  10672. $ref: "#/definitions/ErrorResponse"
  10673. 503:
  10674. description: "node is not part of a swarm"
  10675. schema:
  10676. $ref: "#/definitions/ErrorResponse"
  10677. parameters:
  10678. - name: "id"
  10679. in: "path"
  10680. description: "The ID or name of the secret"
  10681. type: "string"
  10682. required: true
  10683. - name: "body"
  10684. in: "body"
  10685. schema:
  10686. $ref: "#/definitions/SecretSpec"
  10687. description: |
  10688. The spec of the secret to update. Currently, only the Labels field
  10689. can be updated. All other fields must remain unchanged from the
  10690. [SecretInspect endpoint](#operation/SecretInspect) response values.
  10691. - name: "version"
  10692. in: "query"
  10693. description: |
  10694. The version number of the secret object being updated. This is
  10695. required to avoid conflicting writes.
  10696. type: "integer"
  10697. format: "int64"
  10698. required: true
  10699. tags: ["Secret"]
  10700. /configs:
  10701. get:
  10702. summary: "List configs"
  10703. operationId: "ConfigList"
  10704. produces:
  10705. - "application/json"
  10706. responses:
  10707. 200:
  10708. description: "no error"
  10709. schema:
  10710. type: "array"
  10711. items:
  10712. $ref: "#/definitions/Config"
  10713. example:
  10714. - ID: "ktnbjxoalbkvbvedmg1urrz8h"
  10715. Version:
  10716. Index: 11
  10717. CreatedAt: "2016-11-05T01:20:17.327670065Z"
  10718. UpdatedAt: "2016-11-05T01:20:17.327670065Z"
  10719. Spec:
  10720. Name: "server.conf"
  10721. 500:
  10722. description: "server error"
  10723. schema:
  10724. $ref: "#/definitions/ErrorResponse"
  10725. 503:
  10726. description: "node is not part of a swarm"
  10727. schema:
  10728. $ref: "#/definitions/ErrorResponse"
  10729. parameters:
  10730. - name: "filters"
  10731. in: "query"
  10732. type: "string"
  10733. description: |
  10734. A JSON encoded value of the filters (a `map[string][]string`) to
  10735. process on the configs list.
  10736. Available filters:
  10737. - `id=<config id>`
  10738. - `label=<key> or label=<key>=value`
  10739. - `name=<config name>`
  10740. - `names=<config name>`
  10741. tags: ["Config"]
  10742. /configs/create:
  10743. post:
  10744. summary: "Create a config"
  10745. operationId: "ConfigCreate"
  10746. consumes:
  10747. - "application/json"
  10748. produces:
  10749. - "application/json"
  10750. responses:
  10751. 201:
  10752. description: "no error"
  10753. schema:
  10754. $ref: "#/definitions/IdResponse"
  10755. 409:
  10756. description: "name conflicts with an existing object"
  10757. schema:
  10758. $ref: "#/definitions/ErrorResponse"
  10759. 500:
  10760. description: "server error"
  10761. schema:
  10762. $ref: "#/definitions/ErrorResponse"
  10763. 503:
  10764. description: "node is not part of a swarm"
  10765. schema:
  10766. $ref: "#/definitions/ErrorResponse"
  10767. parameters:
  10768. - name: "body"
  10769. in: "body"
  10770. schema:
  10771. allOf:
  10772. - $ref: "#/definitions/ConfigSpec"
  10773. - type: "object"
  10774. example:
  10775. Name: "server.conf"
  10776. Labels:
  10777. foo: "bar"
  10778. Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg=="
  10779. tags: ["Config"]
  10780. /configs/{id}:
  10781. get:
  10782. summary: "Inspect a config"
  10783. operationId: "ConfigInspect"
  10784. produces:
  10785. - "application/json"
  10786. responses:
  10787. 200:
  10788. description: "no error"
  10789. schema:
  10790. $ref: "#/definitions/Config"
  10791. examples:
  10792. application/json:
  10793. ID: "ktnbjxoalbkvbvedmg1urrz8h"
  10794. Version:
  10795. Index: 11
  10796. CreatedAt: "2016-11-05T01:20:17.327670065Z"
  10797. UpdatedAt: "2016-11-05T01:20:17.327670065Z"
  10798. Spec:
  10799. Name: "app-dev.crt"
  10800. 404:
  10801. description: "config not found"
  10802. schema:
  10803. $ref: "#/definitions/ErrorResponse"
  10804. 500:
  10805. description: "server error"
  10806. schema:
  10807. $ref: "#/definitions/ErrorResponse"
  10808. 503:
  10809. description: "node is not part of a swarm"
  10810. schema:
  10811. $ref: "#/definitions/ErrorResponse"
  10812. parameters:
  10813. - name: "id"
  10814. in: "path"
  10815. required: true
  10816. type: "string"
  10817. description: "ID of the config"
  10818. tags: ["Config"]
  10819. delete:
  10820. summary: "Delete a config"
  10821. operationId: "ConfigDelete"
  10822. produces:
  10823. - "application/json"
  10824. responses:
  10825. 204:
  10826. description: "no error"
  10827. 404:
  10828. description: "config not found"
  10829. schema:
  10830. $ref: "#/definitions/ErrorResponse"
  10831. 500:
  10832. description: "server error"
  10833. schema:
  10834. $ref: "#/definitions/ErrorResponse"
  10835. 503:
  10836. description: "node is not part of a swarm"
  10837. schema:
  10838. $ref: "#/definitions/ErrorResponse"
  10839. parameters:
  10840. - name: "id"
  10841. in: "path"
  10842. required: true
  10843. type: "string"
  10844. description: "ID of the config"
  10845. tags: ["Config"]
  10846. /configs/{id}/update:
  10847. post:
  10848. summary: "Update a Config"
  10849. operationId: "ConfigUpdate"
  10850. responses:
  10851. 200:
  10852. description: "no error"
  10853. 400:
  10854. description: "bad parameter"
  10855. schema:
  10856. $ref: "#/definitions/ErrorResponse"
  10857. 404:
  10858. description: "no such config"
  10859. schema:
  10860. $ref: "#/definitions/ErrorResponse"
  10861. 500:
  10862. description: "server error"
  10863. schema:
  10864. $ref: "#/definitions/ErrorResponse"
  10865. 503:
  10866. description: "node is not part of a swarm"
  10867. schema:
  10868. $ref: "#/definitions/ErrorResponse"
  10869. parameters:
  10870. - name: "id"
  10871. in: "path"
  10872. description: "The ID or name of the config"
  10873. type: "string"
  10874. required: true
  10875. - name: "body"
  10876. in: "body"
  10877. schema:
  10878. $ref: "#/definitions/ConfigSpec"
  10879. description: |
  10880. The spec of the config to update. Currently, only the Labels field
  10881. can be updated. All other fields must remain unchanged from the
  10882. [ConfigInspect endpoint](#operation/ConfigInspect) response values.
  10883. - name: "version"
  10884. in: "query"
  10885. description: |
  10886. The version number of the config object being updated. This is
  10887. required to avoid conflicting writes.
  10888. type: "integer"
  10889. format: "int64"
  10890. required: true
  10891. tags: ["Config"]
  10892. /distribution/{name}/json:
  10893. get:
  10894. summary: "Get image information from the registry"
  10895. description: |
  10896. Return image digest and platform information by contacting the registry.
  10897. operationId: "DistributionInspect"
  10898. produces:
  10899. - "application/json"
  10900. responses:
  10901. 200:
  10902. description: "descriptor and platform information"
  10903. schema:
  10904. type: "object"
  10905. x-go-name: DistributionInspect
  10906. title: "DistributionInspectResponse"
  10907. required: [Descriptor, Platforms]
  10908. properties:
  10909. Descriptor:
  10910. type: "object"
  10911. description: |
  10912. A descriptor struct containing digest, media type, and size.
  10913. properties:
  10914. MediaType:
  10915. type: "string"
  10916. Size:
  10917. type: "integer"
  10918. format: "int64"
  10919. Digest:
  10920. type: "string"
  10921. URLs:
  10922. type: "array"
  10923. items:
  10924. type: "string"
  10925. Platforms:
  10926. type: "array"
  10927. description: |
  10928. An array containing all platforms supported by the image.
  10929. items:
  10930. type: "object"
  10931. properties:
  10932. Architecture:
  10933. type: "string"
  10934. OS:
  10935. type: "string"
  10936. OSVersion:
  10937. type: "string"
  10938. OSFeatures:
  10939. type: "array"
  10940. items:
  10941. type: "string"
  10942. Variant:
  10943. type: "string"
  10944. Features:
  10945. type: "array"
  10946. items:
  10947. type: "string"
  10948. examples:
  10949. application/json:
  10950. Descriptor:
  10951. MediaType: "application/vnd.docker.distribution.manifest.v2+json"
  10952. Digest: "sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96"
  10953. Size: 3987495
  10954. URLs:
  10955. - ""
  10956. Platforms:
  10957. - Architecture: "amd64"
  10958. OS: "linux"
  10959. OSVersion: ""
  10960. OSFeatures:
  10961. - ""
  10962. Variant: ""
  10963. Features:
  10964. - ""
  10965. 401:
  10966. description: "Failed authentication or no image found"
  10967. schema:
  10968. $ref: "#/definitions/ErrorResponse"
  10969. examples:
  10970. application/json:
  10971. message: "No such image: someimage (tag: latest)"
  10972. 500:
  10973. description: "Server error"
  10974. schema:
  10975. $ref: "#/definitions/ErrorResponse"
  10976. parameters:
  10977. - name: "name"
  10978. in: "path"
  10979. description: "Image name or id"
  10980. type: "string"
  10981. required: true
  10982. tags: ["Distribution"]
  10983. /session:
  10984. post:
  10985. summary: "Initialize interactive session"
  10986. description: |
  10987. Start a new interactive session with a server. Session allows server to
  10988. call back to the client for advanced capabilities.
  10989. ### Hijacking
  10990. This endpoint hijacks the HTTP connection to HTTP2 transport that allows
  10991. the client to expose gPRC services on that connection.
  10992. For example, the client sends this request to upgrade the connection:
  10993. ```
  10994. POST /session HTTP/1.1
  10995. Upgrade: h2c
  10996. Connection: Upgrade
  10997. ```
  10998. The Docker daemon responds with a `101 UPGRADED` response follow with
  10999. the raw stream:
  11000. ```
  11001. HTTP/1.1 101 UPGRADED
  11002. Connection: Upgrade
  11003. Upgrade: h2c
  11004. ```
  11005. operationId: "Session"
  11006. produces:
  11007. - "application/vnd.docker.raw-stream"
  11008. responses:
  11009. 101:
  11010. description: "no error, hijacking successful"
  11011. 400:
  11012. description: "bad parameter"
  11013. schema:
  11014. $ref: "#/definitions/ErrorResponse"
  11015. 500:
  11016. description: "server error"
  11017. schema:
  11018. $ref: "#/definitions/ErrorResponse"
  11019. tags: ["Session"]