v1.40.yaml 368 KB

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