v1.43.yaml 402 KB

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