v1.41.yaml 386 KB

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