v1.42.yaml 401 KB

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