v1.30.yaml 297 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834
  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.30"
  22. info:
  23. title: "Docker Engine API"
  24. version: "1.30"
  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 Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API.
  29. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls.
  30. # Errors
  31. The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format:
  32. ```
  33. {
  34. "message": "page not found"
  35. }
  36. ```
  37. # Versioning
  38. The API is usually changed in each release of Docker, so API calls are versioned to ensure that clients don't break.
  39. For Docker Engine 17.06, the API version is 1.30. To lock to this version, you prefix the URL with `/v1.30`. For example, calling `/info` is the same as calling `/v1.30/info`.
  40. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine.
  41. In previous versions of Docker, it was possible to access the API without providing a version. This behaviour is now deprecated will be removed in a future version of Docker.
  42. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer Docker daemons.
  43. This documentation is for version 1.30 of the API, which was introduced with Docker 17.06. Use this table to find documentation for previous versions of the API:
  44. Docker version | API version | Changes
  45. ----------------|-------------|---------
  46. 17.05.x | [1.29](https://docs.docker.com/engine/api/v1.29/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-29-api-changes)
  47. 17.04.x | [1.28](https://docs.docker.com/engine/api/v1.28/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-28-api-changes)
  48. 17.03.1 | [1.27](https://docs.docker.com/engine/api/v1.27/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-27-api-changes)
  49. 1.13.1 & 17.03.0 | [1.26](https://docs.docker.com/engine/api/v1.26/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-26-api-changes)
  50. 1.13.0 | [1.25](https://docs.docker.com/engine/api/v1.25/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-25-api-changes)
  51. 1.12.x | [1.24](https://docs.docker.com/engine/api/v1.24/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-24-api-changes)
  52. 1.11.x | [1.23](https://docs.docker.com/engine/api/v1.23/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-23-api-changes)
  53. 1.10.x | [1.22](https://docs.docker.com/engine/api/v1.22/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-22-api-changes)
  54. 1.9.x | [1.21](https://docs.docker.com/engine/api/v1.21/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-21-api-changes)
  55. 1.8.x | [1.20](https://docs.docker.com/engine/api/v1.20/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-20-api-changes)
  56. 1.7.x | [1.19](https://docs.docker.com/engine/api/v1.19/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-19-api-changes)
  57. 1.6.x | [1.18](https://docs.docker.com/engine/api/v1.18/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-18-api-changes)
  58. # Authentication
  59. Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a Base64 encoded (JSON) string with the following structure:
  60. ```
  61. {
  62. "username": "string",
  63. "password": "string",
  64. "email": "string",
  65. "serveraddress": "string"
  66. }
  67. ```
  68. The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required.
  69. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials:
  70. ```
  71. {
  72. "identitytoken": "9cbaf023786cd7..."
  73. }
  74. ```
  75. # The tags on paths define the menu sections in the ReDoc documentation, so
  76. # the usage of tags must make sense for that:
  77. # - They should be singular, not plural.
  78. # - There should not be too many tags, or the menu becomes unwieldy. For
  79. # example, it is preferable to add a path to the "System" tag instead of
  80. # creating a tag with a single path in it.
  81. # - The order of tags in this list defines the order in the menu.
  82. tags:
  83. # Primary objects
  84. - name: "Container"
  85. x-displayName: "Containers"
  86. description: |
  87. Create and manage containers.
  88. - name: "Image"
  89. x-displayName: "Images"
  90. - name: "Network"
  91. x-displayName: "Networks"
  92. description: |
  93. Networks are user-defined networks that containers can be attached to. See the [networking documentation](https://docs.docker.com/network/) for more information.
  94. - name: "Volume"
  95. x-displayName: "Volumes"
  96. description: |
  97. Create and manage persistent storage that can be attached to containers.
  98. - name: "Exec"
  99. x-displayName: "Exec"
  100. description: |
  101. Run new commands inside running containers. See the [command-line reference](https://docs.docker.com/engine/reference/commandline/exec/) for more information.
  102. To exec a command in a container, you first need to create an exec instance, then start it. These two API endpoints are wrapped up in a single command-line command, `docker exec`.
  103. # Swarm things
  104. - name: "Swarm"
  105. x-displayName: "Swarm"
  106. description: |
  107. Engines can be clustered together in a swarm. See [the swarm mode documentation](https://docs.docker.com/engine/swarm/) for more information.
  108. - name: "Node"
  109. x-displayName: "Nodes"
  110. description: |
  111. Nodes are instances of the Engine participating in a swarm. Swarm mode must be enabled for these endpoints to work.
  112. - name: "Service"
  113. x-displayName: "Services"
  114. description: |
  115. Services are the definitions of tasks to run on a swarm. Swarm mode must be enabled for these endpoints to work.
  116. - name: "Task"
  117. x-displayName: "Tasks"
  118. description: |
  119. A task is a container running on a swarm. It is the atomic scheduling unit of swarm. Swarm mode must be enabled for these endpoints to work.
  120. - name: "Secret"
  121. x-displayName: "Secrets"
  122. description: |
  123. Secrets are sensitive data that can be used by services. Swarm mode must be enabled for these endpoints to work.
  124. # System things
  125. - name: "Plugin"
  126. x-displayName: "Plugins"
  127. - name: "System"
  128. x-displayName: "System"
  129. definitions:
  130. Port:
  131. type: "object"
  132. description: "An open port on a container"
  133. required: [PrivatePort, Type]
  134. properties:
  135. IP:
  136. type: "string"
  137. format: "ip-address"
  138. PrivatePort:
  139. type: "integer"
  140. format: "uint16"
  141. x-nullable: false
  142. description: "Port on the container"
  143. PublicPort:
  144. type: "integer"
  145. format: "uint16"
  146. description: "Port exposed on the host"
  147. Type:
  148. type: "string"
  149. x-nullable: false
  150. enum: ["tcp", "udp"]
  151. example:
  152. PrivatePort: 8080
  153. PublicPort: 80
  154. Type: "tcp"
  155. MountPoint:
  156. type: "object"
  157. description: |
  158. MountPoint represents a mount point configuration inside the container.
  159. This is used for reporting the mountpoints in use by a container.
  160. properties:
  161. Type:
  162. description: |
  163. The mount type:
  164. - `bind` a mount of a file or directory from the host into the container.
  165. - `volume` a docker volume with the given `Name`.
  166. - `tmpfs` a `tmpfs`.
  167. type: "string"
  168. enum:
  169. - "bind"
  170. - "volume"
  171. - "tmpfs"
  172. example: "volume"
  173. Name:
  174. description: |
  175. Name is the name reference to the underlying data defined by `Source`
  176. e.g., the volume name.
  177. type: "string"
  178. example: "myvolume"
  179. Source:
  180. description: |
  181. Source location of the mount.
  182. For volumes, this contains the storage location of the volume (within
  183. `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains
  184. the source (host) part of the bind-mount. For `tmpfs` mount points, this
  185. field is empty.
  186. type: "string"
  187. example: "/var/lib/docker/volumes/myvolume/_data"
  188. Destination:
  189. description: |
  190. Destination is the path relative to the container root (`/`) where
  191. the `Source` is mounted inside the container.
  192. type: "string"
  193. example: "/usr/share/nginx/html/"
  194. Driver:
  195. description: |
  196. Driver is the volume driver used to create the volume (if it is a volume).
  197. type: "string"
  198. example: "local"
  199. Mode:
  200. description: |
  201. Mode is a comma separated list of options supplied by the user when
  202. creating the bind/volume mount.
  203. The default is platform-specific (`"z"` on Linux, empty on Windows).
  204. type: "string"
  205. example: "z"
  206. RW:
  207. description: |
  208. Whether the mount is mounted writable (read-write).
  209. type: "boolean"
  210. example: true
  211. Propagation:
  212. description: |
  213. Propagation describes how mounts are propagated from the host into the
  214. mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)
  215. for details. This field is not used on Windows.
  216. type: "string"
  217. example: ""
  218. DeviceMapping:
  219. type: "object"
  220. description: "A device mapping between the host and container"
  221. properties:
  222. PathOnHost:
  223. type: "string"
  224. PathInContainer:
  225. type: "string"
  226. CgroupPermissions:
  227. type: "string"
  228. example:
  229. PathOnHost: "/dev/deviceName"
  230. PathInContainer: "/dev/deviceName"
  231. CgroupPermissions: "mrw"
  232. ThrottleDevice:
  233. type: "object"
  234. properties:
  235. Path:
  236. description: "Device path"
  237. type: "string"
  238. Rate:
  239. description: "Rate"
  240. type: "integer"
  241. format: "int64"
  242. minimum: 0
  243. Mount:
  244. type: "object"
  245. properties:
  246. Target:
  247. description: "Container path."
  248. type: "string"
  249. Source:
  250. description: "Mount source (e.g. a volume name, a host path)."
  251. type: "string"
  252. Type:
  253. description: |
  254. The mount type. Available types:
  255. - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container.
  256. - `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.
  257. - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs.
  258. type: "string"
  259. enum:
  260. - "bind"
  261. - "volume"
  262. - "tmpfs"
  263. ReadOnly:
  264. description: "Whether the mount should be read-only."
  265. type: "boolean"
  266. Consistency:
  267. description: "The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`."
  268. type: "string"
  269. BindOptions:
  270. description: "Optional configuration for the `bind` type."
  271. type: "object"
  272. properties:
  273. Propagation:
  274. description: "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`."
  275. enum:
  276. - "private"
  277. - "rprivate"
  278. - "shared"
  279. - "rshared"
  280. - "slave"
  281. - "rslave"
  282. VolumeOptions:
  283. description: "Optional configuration for the `volume` type."
  284. type: "object"
  285. properties:
  286. NoCopy:
  287. description: "Populate volume with data from the target."
  288. type: "boolean"
  289. default: false
  290. Labels:
  291. description: "User-defined key/value metadata."
  292. type: "object"
  293. additionalProperties:
  294. type: "string"
  295. DriverConfig:
  296. description: "Map of driver specific options"
  297. type: "object"
  298. properties:
  299. Name:
  300. description: "Name of the driver to use to create the volume."
  301. type: "string"
  302. Options:
  303. description: "key/value map of driver specific options."
  304. type: "object"
  305. additionalProperties:
  306. type: "string"
  307. TmpfsOptions:
  308. description: "Optional configuration for the `tmpfs` type."
  309. type: "object"
  310. properties:
  311. SizeBytes:
  312. description: "The size for the tmpfs mount in bytes."
  313. type: "integer"
  314. format: "int64"
  315. Mode:
  316. description: "The permission mode for the tmpfs mount in an integer."
  317. type: "integer"
  318. RestartPolicy:
  319. description: |
  320. The behavior to apply when the container exits. The default is not to restart.
  321. An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server.
  322. type: "object"
  323. properties:
  324. Name:
  325. type: "string"
  326. description: |
  327. - Empty string means not to restart
  328. - `always` Always restart
  329. - `unless-stopped` Restart always except when the user has manually stopped the container
  330. - `on-failure` Restart only when the container exit code is non-zero
  331. enum:
  332. - ""
  333. - "always"
  334. - "unless-stopped"
  335. - "on-failure"
  336. MaximumRetryCount:
  337. type: "integer"
  338. description: "If `on-failure` is used, the number of times to retry before giving up"
  339. Resources:
  340. description: "A container's resources (cgroups config, ulimits, etc)"
  341. type: "object"
  342. properties:
  343. # Applicable to all platforms
  344. CpuShares:
  345. description: "An integer value representing this container's relative CPU weight versus other containers."
  346. type: "integer"
  347. Memory:
  348. description: "Memory limit in bytes."
  349. type: "integer"
  350. default: 0
  351. # Applicable to UNIX platforms
  352. CgroupParent:
  353. description: "Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist."
  354. type: "string"
  355. BlkioWeight:
  356. description: "Block IO weight (relative weight)."
  357. type: "integer"
  358. minimum: 0
  359. maximum: 1000
  360. BlkioWeightDevice:
  361. description: |
  362. Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`.
  363. type: "array"
  364. items:
  365. type: "object"
  366. properties:
  367. Path:
  368. type: "string"
  369. Weight:
  370. type: "integer"
  371. minimum: 0
  372. BlkioDeviceReadBps:
  373. description: |
  374. Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
  375. type: "array"
  376. items:
  377. $ref: "#/definitions/ThrottleDevice"
  378. BlkioDeviceWriteBps:
  379. description: |
  380. Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
  381. type: "array"
  382. items:
  383. $ref: "#/definitions/ThrottleDevice"
  384. BlkioDeviceReadIOps:
  385. description: |
  386. Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
  387. type: "array"
  388. items:
  389. $ref: "#/definitions/ThrottleDevice"
  390. BlkioDeviceWriteIOps:
  391. description: |
  392. Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
  393. type: "array"
  394. items:
  395. $ref: "#/definitions/ThrottleDevice"
  396. CpuPeriod:
  397. description: "The length of a CPU period in microseconds."
  398. type: "integer"
  399. format: "int64"
  400. CpuQuota:
  401. description: "Microseconds of CPU time that the container can get in a CPU period."
  402. type: "integer"
  403. format: "int64"
  404. CpuRealtimePeriod:
  405. description: "The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks."
  406. type: "integer"
  407. format: "int64"
  408. CpuRealtimeRuntime:
  409. description: "The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks."
  410. type: "integer"
  411. format: "int64"
  412. CpusetCpus:
  413. description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)"
  414. type: "string"
  415. CpusetMems:
  416. description: "Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems."
  417. type: "string"
  418. Devices:
  419. description: "A list of devices to add to the container."
  420. type: "array"
  421. items:
  422. $ref: "#/definitions/DeviceMapping"
  423. DeviceCgroupRules:
  424. description: "a list of cgroup rules to apply to the container"
  425. type: "array"
  426. items:
  427. type: "string"
  428. example: "c 13:* rwm"
  429. DiskQuota:
  430. description: "Disk limit (in bytes)."
  431. type: "integer"
  432. format: "int64"
  433. KernelMemory:
  434. description: "Kernel memory limit in bytes."
  435. type: "integer"
  436. format: "int64"
  437. MemoryReservation:
  438. description: "Memory soft limit in bytes."
  439. type: "integer"
  440. format: "int64"
  441. MemorySwap:
  442. description: "Total memory limit (memory + swap). Set as `-1` to enable unlimited swap."
  443. type: "integer"
  444. format: "int64"
  445. MemorySwappiness:
  446. description: "Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100."
  447. type: "integer"
  448. format: "int64"
  449. minimum: 0
  450. maximum: 100
  451. NanoCpus:
  452. description: "CPU quota in units of 10<sup>-9</sup> CPUs."
  453. type: "integer"
  454. format: "int64"
  455. OomKillDisable:
  456. description: "Disable OOM Killer for the container."
  457. type: "boolean"
  458. PidsLimit:
  459. description: "Tune a container's pids limit. Set -1 for unlimited."
  460. type: "integer"
  461. format: "int64"
  462. Ulimits:
  463. description: |
  464. A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`"
  465. type: "array"
  466. items:
  467. type: "object"
  468. properties:
  469. Name:
  470. description: "Name of ulimit"
  471. type: "string"
  472. Soft:
  473. description: "Soft limit"
  474. type: "integer"
  475. Hard:
  476. description: "Hard limit"
  477. type: "integer"
  478. # Applicable to Windows
  479. CpuCount:
  480. description: |
  481. The number of usable CPUs (Windows only).
  482. On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last.
  483. type: "integer"
  484. format: "int64"
  485. CpuPercent:
  486. description: |
  487. The usable percentage of the available CPUs (Windows only).
  488. On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last.
  489. type: "integer"
  490. format: "int64"
  491. IOMaximumIOps:
  492. description: "Maximum IOps for the container system drive (Windows only)"
  493. type: "integer"
  494. format: "int64"
  495. IOMaximumBandwidth:
  496. description: "Maximum IO in bytes per second for the container system drive (Windows only)"
  497. type: "integer"
  498. format: "int64"
  499. HealthConfig:
  500. description: "A test to perform to check that the container is healthy."
  501. type: "object"
  502. properties:
  503. Test:
  504. description: |
  505. The test to perform. Possible values are:
  506. - `[]` inherit healthcheck from image or parent image
  507. - `["NONE"]` disable healthcheck
  508. - `["CMD", args...]` exec arguments directly
  509. - `["CMD-SHELL", command]` run command with system's default shell
  510. type: "array"
  511. items:
  512. type: "string"
  513. Interval:
  514. description: "The time to wait between checks in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit."
  515. type: "integer"
  516. Timeout:
  517. description: "The time to wait before considering the check to have hung. It should be 0 or at least 1000000 (1 ms). 0 means inherit."
  518. type: "integer"
  519. Retries:
  520. description: "The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit."
  521. type: "integer"
  522. StartPeriod:
  523. description: "Start period for the container to initialize before starting health-retries countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit."
  524. type: "integer"
  525. HostConfig:
  526. description: "Container configuration that depends on the host we are running on"
  527. allOf:
  528. - $ref: "#/definitions/Resources"
  529. - type: "object"
  530. properties:
  531. # Applicable to all platforms
  532. Binds:
  533. type: "array"
  534. description: |
  535. A list of volume bindings for this container. Each volume binding is a string in one of these forms:
  536. - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path.
  537. - `host-src:container-dest:ro` to make the bind-mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path.
  538. - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path.
  539. - `volume-name:container-dest:ro` to mount the volume read-only inside the container. `container-dest` must be an _absolute_ path.
  540. items:
  541. type: "string"
  542. ContainerIDFile:
  543. type: "string"
  544. description: "Path to a file where the container ID is written"
  545. LogConfig:
  546. type: "object"
  547. description: "The logging configuration for this container"
  548. properties:
  549. Type:
  550. type: "string"
  551. enum:
  552. - "json-file"
  553. - "syslog"
  554. - "journald"
  555. - "gelf"
  556. - "fluentd"
  557. - "awslogs"
  558. - "splunk"
  559. - "etwlogs"
  560. - "none"
  561. Config:
  562. type: "object"
  563. additionalProperties:
  564. type: "string"
  565. NetworkMode:
  566. type: "string"
  567. description: "Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. Any other value is taken
  568. as a custom network's name to which this container should connect to."
  569. PortBindings:
  570. type: "object"
  571. description: "A map of exposed container ports and the host port they should map to."
  572. additionalProperties:
  573. type: "object"
  574. properties:
  575. HostIp:
  576. type: "string"
  577. description: "The host IP address"
  578. HostPort:
  579. type: "string"
  580. description: "The host port number, as a string"
  581. RestartPolicy:
  582. $ref: "#/definitions/RestartPolicy"
  583. AutoRemove:
  584. type: "boolean"
  585. description: "Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set."
  586. VolumeDriver:
  587. type: "string"
  588. description: "Driver that this container uses to mount volumes."
  589. VolumesFrom:
  590. type: "array"
  591. description: "A list of volumes to inherit from another container, specified in the form `<container name>[:<ro|rw>]`."
  592. items:
  593. type: "string"
  594. Mounts:
  595. description: "Specification for mounts to be added to the container."
  596. type: "array"
  597. items:
  598. $ref: "#/definitions/Mount"
  599. # Applicable to UNIX platforms
  600. CapAdd:
  601. type: "array"
  602. description: "A list of kernel capabilities to add to the container."
  603. items:
  604. type: "string"
  605. CapDrop:
  606. type: "array"
  607. description: "A list of kernel capabilities to drop from the container."
  608. items:
  609. type: "string"
  610. Dns:
  611. type: "array"
  612. description: "A list of DNS servers for the container to use."
  613. items:
  614. type: "string"
  615. DnsOptions:
  616. type: "array"
  617. description: "A list of DNS options."
  618. items:
  619. type: "string"
  620. DnsSearch:
  621. type: "array"
  622. description: "A list of DNS search domains."
  623. items:
  624. type: "string"
  625. ExtraHosts:
  626. type: "array"
  627. description: |
  628. A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`.
  629. items:
  630. type: "string"
  631. GroupAdd:
  632. type: "array"
  633. description: "A list of additional groups that the container process will run as."
  634. items:
  635. type: "string"
  636. IpcMode:
  637. type: "string"
  638. description: "IPC namespace to use for the container."
  639. Cgroup:
  640. type: "string"
  641. description: "Cgroup to use for the container."
  642. Links:
  643. type: "array"
  644. description: "A list of links for the container in the form `container_name:alias`."
  645. items:
  646. type: "string"
  647. OomScoreAdj:
  648. type: "integer"
  649. description: "An integer value containing the score given to the container in order to tune OOM killer preferences."
  650. PidMode:
  651. type: "string"
  652. description: |
  653. Set the PID (Process) Namespace mode for the container. It can be either:
  654. - `"container:<name|id>"`: joins another container's PID namespace
  655. - `"host"`: use the host's PID namespace inside the container
  656. Privileged:
  657. type: "boolean"
  658. description: "Gives the container full access to the host."
  659. PublishAllPorts:
  660. type: "boolean"
  661. description: "Allocates a random host port for all of a container's exposed ports."
  662. ReadonlyRootfs:
  663. type: "boolean"
  664. description: "Mount the container's root filesystem as read only."
  665. SecurityOpt:
  666. type: "array"
  667. description: "A list of string values to customize labels for MLS
  668. systems, such as SELinux."
  669. items:
  670. type: "string"
  671. StorageOpt:
  672. type: "object"
  673. description: |
  674. Storage driver options for this container, in the form `{"size": "120G"}`.
  675. additionalProperties:
  676. type: "string"
  677. Tmpfs:
  678. type: "object"
  679. description: |
  680. A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: `{ "/run": "rw,noexec,nosuid,size=65536k" }`.
  681. additionalProperties:
  682. type: "string"
  683. UTSMode:
  684. type: "string"
  685. description: "UTS namespace to use for the container."
  686. UsernsMode:
  687. type: "string"
  688. description: "Sets the usernamespace mode for the container when usernamespace remapping option is enabled."
  689. ShmSize:
  690. type: "integer"
  691. description: "Size of `/dev/shm` in bytes. If omitted, the system uses 64MB."
  692. minimum: 0
  693. Sysctls:
  694. type: "object"
  695. description: |
  696. A list of kernel parameters (sysctls) to set in the container. For example: `{"net.ipv4.ip_forward": "1"}`
  697. additionalProperties:
  698. type: "string"
  699. Runtime:
  700. type: "string"
  701. description: "Runtime to use with this container."
  702. # Applicable to Windows
  703. ConsoleSize:
  704. type: "array"
  705. description: "Initial console size, as an `[height, width]` array. (Windows only)"
  706. minItems: 2
  707. maxItems: 2
  708. items:
  709. type: "integer"
  710. minimum: 0
  711. Isolation:
  712. type: "string"
  713. description: "Isolation technology of the container. (Windows only)"
  714. enum:
  715. - "default"
  716. - "process"
  717. - "hyperv"
  718. ContainerConfig:
  719. description: |
  720. Configuration for a container that is portable between hosts.
  721. When used as `ContainerConfig` field in an image, `ContainerConfig` is an
  722. optional field containing the configuration of the container that was last
  723. committed when creating the image.
  724. Previous versions of Docker builder used this field to store build cache,
  725. and it is not in active use anymore.
  726. type: "object"
  727. properties:
  728. Hostname:
  729. description: "The hostname to use for the container, as a valid RFC 1123 hostname."
  730. type: "string"
  731. Domainname:
  732. description: "The domain name to use for the container."
  733. type: "string"
  734. User:
  735. description: "The user that commands are run as inside the container."
  736. type: "string"
  737. AttachStdin:
  738. description: "Whether to attach to `stdin`."
  739. type: "boolean"
  740. default: false
  741. AttachStdout:
  742. description: "Whether to attach to `stdout`."
  743. type: "boolean"
  744. default: true
  745. AttachStderr:
  746. description: "Whether to attach to `stderr`."
  747. type: "boolean"
  748. default: true
  749. ExposedPorts:
  750. description: |
  751. An object mapping ports to an empty object in the form:
  752. `{"<port>/<tcp|udp>": {}}`
  753. type: "object"
  754. additionalProperties:
  755. type: "object"
  756. enum:
  757. - {}
  758. default: {}
  759. Tty:
  760. description: "Attach standard streams to a TTY, including `stdin` if it is not closed."
  761. type: "boolean"
  762. default: false
  763. OpenStdin:
  764. description: "Open `stdin`"
  765. type: "boolean"
  766. default: false
  767. StdinOnce:
  768. description: "Close `stdin` after one attached client disconnects"
  769. type: "boolean"
  770. default: false
  771. Env:
  772. description: |
  773. A list of environment variables to set inside the container in the form `["VAR=value", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value.
  774. type: "array"
  775. items:
  776. type: "string"
  777. Cmd:
  778. description: "Command to run specified as a string or an array of strings."
  779. type:
  780. - "array"
  781. - "string"
  782. items:
  783. type: "string"
  784. Healthcheck:
  785. $ref: "#/definitions/HealthConfig"
  786. ArgsEscaped:
  787. description: "Command is already escaped (Windows only)"
  788. type: "boolean"
  789. Image:
  790. description: "The name of the image to use when creating the container"
  791. type: "string"
  792. Volumes:
  793. description: "An object mapping mount point paths inside the container to empty objects."
  794. type: "object"
  795. properties:
  796. additionalProperties:
  797. type: "object"
  798. enum:
  799. - {}
  800. default: {}
  801. WorkingDir:
  802. description: "The working directory for commands to run in."
  803. type: "string"
  804. Entrypoint:
  805. description: |
  806. The entry point for the container as a string or an array of strings.
  807. If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`).
  808. type:
  809. - "array"
  810. - "string"
  811. items:
  812. type: "string"
  813. NetworkDisabled:
  814. description: "Disable networking for the container."
  815. type: "boolean"
  816. MacAddress:
  817. description: "MAC address of the container."
  818. type: "string"
  819. OnBuild:
  820. description: "`ONBUILD` metadata that were defined in the image's `Dockerfile`."
  821. type: "array"
  822. items:
  823. type: "string"
  824. Labels:
  825. description: "User-defined key/value metadata."
  826. type: "object"
  827. additionalProperties:
  828. type: "string"
  829. StopSignal:
  830. description: "Signal to stop a container as a string or unsigned integer."
  831. type: "string"
  832. default: "SIGTERM"
  833. StopTimeout:
  834. description: "Timeout to stop a container in seconds."
  835. type: "integer"
  836. default: 10
  837. Shell:
  838. description: "Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell."
  839. type: "array"
  840. items:
  841. type: "string"
  842. NetworkConfig:
  843. description: "TODO: check is correct"
  844. type: "object"
  845. properties:
  846. Bridge:
  847. type: "string"
  848. Gateway:
  849. type: "string"
  850. Address:
  851. type: "string"
  852. IPPrefixLen:
  853. type: "integer"
  854. MacAddress:
  855. type: "string"
  856. PortMapping:
  857. type: "string"
  858. Ports:
  859. type: "array"
  860. items:
  861. $ref: "#/definitions/Port"
  862. GraphDriverData:
  863. description: "Information about a container's graph driver."
  864. type: "object"
  865. required: [Name, Data]
  866. properties:
  867. Name:
  868. type: "string"
  869. x-nullable: false
  870. Data:
  871. type: "object"
  872. x-nullable: false
  873. additionalProperties:
  874. type: "string"
  875. Image:
  876. type: "object"
  877. required:
  878. - Id
  879. - Parent
  880. - Comment
  881. - Created
  882. - Container
  883. - DockerVersion
  884. - Author
  885. - Architecture
  886. - Os
  887. - Size
  888. - VirtualSize
  889. - GraphDriver
  890. - RootFS
  891. properties:
  892. Id:
  893. type: "string"
  894. x-nullable: false
  895. RepoTags:
  896. type: "array"
  897. items:
  898. type: "string"
  899. RepoDigests:
  900. type: "array"
  901. items:
  902. type: "string"
  903. Parent:
  904. type: "string"
  905. x-nullable: false
  906. Comment:
  907. type: "string"
  908. x-nullable: false
  909. Created:
  910. type: "string"
  911. x-nullable: false
  912. Container:
  913. type: "string"
  914. x-nullable: false
  915. ContainerConfig:
  916. $ref: "#/definitions/ContainerConfig"
  917. DockerVersion:
  918. type: "string"
  919. x-nullable: false
  920. Author:
  921. type: "string"
  922. x-nullable: false
  923. Config:
  924. $ref: "#/definitions/ContainerConfig"
  925. Architecture:
  926. type: "string"
  927. x-nullable: false
  928. Os:
  929. type: "string"
  930. x-nullable: false
  931. OsVersion:
  932. type: "string"
  933. Size:
  934. type: "integer"
  935. format: "int64"
  936. x-nullable: false
  937. VirtualSize:
  938. type: "integer"
  939. format: "int64"
  940. x-nullable: false
  941. GraphDriver:
  942. $ref: "#/definitions/GraphDriverData"
  943. RootFS:
  944. type: "object"
  945. required: [Type]
  946. properties:
  947. Type:
  948. type: "string"
  949. x-nullable: false
  950. Layers:
  951. type: "array"
  952. items:
  953. type: "string"
  954. ImageSummary:
  955. type: "object"
  956. required:
  957. - Id
  958. - ParentId
  959. - RepoTags
  960. - RepoDigests
  961. - Created
  962. - Size
  963. - SharedSize
  964. - VirtualSize
  965. - Labels
  966. - Containers
  967. properties:
  968. Id:
  969. type: "string"
  970. x-nullable: false
  971. ParentId:
  972. type: "string"
  973. x-nullable: false
  974. RepoTags:
  975. type: "array"
  976. x-nullable: false
  977. items:
  978. type: "string"
  979. RepoDigests:
  980. type: "array"
  981. x-nullable: false
  982. items:
  983. type: "string"
  984. Created:
  985. type: "integer"
  986. x-nullable: false
  987. Size:
  988. type: "integer"
  989. x-nullable: false
  990. SharedSize:
  991. type: "integer"
  992. x-nullable: false
  993. VirtualSize:
  994. type: "integer"
  995. x-nullable: false
  996. Labels:
  997. type: "object"
  998. x-nullable: false
  999. additionalProperties:
  1000. type: "string"
  1001. Containers:
  1002. x-nullable: false
  1003. type: "integer"
  1004. AuthConfig:
  1005. type: "object"
  1006. properties:
  1007. username:
  1008. type: "string"
  1009. password:
  1010. type: "string"
  1011. email:
  1012. type: "string"
  1013. serveraddress:
  1014. type: "string"
  1015. example:
  1016. username: "hannibal"
  1017. password: "xxxx"
  1018. serveraddress: "https://index.docker.io/v1/"
  1019. ProcessConfig:
  1020. type: "object"
  1021. properties:
  1022. privileged:
  1023. type: "boolean"
  1024. user:
  1025. type: "string"
  1026. tty:
  1027. type: "boolean"
  1028. entrypoint:
  1029. type: "string"
  1030. arguments:
  1031. type: "array"
  1032. items:
  1033. type: "string"
  1034. Volume:
  1035. type: "object"
  1036. required: [Name, Driver, Mountpoint, Labels, Scope, Options]
  1037. properties:
  1038. Name:
  1039. type: "string"
  1040. description: "Name of the volume."
  1041. x-nullable: false
  1042. Driver:
  1043. type: "string"
  1044. description: "Name of the volume driver used by the volume."
  1045. x-nullable: false
  1046. Mountpoint:
  1047. type: "string"
  1048. description: "Mount path of the volume on the host."
  1049. x-nullable: false
  1050. Status:
  1051. type: "object"
  1052. description: |
  1053. Low-level details about the volume, provided by the volume driver.
  1054. Details are returned as a map with key/value pairs:
  1055. `{"key":"value","key2":"value2"}`.
  1056. The `Status` field is optional, and is omitted if the volume driver
  1057. does not support this feature.
  1058. additionalProperties:
  1059. type: "object"
  1060. Labels:
  1061. type: "object"
  1062. description: "User-defined key/value metadata."
  1063. x-nullable: false
  1064. additionalProperties:
  1065. type: "string"
  1066. Scope:
  1067. type: "string"
  1068. description: "The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level."
  1069. default: "local"
  1070. x-nullable: false
  1071. enum: ["local", "global"]
  1072. Options:
  1073. type: "object"
  1074. description: "The driver specific options used when creating the volume."
  1075. additionalProperties:
  1076. type: "string"
  1077. UsageData:
  1078. type: "object"
  1079. x-nullable: true
  1080. required: [Size, RefCount]
  1081. description: |
  1082. Usage details about the volume. This information is used by the
  1083. `GET /system/df` endpoint, and omitted in other endpoints.
  1084. properties:
  1085. Size:
  1086. type: "integer"
  1087. default: -1
  1088. description: |
  1089. Amount of disk space used by the volume (in bytes). This information
  1090. is only available for volumes created with the `"local"` volume
  1091. driver. For volumes created with other volume drivers, this field
  1092. is set to `-1` ("not available")
  1093. x-nullable: false
  1094. RefCount:
  1095. type: "integer"
  1096. default: -1
  1097. description: |
  1098. The number of containers referencing this volume. This field
  1099. is set to `-1` if the reference-count is not available.
  1100. x-nullable: false
  1101. example:
  1102. Name: "tardis"
  1103. Driver: "custom"
  1104. Mountpoint: "/var/lib/docker/volumes/tardis"
  1105. Status:
  1106. hello: "world"
  1107. Labels:
  1108. com.example.some-label: "some-value"
  1109. com.example.some-other-label: "some-other-value"
  1110. Scope: "local"
  1111. Network:
  1112. type: "object"
  1113. properties:
  1114. Name:
  1115. type: "string"
  1116. Id:
  1117. type: "string"
  1118. Created:
  1119. type: "string"
  1120. format: "dateTime"
  1121. Scope:
  1122. type: "string"
  1123. Driver:
  1124. type: "string"
  1125. EnableIPv6:
  1126. type: "boolean"
  1127. IPAM:
  1128. $ref: "#/definitions/IPAM"
  1129. Internal:
  1130. type: "boolean"
  1131. Attachable:
  1132. type: "boolean"
  1133. Ingress:
  1134. type: "boolean"
  1135. Containers:
  1136. type: "object"
  1137. additionalProperties:
  1138. $ref: "#/definitions/NetworkContainer"
  1139. Options:
  1140. type: "object"
  1141. additionalProperties:
  1142. type: "string"
  1143. Labels:
  1144. type: "object"
  1145. additionalProperties:
  1146. type: "string"
  1147. example:
  1148. Name: "net01"
  1149. Id: "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99"
  1150. Created: "2016-10-19T04:33:30.360899459Z"
  1151. Scope: "local"
  1152. Driver: "bridge"
  1153. EnableIPv6: false
  1154. IPAM:
  1155. Driver: "default"
  1156. Config:
  1157. - Subnet: "172.19.0.0/16"
  1158. Gateway: "172.19.0.1"
  1159. Options:
  1160. foo: "bar"
  1161. Internal: false
  1162. Attachable: false
  1163. Ingress: false
  1164. Containers:
  1165. 19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c:
  1166. Name: "test"
  1167. EndpointID: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a"
  1168. MacAddress: "02:42:ac:13:00:02"
  1169. IPv4Address: "172.19.0.2/16"
  1170. IPv6Address: ""
  1171. Options:
  1172. com.docker.network.bridge.default_bridge: "true"
  1173. com.docker.network.bridge.enable_icc: "true"
  1174. com.docker.network.bridge.enable_ip_masquerade: "true"
  1175. com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  1176. com.docker.network.bridge.name: "docker0"
  1177. com.docker.network.driver.mtu: "1500"
  1178. Labels:
  1179. com.example.some-label: "some-value"
  1180. com.example.some-other-label: "some-other-value"
  1181. IPAM:
  1182. type: "object"
  1183. properties:
  1184. Driver:
  1185. description: "Name of the IPAM driver to use."
  1186. type: "string"
  1187. default: "default"
  1188. Config:
  1189. description: "List of IPAM configuration options, specified as a map: `{\"Subnet\": <CIDR>, \"IPRange\": <CIDR>, \"Gateway\": <IP address>, \"AuxAddress\": <device_name:IP address>}`"
  1190. type: "array"
  1191. items:
  1192. type: "object"
  1193. additionalProperties:
  1194. type: "string"
  1195. Options:
  1196. description: "Driver-specific options, specified as a map."
  1197. type: "array"
  1198. items:
  1199. type: "object"
  1200. additionalProperties:
  1201. type: "string"
  1202. NetworkContainer:
  1203. type: "object"
  1204. properties:
  1205. Name:
  1206. type: "string"
  1207. EndpointID:
  1208. type: "string"
  1209. MacAddress:
  1210. type: "string"
  1211. IPv4Address:
  1212. type: "string"
  1213. IPv6Address:
  1214. type: "string"
  1215. BuildInfo:
  1216. type: "object"
  1217. properties:
  1218. id:
  1219. type: "string"
  1220. stream:
  1221. type: "string"
  1222. error:
  1223. type: "string"
  1224. errorDetail:
  1225. $ref: "#/definitions/ErrorDetail"
  1226. status:
  1227. type: "string"
  1228. progress:
  1229. type: "string"
  1230. progressDetail:
  1231. $ref: "#/definitions/ProgressDetail"
  1232. CreateImageInfo:
  1233. type: "object"
  1234. properties:
  1235. error:
  1236. type: "string"
  1237. status:
  1238. type: "string"
  1239. progress:
  1240. type: "string"
  1241. progressDetail:
  1242. $ref: "#/definitions/ProgressDetail"
  1243. PushImageInfo:
  1244. type: "object"
  1245. properties:
  1246. error:
  1247. type: "string"
  1248. status:
  1249. type: "string"
  1250. progress:
  1251. type: "string"
  1252. progressDetail:
  1253. $ref: "#/definitions/ProgressDetail"
  1254. ErrorDetail:
  1255. type: "object"
  1256. properties:
  1257. code:
  1258. type: "integer"
  1259. message:
  1260. type: "string"
  1261. ProgressDetail:
  1262. type: "object"
  1263. properties:
  1264. code:
  1265. type: "integer"
  1266. message:
  1267. type: "integer"
  1268. ErrorResponse:
  1269. description: "Represents an error."
  1270. type: "object"
  1271. required: ["message"]
  1272. properties:
  1273. message:
  1274. description: "The error message."
  1275. type: "string"
  1276. x-nullable: false
  1277. example:
  1278. message: "Something went wrong."
  1279. IdResponse:
  1280. description: "Response to an API call that returns just an Id"
  1281. type: "object"
  1282. required: ["Id"]
  1283. properties:
  1284. Id:
  1285. description: "The id of the newly created object."
  1286. type: "string"
  1287. x-nullable: false
  1288. EndpointSettings:
  1289. description: "Configuration for a network endpoint."
  1290. type: "object"
  1291. properties:
  1292. IPAMConfig:
  1293. description: "IPAM configurations for the endpoint"
  1294. type: "object"
  1295. properties:
  1296. IPv4Address:
  1297. type: "string"
  1298. IPv6Address:
  1299. type: "string"
  1300. LinkLocalIPs:
  1301. type: "array"
  1302. items:
  1303. type: "string"
  1304. Links:
  1305. type: "array"
  1306. items:
  1307. type: "string"
  1308. Aliases:
  1309. type: "array"
  1310. items:
  1311. type: "string"
  1312. NetworkID:
  1313. type: "string"
  1314. EndpointID:
  1315. type: "string"
  1316. Gateway:
  1317. type: "string"
  1318. IPAddress:
  1319. type: "string"
  1320. IPPrefixLen:
  1321. type: "integer"
  1322. IPv6Gateway:
  1323. type: "string"
  1324. GlobalIPv6Address:
  1325. type: "string"
  1326. GlobalIPv6PrefixLen:
  1327. type: "integer"
  1328. format: "int64"
  1329. MacAddress:
  1330. type: "string"
  1331. PluginMount:
  1332. type: "object"
  1333. x-nullable: false
  1334. required: [Name, Description, Settable, Source, Destination, Type, Options]
  1335. properties:
  1336. Name:
  1337. type: "string"
  1338. x-nullable: false
  1339. example: "some-mount"
  1340. Description:
  1341. type: "string"
  1342. x-nullable: false
  1343. example: "This is a mount that's used by the plugin."
  1344. Settable:
  1345. type: "array"
  1346. items:
  1347. type: "string"
  1348. Source:
  1349. type: "string"
  1350. example: "/var/lib/docker/plugins/"
  1351. Destination:
  1352. type: "string"
  1353. x-nullable: false
  1354. example: "/mnt/state"
  1355. Type:
  1356. type: "string"
  1357. x-nullable: false
  1358. example: "bind"
  1359. Options:
  1360. type: "array"
  1361. items:
  1362. type: "string"
  1363. example:
  1364. - "rbind"
  1365. - "rw"
  1366. PluginDevice:
  1367. type: "object"
  1368. required: [Name, Description, Settable, Path]
  1369. x-nullable: false
  1370. properties:
  1371. Name:
  1372. type: "string"
  1373. x-nullable: false
  1374. Description:
  1375. type: "string"
  1376. x-nullable: false
  1377. Settable:
  1378. type: "array"
  1379. items:
  1380. type: "string"
  1381. Path:
  1382. type: "string"
  1383. example: "/dev/fuse"
  1384. PluginEnv:
  1385. type: "object"
  1386. x-nullable: false
  1387. required: [Name, Description, Settable, Value]
  1388. properties:
  1389. Name:
  1390. x-nullable: false
  1391. type: "string"
  1392. Description:
  1393. x-nullable: false
  1394. type: "string"
  1395. Settable:
  1396. type: "array"
  1397. items:
  1398. type: "string"
  1399. Value:
  1400. type: "string"
  1401. PluginInterfaceType:
  1402. type: "object"
  1403. x-nullable: false
  1404. required: [Prefix, Capability, Version]
  1405. properties:
  1406. Prefix:
  1407. type: "string"
  1408. x-nullable: false
  1409. Capability:
  1410. type: "string"
  1411. x-nullable: false
  1412. Version:
  1413. type: "string"
  1414. x-nullable: false
  1415. Plugin:
  1416. description: "A plugin for the Engine API"
  1417. type: "object"
  1418. required: [Settings, Enabled, Config, Name]
  1419. properties:
  1420. Id:
  1421. type: "string"
  1422. example: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078"
  1423. Name:
  1424. type: "string"
  1425. x-nullable: false
  1426. example: "tiborvass/sample-volume-plugin"
  1427. Enabled:
  1428. description: "True if the plugin is running. False if the plugin is not running, only installed."
  1429. type: "boolean"
  1430. x-nullable: false
  1431. example: true
  1432. Settings:
  1433. description: "Settings that can be modified by users."
  1434. type: "object"
  1435. x-nullable: false
  1436. required: [Args, Devices, Env, Mounts]
  1437. properties:
  1438. Mounts:
  1439. type: "array"
  1440. items:
  1441. $ref: "#/definitions/PluginMount"
  1442. Env:
  1443. type: "array"
  1444. items:
  1445. type: "string"
  1446. example:
  1447. - "DEBUG=0"
  1448. Args:
  1449. type: "array"
  1450. items:
  1451. type: "string"
  1452. Devices:
  1453. type: "array"
  1454. items:
  1455. $ref: "#/definitions/PluginDevice"
  1456. PluginReference:
  1457. description: "plugin remote reference used to push/pull the plugin"
  1458. type: "string"
  1459. x-nullable: false
  1460. example: "localhost:5000/tiborvass/sample-volume-plugin:latest"
  1461. Config:
  1462. description: "The config of a plugin."
  1463. type: "object"
  1464. x-nullable: false
  1465. required:
  1466. - Description
  1467. - Documentation
  1468. - Interface
  1469. - Entrypoint
  1470. - WorkDir
  1471. - Network
  1472. - Linux
  1473. - PidHost
  1474. - PropagatedMount
  1475. - IpcHost
  1476. - Mounts
  1477. - Env
  1478. - Args
  1479. properties:
  1480. DockerVersion:
  1481. description: "Docker Version used to create the plugin"
  1482. type: "string"
  1483. x-nullable: false
  1484. example: "17.06.0-ce"
  1485. Description:
  1486. type: "string"
  1487. x-nullable: false
  1488. example: "A sample volume plugin for Docker"
  1489. Documentation:
  1490. type: "string"
  1491. x-nullable: false
  1492. example: "https://docs.docker.com/engine/extend/plugins/"
  1493. Interface:
  1494. description: "The interface between Docker and the plugin"
  1495. x-nullable: false
  1496. type: "object"
  1497. required: [Types, Socket]
  1498. properties:
  1499. Types:
  1500. type: "array"
  1501. items:
  1502. $ref: "#/definitions/PluginInterfaceType"
  1503. example:
  1504. - "docker.volumedriver/1.0"
  1505. Socket:
  1506. type: "string"
  1507. x-nullable: false
  1508. example: "plugins.sock"
  1509. Entrypoint:
  1510. type: "array"
  1511. items:
  1512. type: "string"
  1513. example:
  1514. - "/usr/bin/sample-volume-plugin"
  1515. - "/data"
  1516. WorkDir:
  1517. type: "string"
  1518. x-nullable: false
  1519. example: "/bin/"
  1520. User:
  1521. type: "object"
  1522. x-nullable: false
  1523. properties:
  1524. UID:
  1525. type: "integer"
  1526. format: "uint32"
  1527. example: 1000
  1528. GID:
  1529. type: "integer"
  1530. format: "uint32"
  1531. example: 1000
  1532. Network:
  1533. type: "object"
  1534. x-nullable: false
  1535. required: [Type]
  1536. properties:
  1537. Type:
  1538. x-nullable: false
  1539. type: "string"
  1540. example: "host"
  1541. Linux:
  1542. type: "object"
  1543. x-nullable: false
  1544. required: [Capabilities, AllowAllDevices, Devices]
  1545. properties:
  1546. Capabilities:
  1547. type: "array"
  1548. items:
  1549. type: "string"
  1550. example:
  1551. - "CAP_SYS_ADMIN"
  1552. - "CAP_SYSLOG"
  1553. AllowAllDevices:
  1554. type: "boolean"
  1555. x-nullable: false
  1556. example: false
  1557. Devices:
  1558. type: "array"
  1559. items:
  1560. $ref: "#/definitions/PluginDevice"
  1561. PropagatedMount:
  1562. type: "string"
  1563. x-nullable: false
  1564. example: "/mnt/volumes"
  1565. IpcHost:
  1566. type: "boolean"
  1567. x-nullable: false
  1568. example: false
  1569. PidHost:
  1570. type: "boolean"
  1571. x-nullable: false
  1572. example: false
  1573. Mounts:
  1574. type: "array"
  1575. items:
  1576. $ref: "#/definitions/PluginMount"
  1577. Env:
  1578. type: "array"
  1579. items:
  1580. $ref: "#/definitions/PluginEnv"
  1581. example:
  1582. - Name: "DEBUG"
  1583. Description: "If set, prints debug messages"
  1584. Settable: null
  1585. Value: "0"
  1586. Args:
  1587. type: "object"
  1588. x-nullable: false
  1589. required: [Name, Description, Settable, Value]
  1590. properties:
  1591. Name:
  1592. x-nullable: false
  1593. type: "string"
  1594. example: "args"
  1595. Description:
  1596. x-nullable: false
  1597. type: "string"
  1598. example: "command line arguments"
  1599. Settable:
  1600. type: "array"
  1601. items:
  1602. type: "string"
  1603. Value:
  1604. type: "array"
  1605. items:
  1606. type: "string"
  1607. rootfs:
  1608. type: "object"
  1609. properties:
  1610. type:
  1611. type: "string"
  1612. example: "layers"
  1613. diff_ids:
  1614. type: "array"
  1615. items:
  1616. type: "string"
  1617. example:
  1618. - "sha256:675532206fbf3030b8458f88d6e26d4eb1577688a25efec97154c94e8b6b4887"
  1619. - "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8"
  1620. ObjectVersion:
  1621. description: |
  1622. The version number of the object such as node, service, etc. This is needed to avoid conflicting writes.
  1623. The client must send the version number along with the modified specification when updating these objects.
  1624. This approach ensures safe concurrency and determinism in that the change on the object
  1625. may not be applied if the version number has changed from the last read. In other words,
  1626. if two update requests specify the same base version, only one of the requests can succeed.
  1627. As a result, two separate update requests that happen at the same time will not
  1628. unintentially overwrite each other.
  1629. type: "object"
  1630. properties:
  1631. Index:
  1632. type: "integer"
  1633. format: "int64"
  1634. NodeSpec:
  1635. type: "object"
  1636. properties:
  1637. Name:
  1638. description: "Name for the node."
  1639. type: "string"
  1640. Labels:
  1641. description: "User-defined key/value metadata."
  1642. type: "object"
  1643. additionalProperties:
  1644. type: "string"
  1645. Role:
  1646. description: "Role of the node."
  1647. type: "string"
  1648. enum:
  1649. - "worker"
  1650. - "manager"
  1651. Availability:
  1652. description: "Availability of the node."
  1653. type: "string"
  1654. enum:
  1655. - "active"
  1656. - "pause"
  1657. - "drain"
  1658. example:
  1659. Availability: "active"
  1660. Name: "node-name"
  1661. Role: "manager"
  1662. Labels:
  1663. foo: "bar"
  1664. Node:
  1665. type: "object"
  1666. properties:
  1667. ID:
  1668. type: "string"
  1669. Version:
  1670. $ref: "#/definitions/ObjectVersion"
  1671. CreatedAt:
  1672. type: "string"
  1673. format: "dateTime"
  1674. UpdatedAt:
  1675. type: "string"
  1676. format: "dateTime"
  1677. Spec:
  1678. $ref: "#/definitions/NodeSpec"
  1679. Description:
  1680. type: "object"
  1681. properties:
  1682. Hostname:
  1683. type: "string"
  1684. Platform:
  1685. type: "object"
  1686. properties:
  1687. Architecture:
  1688. type: "string"
  1689. OS:
  1690. type: "string"
  1691. Resources:
  1692. type: "object"
  1693. properties:
  1694. NanoCPUs:
  1695. type: "integer"
  1696. format: "int64"
  1697. MemoryBytes:
  1698. type: "integer"
  1699. format: "int64"
  1700. Engine:
  1701. type: "object"
  1702. properties:
  1703. EngineVersion:
  1704. type: "string"
  1705. Labels:
  1706. type: "object"
  1707. additionalProperties:
  1708. type: "string"
  1709. Plugins:
  1710. type: "array"
  1711. items:
  1712. type: "object"
  1713. properties:
  1714. Type:
  1715. type: "string"
  1716. Name:
  1717. type: "string"
  1718. TLSInfo:
  1719. $ref: "#/definitions/SwarmSpec"
  1720. example:
  1721. ID: "24ifsmvkjbyhk"
  1722. Version:
  1723. Index: 8
  1724. CreatedAt: "2016-06-07T20:31:11.853781916Z"
  1725. UpdatedAt: "2016-06-07T20:31:11.999868824Z"
  1726. Spec:
  1727. Name: "my-node"
  1728. Role: "manager"
  1729. Availability: "active"
  1730. Labels:
  1731. foo: "bar"
  1732. Description:
  1733. Hostname: "bf3067039e47"
  1734. Platform:
  1735. Architecture: "x86_64"
  1736. OS: "linux"
  1737. Resources:
  1738. NanoCPUs: 4000000000
  1739. MemoryBytes: 8272408576
  1740. Engine:
  1741. EngineVersion: "17.04.0"
  1742. Labels:
  1743. foo: "bar"
  1744. Plugins:
  1745. - Type: "Volume"
  1746. Name: "local"
  1747. - Type: "Network"
  1748. Name: "bridge"
  1749. - Type: "Network"
  1750. Name: "null"
  1751. - Type: "Network"
  1752. Name: "overlay"
  1753. Status:
  1754. State: "ready"
  1755. Addr: "172.17.0.2"
  1756. ManagerStatus:
  1757. Leader: true
  1758. Reachability: "reachable"
  1759. Addr: "172.17.0.2:2377"
  1760. TLSInfo:
  1761. TrustRoot: |
  1762. -----BEGIN CERTIFICATE-----
  1763. MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw
  1764. EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0
  1765. MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH
  1766. A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf
  1767. 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB
  1768. Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO
  1769. PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz
  1770. pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H
  1771. -----END CERTIFICATE-----
  1772. CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh"
  1773. CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A=="
  1774. TLSInfo:
  1775. description: "Information about the issuer of leaf TLS certificates and the trusted root CA certificate"
  1776. type: "object"
  1777. properties:
  1778. TrustRoot:
  1779. description: "The root CA certificate(s) that are used to validate leaf TLS certificates"
  1780. type: "string"
  1781. CertIssuerSubject:
  1782. description: "The base64-url-safe-encoded raw subject bytes of the issuer"
  1783. type: "string"
  1784. CertIssuerPublicKey:
  1785. description: "The base64-url-safe-encoded raw public key bytes of the issuer"
  1786. type: "string"
  1787. example:
  1788. TrustRoot: |
  1789. -----BEGIN CERTIFICATE-----
  1790. MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw
  1791. EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0
  1792. MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH
  1793. A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf
  1794. 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB
  1795. Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO
  1796. PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz
  1797. pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H
  1798. -----END CERTIFICATE-----
  1799. CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh"
  1800. CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A=="
  1801. SwarmSpec:
  1802. description: "User modifiable swarm configuration."
  1803. type: "object"
  1804. properties:
  1805. Name:
  1806. description: "Name of the swarm."
  1807. type: "string"
  1808. Labels:
  1809. description: "User-defined key/value metadata."
  1810. type: "object"
  1811. additionalProperties:
  1812. type: "string"
  1813. Orchestration:
  1814. description: "Orchestration configuration."
  1815. type: "object"
  1816. properties:
  1817. TaskHistoryRetentionLimit:
  1818. description: "The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks."
  1819. type: "integer"
  1820. format: "int64"
  1821. Raft:
  1822. description: "Raft configuration."
  1823. type: "object"
  1824. properties:
  1825. SnapshotInterval:
  1826. description: "The number of log entries between snapshots."
  1827. type: "integer"
  1828. format: "int64"
  1829. KeepOldSnapshots:
  1830. description: "The number of snapshots to keep beyond the current snapshot."
  1831. type: "integer"
  1832. format: "int64"
  1833. LogEntriesForSlowFollowers:
  1834. description: "The number of log entries to keep around to sync up slow followers after a snapshot is created."
  1835. type: "integer"
  1836. format: "int64"
  1837. ElectionTick:
  1838. description: |
  1839. The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`.
  1840. A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed.
  1841. type: "integer"
  1842. HeartbeatTick:
  1843. description: |
  1844. The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers.
  1845. A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed.
  1846. type: "integer"
  1847. Dispatcher:
  1848. description: "Dispatcher configuration."
  1849. type: "object"
  1850. properties:
  1851. HeartbeatPeriod:
  1852. description: "The delay for an agent to send a heartbeat to the dispatcher."
  1853. type: "integer"
  1854. format: "int64"
  1855. CAConfig:
  1856. description: "CA configuration."
  1857. type: "object"
  1858. properties:
  1859. NodeCertExpiry:
  1860. description: "The duration node certificates are issued for."
  1861. type: "integer"
  1862. format: "int64"
  1863. ExternalCAs:
  1864. description: "Configuration for forwarding signing requests to an external certificate authority."
  1865. type: "array"
  1866. items:
  1867. type: "object"
  1868. properties:
  1869. Protocol:
  1870. description: "Protocol for communication with the external CA (currently only `cfssl` is supported)."
  1871. type: "string"
  1872. enum:
  1873. - "cfssl"
  1874. default: "cfssl"
  1875. URL:
  1876. description: "URL where certificate signing requests should be sent."
  1877. type: "string"
  1878. Options:
  1879. description: "An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver."
  1880. type: "object"
  1881. additionalProperties:
  1882. type: "string"
  1883. CACert:
  1884. description: "The root CA certificate (in PEM format) this external CA uses to issue TLS certificates (assumed to be to the current swarm root CA certificate if not provided)."
  1885. type: "string"
  1886. SigningCACert:
  1887. description: "The desired signing CA certificate for all swarm node TLS leaf certificates, in PEM format."
  1888. type: "string"
  1889. SigningCAKey:
  1890. description: "The desired signing CA key for all swarm node TLS leaf certificates, in PEM format."
  1891. type: "string"
  1892. ForceRotate:
  1893. description: "An integer whose purpose is to force swarm to generate a new signing CA certificate and key, if none have been specified in `SigningCACert` and `SigningCAKey`"
  1894. EncryptionConfig:
  1895. description: "Parameters related to encryption-at-rest."
  1896. type: "object"
  1897. properties:
  1898. AutoLockManagers:
  1899. description: "If set, generate a key and use it to lock data stored on the managers."
  1900. type: "boolean"
  1901. TaskDefaults:
  1902. description: "Defaults for creating tasks in this cluster."
  1903. type: "object"
  1904. properties:
  1905. LogDriver:
  1906. description: |
  1907. The log driver to use for tasks created in the orchestrator if unspecified by a service.
  1908. Updating this value will only have an affect on new tasks. Old tasks will continue use their previously configured log driver until recreated.
  1909. type: "object"
  1910. properties:
  1911. Name:
  1912. type: "string"
  1913. Options:
  1914. type: "object"
  1915. additionalProperties:
  1916. type: "string"
  1917. example:
  1918. Name: "default"
  1919. Orchestration:
  1920. TaskHistoryRetentionLimit: 10
  1921. Raft:
  1922. SnapshotInterval: 10000
  1923. LogEntriesForSlowFollowers: 500
  1924. HeartbeatTick: 1
  1925. ElectionTick: 3
  1926. Dispatcher:
  1927. HeartbeatPeriod: 5000000000
  1928. CAConfig:
  1929. NodeCertExpiry: 7776000000000000
  1930. JoinTokens:
  1931. Worker: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx"
  1932. Manager: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2"
  1933. EncryptionConfig:
  1934. AutoLockManagers: false
  1935. # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but
  1936. # without `JoinTokens`.
  1937. ClusterInfo:
  1938. type: "object"
  1939. properties:
  1940. ID:
  1941. description: "The ID of the swarm."
  1942. type: "string"
  1943. Version:
  1944. $ref: "#/definitions/ObjectVersion"
  1945. CreatedAt:
  1946. type: "string"
  1947. format: "dateTime"
  1948. UpdatedAt:
  1949. type: "string"
  1950. format: "dateTime"
  1951. Spec:
  1952. $ref: "#/definitions/SwarmSpec"
  1953. TLSInfo:
  1954. $ref: "#/definitions/TLSInfo"
  1955. RootRotationInProgress:
  1956. description: "Whether there is currently a root CA rotation in progress for the swarm"
  1957. type: "boolean"
  1958. TaskSpec:
  1959. description: "User modifiable task configuration."
  1960. type: "object"
  1961. properties:
  1962. ContainerSpec:
  1963. type: "object"
  1964. properties:
  1965. Image:
  1966. description: "The image name to use for the container."
  1967. type: "string"
  1968. Labels:
  1969. description: "User-defined key/value data."
  1970. type: "object"
  1971. additionalProperties:
  1972. type: "string"
  1973. Command:
  1974. description: "The command to be run in the image."
  1975. type: "array"
  1976. items:
  1977. type: "string"
  1978. Args:
  1979. description: "Arguments to the command."
  1980. type: "array"
  1981. items:
  1982. type: "string"
  1983. Hostname:
  1984. description: "The hostname to use for the container, as a valid RFC 1123 hostname."
  1985. type: "string"
  1986. Env:
  1987. description: "A list of environment variables in the form `VAR=value`."
  1988. type: "array"
  1989. items:
  1990. type: "string"
  1991. Dir:
  1992. description: "The working directory for commands to run in."
  1993. type: "string"
  1994. User:
  1995. description: "The user inside the container."
  1996. type: "string"
  1997. Groups:
  1998. type: "array"
  1999. description: "A list of additional groups that the container process will run as."
  2000. items:
  2001. type: "string"
  2002. Privileges:
  2003. type: "object"
  2004. description: "Security options for the container"
  2005. properties:
  2006. CredentialSpec:
  2007. type: "object"
  2008. description: "CredentialSpec for managed service account (Windows only)"
  2009. properties:
  2010. File:
  2011. type: "string"
  2012. description: |
  2013. Load credential spec from this file. The file is read by the daemon, and must be present in the
  2014. `CredentialSpecs` subdirectory in the docker data directory, which defaults to
  2015. `C:\ProgramData\Docker\` on Windows.
  2016. For example, specifying `spec.json` loads `C:\ProgramData\Docker\CredentialSpecs\spec.json`.
  2017. <p><br /></p>
  2018. > **Note**: `CredentialSpec.File` and `CredentialSpec.Registry` are mutually exclusive.
  2019. Registry:
  2020. type: "string"
  2021. description: |
  2022. Load credential spec from this value in the Windows registry. The specified registry value must be
  2023. located in:
  2024. `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs`
  2025. <p><br /></p>
  2026. > **Note**: `CredentialSpec.File` and `CredentialSpec.Registry` are mutually exclusive.
  2027. SELinuxContext:
  2028. type: "object"
  2029. description: "SELinux labels of the container"
  2030. properties:
  2031. Disable:
  2032. type: "boolean"
  2033. description: "Disable SELinux"
  2034. User:
  2035. type: "string"
  2036. description: "SELinux user label"
  2037. Role:
  2038. type: "string"
  2039. description: "SELinux role label"
  2040. Type:
  2041. type: "string"
  2042. description: "SELinux type label"
  2043. Level:
  2044. type: "string"
  2045. description: "SELinux level label"
  2046. TTY:
  2047. description: "Whether a pseudo-TTY should be allocated."
  2048. type: "boolean"
  2049. OpenStdin:
  2050. description: "Open `stdin`"
  2051. type: "boolean"
  2052. ReadOnly:
  2053. description: "Mount the container's root filesystem as read only."
  2054. type: "boolean"
  2055. Mounts:
  2056. description: "Specification for mounts to be added to containers created as part of the service."
  2057. type: "array"
  2058. items:
  2059. $ref: "#/definitions/Mount"
  2060. StopSignal:
  2061. description: "Signal to stop the container."
  2062. type: "string"
  2063. StopGracePeriod:
  2064. description: "Amount of time to wait for the container to terminate before forcefully killing it."
  2065. type: "integer"
  2066. format: "int64"
  2067. HealthCheck:
  2068. $ref: "#/definitions/HealthConfig"
  2069. Hosts:
  2070. type: "array"
  2071. description: |
  2072. A list of hostnames/IP mappings to add to the container's `/etc/hosts` file.
  2073. The format of extra hosts on swarmkit is specified in:
  2074. http://man7.org/linux/man-pages/man5/hosts.5.html
  2075. IP_address canonical_hostname [aliases...]
  2076. items:
  2077. type: "string"
  2078. DNSConfig:
  2079. description: "Specification for DNS related configurations in resolver configuration file (`resolv.conf`)."
  2080. type: "object"
  2081. properties:
  2082. Nameservers:
  2083. description: "The IP addresses of the name servers."
  2084. type: "array"
  2085. items:
  2086. type: "string"
  2087. Search:
  2088. description: "A search list for host-name lookup."
  2089. type: "array"
  2090. items:
  2091. type: "string"
  2092. Options:
  2093. description: "A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.)."
  2094. type: "array"
  2095. items:
  2096. type: "string"
  2097. Secrets:
  2098. description: "Secrets contains references to zero or more secrets that will be exposed to the service."
  2099. type: "array"
  2100. items:
  2101. type: "object"
  2102. properties:
  2103. File:
  2104. description: "File represents a specific target that is backed by a file."
  2105. type: "object"
  2106. properties:
  2107. Name:
  2108. description: "Name represents the final filename in the filesystem."
  2109. type: "string"
  2110. UID:
  2111. description: "UID represents the file UID."
  2112. type: "string"
  2113. GID:
  2114. description: "GID represents the file GID."
  2115. type: "string"
  2116. Mode:
  2117. description: "Mode represents the FileMode of the file."
  2118. type: "integer"
  2119. format: "uint32"
  2120. SecretID:
  2121. description: "SecretID represents the ID of the specific secret that we're referencing."
  2122. type: "string"
  2123. SecretName:
  2124. description: |
  2125. SecretName is the name of the secret that this references, but this is just provided for
  2126. lookup/display purposes. The secret in the reference will be identified by its ID.
  2127. type: "string"
  2128. Configs:
  2129. description: "Configs contains references to zero or more configs that will be exposed to the service."
  2130. type: "array"
  2131. items:
  2132. type: "object"
  2133. properties:
  2134. File:
  2135. description: "File represents a specific target that is backed by a file."
  2136. type: "object"
  2137. properties:
  2138. Name:
  2139. description: "Name represents the final filename in the filesystem."
  2140. type: "string"
  2141. UID:
  2142. description: "UID represents the file UID."
  2143. type: "string"
  2144. GID:
  2145. description: "GID represents the file GID."
  2146. type: "string"
  2147. Mode:
  2148. description: "Mode represents the FileMode of the file."
  2149. type: "integer"
  2150. format: "uint32"
  2151. ConfigID:
  2152. description: "ConfigID represents the ID of the specific config that we're referencing."
  2153. type: "string"
  2154. ConfigName:
  2155. description: |
  2156. ConfigName is the name of the config that this references, but this is just provided for
  2157. lookup/display purposes. The config in the reference will be identified by its ID.
  2158. type: "string"
  2159. Resources:
  2160. description: "Resource requirements which apply to each individual container created as part of the service."
  2161. type: "object"
  2162. properties:
  2163. Limits:
  2164. description: "Define resources limits."
  2165. type: "object"
  2166. properties:
  2167. NanoCPUs:
  2168. description: "CPU limit in units of 10<sup>-9</sup> CPU shares."
  2169. type: "integer"
  2170. format: "int64"
  2171. MemoryBytes:
  2172. description: "Memory limit in Bytes."
  2173. type: "integer"
  2174. format: "int64"
  2175. Reservations:
  2176. description: "Define resources reservation."
  2177. properties:
  2178. NanoCPUs:
  2179. description: "CPU reservation in units of 10<sup>-9</sup> CPU shares."
  2180. type: "integer"
  2181. format: "int64"
  2182. MemoryBytes:
  2183. description: "Memory reservation in Bytes."
  2184. type: "integer"
  2185. format: "int64"
  2186. RestartPolicy:
  2187. description: "Specification for the restart policy which applies to containers created as part of this service."
  2188. type: "object"
  2189. properties:
  2190. Condition:
  2191. description: "Condition for restart."
  2192. type: "string"
  2193. enum:
  2194. - "none"
  2195. - "on-failure"
  2196. - "any"
  2197. Delay:
  2198. description: "Delay between restart attempts."
  2199. type: "integer"
  2200. format: "int64"
  2201. MaxAttempts:
  2202. description: "Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)."
  2203. type: "integer"
  2204. format: "int64"
  2205. default: 0
  2206. Window:
  2207. description: "Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded)."
  2208. type: "integer"
  2209. format: "int64"
  2210. default: 0
  2211. Placement:
  2212. type: "object"
  2213. properties:
  2214. Constraints:
  2215. description: "An array of constraints."
  2216. type: "array"
  2217. items:
  2218. type: "string"
  2219. Preferences:
  2220. description: "Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence."
  2221. type: "array"
  2222. items:
  2223. type: "object"
  2224. properties:
  2225. Spread:
  2226. type: "object"
  2227. properties:
  2228. SpreadDescriptor:
  2229. description: "label descriptor, such as engine.labels.az"
  2230. type: "string"
  2231. Platforms:
  2232. description: "An array of supported platforms."
  2233. type: "array"
  2234. items:
  2235. type: "object"
  2236. properties:
  2237. Architecture:
  2238. type: "string"
  2239. OS:
  2240. type: "string"
  2241. ForceUpdate:
  2242. description: "A counter that triggers an update even if no relevant parameters have been changed."
  2243. type: "integer"
  2244. Runtime:
  2245. description: "Runtime is the type of runtime specified for the task executor."
  2246. type: "string"
  2247. Networks:
  2248. type: "array"
  2249. items:
  2250. type: "object"
  2251. properties:
  2252. Target:
  2253. type: "string"
  2254. Aliases:
  2255. type: "array"
  2256. items:
  2257. type: "string"
  2258. LogDriver:
  2259. description: "Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified."
  2260. type: "object"
  2261. properties:
  2262. Name:
  2263. type: "string"
  2264. Options:
  2265. type: "object"
  2266. additionalProperties:
  2267. type: "string"
  2268. TaskState:
  2269. type: "string"
  2270. enum:
  2271. - "new"
  2272. - "allocated"
  2273. - "pending"
  2274. - "assigned"
  2275. - "accepted"
  2276. - "preparing"
  2277. - "ready"
  2278. - "starting"
  2279. - "running"
  2280. - "complete"
  2281. - "shutdown"
  2282. - "failed"
  2283. - "rejected"
  2284. Task:
  2285. type: "object"
  2286. properties:
  2287. ID:
  2288. description: "The ID of the task."
  2289. type: "string"
  2290. Version:
  2291. $ref: "#/definitions/ObjectVersion"
  2292. CreatedAt:
  2293. type: "string"
  2294. format: "dateTime"
  2295. UpdatedAt:
  2296. type: "string"
  2297. format: "dateTime"
  2298. Name:
  2299. description: "Name of the task."
  2300. type: "string"
  2301. Labels:
  2302. description: "User-defined key/value metadata."
  2303. type: "object"
  2304. additionalProperties:
  2305. type: "string"
  2306. Spec:
  2307. $ref: "#/definitions/TaskSpec"
  2308. ServiceID:
  2309. description: "The ID of the service this task is part of."
  2310. type: "string"
  2311. Slot:
  2312. type: "integer"
  2313. NodeID:
  2314. description: "The ID of the node that this task is on."
  2315. type: "string"
  2316. Status:
  2317. type: "object"
  2318. properties:
  2319. Timestamp:
  2320. type: "string"
  2321. format: "dateTime"
  2322. State:
  2323. $ref: "#/definitions/TaskState"
  2324. Message:
  2325. type: "string"
  2326. Err:
  2327. type: "string"
  2328. ContainerStatus:
  2329. type: "object"
  2330. properties:
  2331. ContainerID:
  2332. type: "string"
  2333. PID:
  2334. type: "integer"
  2335. ExitCode:
  2336. type: "integer"
  2337. DesiredState:
  2338. $ref: "#/definitions/TaskState"
  2339. example:
  2340. ID: "0kzzo1i0y4jz6027t0k7aezc7"
  2341. Version:
  2342. Index: 71
  2343. CreatedAt: "2016-06-07T21:07:31.171892745Z"
  2344. UpdatedAt: "2016-06-07T21:07:31.376370513Z"
  2345. Spec:
  2346. ContainerSpec:
  2347. Image: "redis"
  2348. Resources:
  2349. Limits: {}
  2350. Reservations: {}
  2351. RestartPolicy:
  2352. Condition: "any"
  2353. MaxAttempts: 0
  2354. Placement: {}
  2355. ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  2356. Slot: 1
  2357. NodeID: "60gvrl6tm78dmak4yl7srz94v"
  2358. Status:
  2359. Timestamp: "2016-06-07T21:07:31.290032978Z"
  2360. State: "running"
  2361. Message: "started"
  2362. ContainerStatus:
  2363. ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
  2364. PID: 677
  2365. DesiredState: "running"
  2366. NetworksAttachments:
  2367. - Network:
  2368. ID: "4qvuz4ko70xaltuqbt8956gd1"
  2369. Version:
  2370. Index: 18
  2371. CreatedAt: "2016-06-07T20:31:11.912919752Z"
  2372. UpdatedAt: "2016-06-07T21:07:29.955277358Z"
  2373. Spec:
  2374. Name: "ingress"
  2375. Labels:
  2376. com.docker.swarm.internal: "true"
  2377. DriverConfiguration: {}
  2378. IPAMOptions:
  2379. Driver: {}
  2380. Configs:
  2381. - Subnet: "10.255.0.0/16"
  2382. Gateway: "10.255.0.1"
  2383. DriverState:
  2384. Name: "overlay"
  2385. Options:
  2386. com.docker.network.driver.overlay.vxlanid_list: "256"
  2387. IPAMOptions:
  2388. Driver:
  2389. Name: "default"
  2390. Configs:
  2391. - Subnet: "10.255.0.0/16"
  2392. Gateway: "10.255.0.1"
  2393. Addresses:
  2394. - "10.255.0.10/16"
  2395. ServiceSpec:
  2396. description: "User modifiable configuration for a service."
  2397. type: object
  2398. properties:
  2399. Name:
  2400. description: "Name of the service."
  2401. type: "string"
  2402. Labels:
  2403. description: "User-defined key/value metadata."
  2404. type: "object"
  2405. additionalProperties:
  2406. type: "string"
  2407. TaskTemplate:
  2408. $ref: "#/definitions/TaskSpec"
  2409. Mode:
  2410. description: "Scheduling mode for the service."
  2411. type: "object"
  2412. properties:
  2413. Replicated:
  2414. type: "object"
  2415. properties:
  2416. Replicas:
  2417. type: "integer"
  2418. format: "int64"
  2419. Global:
  2420. type: "object"
  2421. UpdateConfig:
  2422. description: "Specification for the update strategy of the service."
  2423. type: "object"
  2424. properties:
  2425. Parallelism:
  2426. description: "Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism)."
  2427. type: "integer"
  2428. format: "int64"
  2429. Delay:
  2430. description: "Amount of time between updates, in nanoseconds."
  2431. type: "integer"
  2432. format: "int64"
  2433. FailureAction:
  2434. description: "Action to take if an updated task fails to run, or stops running during the update."
  2435. type: "string"
  2436. enum:
  2437. - "continue"
  2438. - "pause"
  2439. - "rollback"
  2440. Monitor:
  2441. description: "Amount of time to monitor each updated task for failures, in nanoseconds."
  2442. type: "integer"
  2443. format: "int64"
  2444. MaxFailureRatio:
  2445. description: "The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1."
  2446. type: "number"
  2447. default: 0
  2448. Order:
  2449. description: "The order of operations when rolling out an updated task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down."
  2450. type: "string"
  2451. enum:
  2452. - "stop-first"
  2453. - "start-first"
  2454. RollbackConfig:
  2455. description: "Specification for the rollback strategy of the service."
  2456. type: "object"
  2457. properties:
  2458. Parallelism:
  2459. description: "Maximum number of tasks to be rolled back in one iteration (0 means unlimited parallelism)."
  2460. type: "integer"
  2461. format: "int64"
  2462. Delay:
  2463. description: "Amount of time between rollback iterations, in nanoseconds."
  2464. type: "integer"
  2465. format: "int64"
  2466. FailureAction:
  2467. description: "Action to take if an rolled back task fails to run, or stops running during the rollback."
  2468. type: "string"
  2469. enum:
  2470. - "continue"
  2471. - "pause"
  2472. Monitor:
  2473. description: "Amount of time to monitor each rolled back task for failures, in nanoseconds."
  2474. type: "integer"
  2475. format: "int64"
  2476. MaxFailureRatio:
  2477. description: "The fraction of tasks that may fail during a rollback before the failure action is invoked, specified as a floating point number between 0 and 1."
  2478. type: "number"
  2479. default: 0
  2480. Order:
  2481. description: "The order of operations when rolling back a task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down."
  2482. type: "string"
  2483. enum:
  2484. - "stop-first"
  2485. - "start-first"
  2486. Networks:
  2487. description: "Array of network names or IDs to attach the service to."
  2488. type: "array"
  2489. items:
  2490. type: "object"
  2491. properties:
  2492. Target:
  2493. type: "string"
  2494. Aliases:
  2495. type: "array"
  2496. items:
  2497. type: "string"
  2498. EndpointSpec:
  2499. $ref: "#/definitions/EndpointSpec"
  2500. EndpointPortConfig:
  2501. type: "object"
  2502. properties:
  2503. Name:
  2504. type: "string"
  2505. Protocol:
  2506. type: "string"
  2507. enum:
  2508. - "tcp"
  2509. - "udp"
  2510. TargetPort:
  2511. description: "The port inside the container."
  2512. type: "integer"
  2513. PublishedPort:
  2514. description: "The port on the swarm hosts."
  2515. type: "integer"
  2516. EndpointSpec:
  2517. description: "Properties that can be configured to access and load balance a service."
  2518. type: "object"
  2519. properties:
  2520. Mode:
  2521. description: "The mode of resolution to use for internal load balancing
  2522. between tasks."
  2523. type: "string"
  2524. enum:
  2525. - "vip"
  2526. - "dnsrr"
  2527. default: "vip"
  2528. Ports:
  2529. description: "List of exposed ports that this service is accessible on from the outside. Ports can only be provided if `vip` resolution mode is used."
  2530. type: "array"
  2531. items:
  2532. $ref: "#/definitions/EndpointPortConfig"
  2533. Service:
  2534. type: "object"
  2535. properties:
  2536. ID:
  2537. type: "string"
  2538. Version:
  2539. $ref: "#/definitions/ObjectVersion"
  2540. CreatedAt:
  2541. type: "string"
  2542. format: "dateTime"
  2543. UpdatedAt:
  2544. type: "string"
  2545. format: "dateTime"
  2546. Spec:
  2547. $ref: "#/definitions/ServiceSpec"
  2548. Endpoint:
  2549. type: "object"
  2550. properties:
  2551. Spec:
  2552. $ref: "#/definitions/EndpointSpec"
  2553. Ports:
  2554. type: "array"
  2555. items:
  2556. $ref: "#/definitions/EndpointPortConfig"
  2557. VirtualIPs:
  2558. type: "array"
  2559. items:
  2560. type: "object"
  2561. properties:
  2562. NetworkID:
  2563. type: "string"
  2564. Addr:
  2565. type: "string"
  2566. UpdateStatus:
  2567. description: "The status of a service update."
  2568. type: "object"
  2569. properties:
  2570. State:
  2571. type: "string"
  2572. enum:
  2573. - "updating"
  2574. - "paused"
  2575. - "completed"
  2576. StartedAt:
  2577. type: "string"
  2578. format: "dateTime"
  2579. CompletedAt:
  2580. type: "string"
  2581. format: "dateTime"
  2582. Message:
  2583. type: "string"
  2584. example:
  2585. ID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  2586. Version:
  2587. Index: 19
  2588. CreatedAt: "2016-06-07T21:05:51.880065305Z"
  2589. UpdatedAt: "2016-06-07T21:07:29.962229872Z"
  2590. Spec:
  2591. Name: "hopeful_cori"
  2592. TaskTemplate:
  2593. ContainerSpec:
  2594. Image: "redis"
  2595. Resources:
  2596. Limits: {}
  2597. Reservations: {}
  2598. RestartPolicy:
  2599. Condition: "any"
  2600. MaxAttempts: 0
  2601. Placement: {}
  2602. ForceUpdate: 0
  2603. Mode:
  2604. Replicated:
  2605. Replicas: 1
  2606. UpdateConfig:
  2607. Parallelism: 1
  2608. Delay: 1000000000
  2609. FailureAction: "pause"
  2610. Monitor: 15000000000
  2611. MaxFailureRatio: 0.15
  2612. RollbackConfig:
  2613. Parallelism: 1
  2614. Delay: 1000000000
  2615. FailureAction: "pause"
  2616. Monitor: 15000000000
  2617. MaxFailureRatio: 0.15
  2618. EndpointSpec:
  2619. Mode: "vip"
  2620. Ports:
  2621. -
  2622. Protocol: "tcp"
  2623. TargetPort: 6379
  2624. PublishedPort: 30001
  2625. Endpoint:
  2626. Spec:
  2627. Mode: "vip"
  2628. Ports:
  2629. -
  2630. Protocol: "tcp"
  2631. TargetPort: 6379
  2632. PublishedPort: 30001
  2633. Ports:
  2634. -
  2635. Protocol: "tcp"
  2636. TargetPort: 6379
  2637. PublishedPort: 30001
  2638. VirtualIPs:
  2639. -
  2640. NetworkID: "4qvuz4ko70xaltuqbt8956gd1"
  2641. Addr: "10.255.0.2/16"
  2642. -
  2643. NetworkID: "4qvuz4ko70xaltuqbt8956gd1"
  2644. Addr: "10.255.0.3/16"
  2645. ImageDeleteResponseItem:
  2646. type: "object"
  2647. properties:
  2648. Untagged:
  2649. description: "The image ID of an image that was untagged"
  2650. type: "string"
  2651. Deleted:
  2652. description: "The image ID of an image that was deleted"
  2653. type: "string"
  2654. ServiceUpdateResponse:
  2655. type: "object"
  2656. properties:
  2657. Warnings:
  2658. description: "Optional warning messages"
  2659. type: "array"
  2660. items:
  2661. type: "string"
  2662. example:
  2663. Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"
  2664. ContainerSummary:
  2665. type: "array"
  2666. items:
  2667. type: "object"
  2668. properties:
  2669. Id:
  2670. description: "The ID of this container"
  2671. type: "string"
  2672. x-go-name: "ID"
  2673. Names:
  2674. description: "The names that this container has been given"
  2675. type: "array"
  2676. items:
  2677. type: "string"
  2678. Image:
  2679. description: "The name of the image used when creating this container"
  2680. type: "string"
  2681. ImageID:
  2682. description: "The ID of the image that this container was created from"
  2683. type: "string"
  2684. Command:
  2685. description: "Command to run when starting the container"
  2686. type: "string"
  2687. Created:
  2688. description: "When the container was created"
  2689. type: "integer"
  2690. format: "int64"
  2691. Ports:
  2692. description: "The ports exposed by this container"
  2693. type: "array"
  2694. items:
  2695. $ref: "#/definitions/Port"
  2696. SizeRw:
  2697. description: "The size of files that have been created or changed by this container"
  2698. type: "integer"
  2699. format: "int64"
  2700. SizeRootFs:
  2701. description: "The total size of all the files in this container"
  2702. type: "integer"
  2703. format: "int64"
  2704. Labels:
  2705. description: "User-defined key/value metadata."
  2706. type: "object"
  2707. additionalProperties:
  2708. type: "string"
  2709. State:
  2710. description: "The state of this container (e.g. `Exited`)"
  2711. type: "string"
  2712. Status:
  2713. description: "Additional human-readable status of this container (e.g. `Exit 0`)"
  2714. type: "string"
  2715. HostConfig:
  2716. type: "object"
  2717. properties:
  2718. NetworkMode:
  2719. type: "string"
  2720. NetworkSettings:
  2721. description: "A summary of the container's network settings"
  2722. type: "object"
  2723. properties:
  2724. Networks:
  2725. type: "object"
  2726. additionalProperties:
  2727. $ref: "#/definitions/EndpointSettings"
  2728. Mounts:
  2729. type: "array"
  2730. items:
  2731. $ref: "#/definitions/MountPoint"
  2732. SecretSpec:
  2733. type: "object"
  2734. properties:
  2735. Name:
  2736. description: "User-defined name of the secret."
  2737. type: "string"
  2738. Labels:
  2739. description: "User-defined key/value metadata."
  2740. type: "object"
  2741. additionalProperties:
  2742. type: "string"
  2743. Data:
  2744. description: "Base64-url-safe-encoded secret data"
  2745. type: "array"
  2746. items:
  2747. type: "string"
  2748. Secret:
  2749. type: "object"
  2750. properties:
  2751. ID:
  2752. type: "string"
  2753. Version:
  2754. $ref: "#/definitions/ObjectVersion"
  2755. CreatedAt:
  2756. type: "string"
  2757. format: "dateTime"
  2758. UpdatedAt:
  2759. type: "string"
  2760. format: "dateTime"
  2761. Spec:
  2762. $ref: "#/definitions/SecretSpec"
  2763. ConfigSpec:
  2764. type: "object"
  2765. properties:
  2766. Name:
  2767. description: "User-defined name of the config."
  2768. type: "string"
  2769. Labels:
  2770. description: "User-defined key/value metadata."
  2771. type: "object"
  2772. additionalProperties:
  2773. type: "string"
  2774. Data:
  2775. description: "Base64-url-safe-encoded config data"
  2776. type: "array"
  2777. items:
  2778. type: "string"
  2779. Config:
  2780. type: "object"
  2781. properties:
  2782. ID:
  2783. type: "string"
  2784. Version:
  2785. $ref: "#/definitions/ObjectVersion"
  2786. CreatedAt:
  2787. type: "string"
  2788. format: "dateTime"
  2789. UpdatedAt:
  2790. type: "string"
  2791. format: "dateTime"
  2792. Spec:
  2793. $ref: "#/definitions/ConfigSpec"
  2794. paths:
  2795. /containers/json:
  2796. get:
  2797. summary: "List containers"
  2798. operationId: "ContainerList"
  2799. produces:
  2800. - "application/json"
  2801. parameters:
  2802. - name: "all"
  2803. in: "query"
  2804. description: "Return all containers. By default, only running containers are shown"
  2805. type: "boolean"
  2806. default: false
  2807. - name: "limit"
  2808. in: "query"
  2809. description: "Return this number of most recently created containers, including non-running ones."
  2810. type: "integer"
  2811. - name: "size"
  2812. in: "query"
  2813. description: "Return the size of container as fields `SizeRw` and `SizeRootFs`."
  2814. type: "boolean"
  2815. default: false
  2816. - name: "filters"
  2817. in: "query"
  2818. description: |
  2819. Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{"status": ["paused"]}` will only return paused containers. Available filters:
  2820. - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`)
  2821. - `before`=(`<container id>` or `<container name>`)
  2822. - `expose`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)
  2823. - `exited=<int>` containers with exit code of `<int>`
  2824. - `health`=(`starting`|`healthy`|`unhealthy`|`none`)
  2825. - `id=<ID>` a container's ID
  2826. - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only)
  2827. - `is-task=`(`true`|`false`)
  2828. - `label=key` or `label="key=value"` of a container label
  2829. - `name=<name>` a container's name
  2830. - `network`=(`<network id>` or `<network name>`)
  2831. - `publish`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)
  2832. - `since`=(`<container id>` or `<container name>`)
  2833. - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`)
  2834. - `volume`=(`<volume name>` or `<mount point destination>`)
  2835. type: "string"
  2836. responses:
  2837. 200:
  2838. description: "no error"
  2839. schema:
  2840. $ref: "#/definitions/ContainerSummary"
  2841. examples:
  2842. application/json:
  2843. - Id: "8dfafdbc3a40"
  2844. Names:
  2845. - "/boring_feynman"
  2846. Image: "ubuntu:latest"
  2847. ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  2848. Command: "echo 1"
  2849. Created: 1367854155
  2850. State: "Exited"
  2851. Status: "Exit 0"
  2852. Ports:
  2853. - PrivatePort: 2222
  2854. PublicPort: 3333
  2855. Type: "tcp"
  2856. Labels:
  2857. com.example.vendor: "Acme"
  2858. com.example.license: "GPL"
  2859. com.example.version: "1.0"
  2860. SizeRw: 12288
  2861. SizeRootFs: 0
  2862. HostConfig:
  2863. NetworkMode: "default"
  2864. NetworkSettings:
  2865. Networks:
  2866. bridge:
  2867. NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  2868. EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f"
  2869. Gateway: "172.17.0.1"
  2870. IPAddress: "172.17.0.2"
  2871. IPPrefixLen: 16
  2872. IPv6Gateway: ""
  2873. GlobalIPv6Address: ""
  2874. GlobalIPv6PrefixLen: 0
  2875. MacAddress: "02:42:ac:11:00:02"
  2876. Mounts:
  2877. - Name: "fac362...80535"
  2878. Source: "/data"
  2879. Destination: "/data"
  2880. Driver: "local"
  2881. Mode: "ro,Z"
  2882. RW: false
  2883. Propagation: ""
  2884. - Id: "9cd87474be90"
  2885. Names:
  2886. - "/coolName"
  2887. Image: "ubuntu:latest"
  2888. ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  2889. Command: "echo 222222"
  2890. Created: 1367854155
  2891. State: "Exited"
  2892. Status: "Exit 0"
  2893. Ports: []
  2894. Labels: {}
  2895. SizeRw: 12288
  2896. SizeRootFs: 0
  2897. HostConfig:
  2898. NetworkMode: "default"
  2899. NetworkSettings:
  2900. Networks:
  2901. bridge:
  2902. NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  2903. EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a"
  2904. Gateway: "172.17.0.1"
  2905. IPAddress: "172.17.0.8"
  2906. IPPrefixLen: 16
  2907. IPv6Gateway: ""
  2908. GlobalIPv6Address: ""
  2909. GlobalIPv6PrefixLen: 0
  2910. MacAddress: "02:42:ac:11:00:08"
  2911. Mounts: []
  2912. - Id: "3176a2479c92"
  2913. Names:
  2914. - "/sleepy_dog"
  2915. Image: "ubuntu:latest"
  2916. ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  2917. Command: "echo 3333333333333333"
  2918. Created: 1367854154
  2919. State: "Exited"
  2920. Status: "Exit 0"
  2921. Ports: []
  2922. Labels: {}
  2923. SizeRw: 12288
  2924. SizeRootFs: 0
  2925. HostConfig:
  2926. NetworkMode: "default"
  2927. NetworkSettings:
  2928. Networks:
  2929. bridge:
  2930. NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  2931. EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d"
  2932. Gateway: "172.17.0.1"
  2933. IPAddress: "172.17.0.6"
  2934. IPPrefixLen: 16
  2935. IPv6Gateway: ""
  2936. GlobalIPv6Address: ""
  2937. GlobalIPv6PrefixLen: 0
  2938. MacAddress: "02:42:ac:11:00:06"
  2939. Mounts: []
  2940. - Id: "4cb07b47f9fb"
  2941. Names:
  2942. - "/running_cat"
  2943. Image: "ubuntu:latest"
  2944. ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  2945. Command: "echo 444444444444444444444444444444444"
  2946. Created: 1367854152
  2947. State: "Exited"
  2948. Status: "Exit 0"
  2949. Ports: []
  2950. Labels: {}
  2951. SizeRw: 12288
  2952. SizeRootFs: 0
  2953. HostConfig:
  2954. NetworkMode: "default"
  2955. NetworkSettings:
  2956. Networks:
  2957. bridge:
  2958. NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  2959. EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9"
  2960. Gateway: "172.17.0.1"
  2961. IPAddress: "172.17.0.5"
  2962. IPPrefixLen: 16
  2963. IPv6Gateway: ""
  2964. GlobalIPv6Address: ""
  2965. GlobalIPv6PrefixLen: 0
  2966. MacAddress: "02:42:ac:11:00:05"
  2967. Mounts: []
  2968. 400:
  2969. description: "bad parameter"
  2970. schema:
  2971. $ref: "#/definitions/ErrorResponse"
  2972. 500:
  2973. description: "server error"
  2974. schema:
  2975. $ref: "#/definitions/ErrorResponse"
  2976. tags: ["Container"]
  2977. /containers/create:
  2978. post:
  2979. summary: "Create a container"
  2980. operationId: "ContainerCreate"
  2981. consumes:
  2982. - "application/json"
  2983. - "application/octet-stream"
  2984. produces:
  2985. - "application/json"
  2986. parameters:
  2987. - name: "name"
  2988. in: "query"
  2989. description: "Assign the specified name to the container. Must match `/?[a-zA-Z0-9_-]+`."
  2990. type: "string"
  2991. pattern: "/?[a-zA-Z0-9_-]+"
  2992. - name: "body"
  2993. in: "body"
  2994. description: "Container to create"
  2995. schema:
  2996. allOf:
  2997. - $ref: "#/definitions/ContainerConfig"
  2998. - type: "object"
  2999. properties:
  3000. HostConfig:
  3001. $ref: "#/definitions/HostConfig"
  3002. NetworkingConfig:
  3003. description: "This container's networking configuration."
  3004. type: "object"
  3005. properties:
  3006. EndpointsConfig:
  3007. description: "A mapping of network name to endpoint configuration for that network."
  3008. type: "object"
  3009. additionalProperties:
  3010. $ref: "#/definitions/EndpointSettings"
  3011. example:
  3012. Hostname: ""
  3013. Domainname: ""
  3014. User: ""
  3015. AttachStdin: false
  3016. AttachStdout: true
  3017. AttachStderr: true
  3018. Tty: false
  3019. OpenStdin: false
  3020. StdinOnce: false
  3021. Env:
  3022. - "FOO=bar"
  3023. - "BAZ=quux"
  3024. Cmd:
  3025. - "date"
  3026. Entrypoint: ""
  3027. Image: "ubuntu"
  3028. Labels:
  3029. com.example.vendor: "Acme"
  3030. com.example.license: "GPL"
  3031. com.example.version: "1.0"
  3032. Volumes:
  3033. /volumes/data: {}
  3034. WorkingDir: ""
  3035. NetworkDisabled: false
  3036. MacAddress: "12:34:56:78:9a:bc"
  3037. ExposedPorts:
  3038. 22/tcp: {}
  3039. StopSignal: "SIGTERM"
  3040. StopTimeout: 10
  3041. HostConfig:
  3042. Binds:
  3043. - "/tmp:/tmp"
  3044. Links:
  3045. - "redis3:redis"
  3046. Memory: 0
  3047. MemorySwap: 0
  3048. MemoryReservation: 0
  3049. KernelMemory: 0
  3050. NanoCpus: 500000
  3051. CpuPercent: 80
  3052. CpuShares: 512
  3053. CpuPeriod: 100000
  3054. CpuRealtimePeriod: 1000000
  3055. CpuRealtimeRuntime: 10000
  3056. CpuQuota: 50000
  3057. CpusetCpus: "0,1"
  3058. CpusetMems: "0,1"
  3059. MaximumIOps: 0
  3060. MaximumIOBps: 0
  3061. BlkioWeight: 300
  3062. BlkioWeightDevice:
  3063. - {}
  3064. BlkioDeviceReadBps:
  3065. - {}
  3066. BlkioDeviceReadIOps:
  3067. - {}
  3068. BlkioDeviceWriteBps:
  3069. - {}
  3070. BlkioDeviceWriteIOps:
  3071. - {}
  3072. MemorySwappiness: 60
  3073. OomKillDisable: false
  3074. OomScoreAdj: 500
  3075. PidMode: ""
  3076. PidsLimit: -1
  3077. PortBindings:
  3078. 22/tcp:
  3079. - HostPort: "11022"
  3080. PublishAllPorts: false
  3081. Privileged: false
  3082. ReadonlyRootfs: false
  3083. Dns:
  3084. - "8.8.8.8"
  3085. DnsOptions:
  3086. - ""
  3087. DnsSearch:
  3088. - ""
  3089. VolumesFrom:
  3090. - "parent"
  3091. - "other:ro"
  3092. CapAdd:
  3093. - "NET_ADMIN"
  3094. CapDrop:
  3095. - "MKNOD"
  3096. GroupAdd:
  3097. - "newgroup"
  3098. RestartPolicy:
  3099. Name: ""
  3100. MaximumRetryCount: 0
  3101. AutoRemove: true
  3102. NetworkMode: "bridge"
  3103. Devices: []
  3104. Ulimits:
  3105. - {}
  3106. LogConfig:
  3107. Type: "json-file"
  3108. Config: {}
  3109. SecurityOpt: []
  3110. StorageOpt: {}
  3111. CgroupParent: ""
  3112. VolumeDriver: ""
  3113. ShmSize: 67108864
  3114. NetworkingConfig:
  3115. EndpointsConfig:
  3116. isolated_nw:
  3117. IPAMConfig:
  3118. IPv4Address: "172.20.30.33"
  3119. IPv6Address: "2001:db8:abcd::3033"
  3120. LinkLocalIPs:
  3121. - "169.254.34.68"
  3122. - "fe80::3468"
  3123. Links:
  3124. - "container_1"
  3125. - "container_2"
  3126. Aliases:
  3127. - "server_x"
  3128. - "server_y"
  3129. required: true
  3130. responses:
  3131. 201:
  3132. description: "Container created successfully"
  3133. schema:
  3134. type: "object"
  3135. required: [Id, Warnings]
  3136. properties:
  3137. Id:
  3138. description: "The ID of the created container"
  3139. type: "string"
  3140. x-nullable: false
  3141. Warnings:
  3142. description: "Warnings encountered when creating the container"
  3143. type: "array"
  3144. x-nullable: false
  3145. items:
  3146. type: "string"
  3147. examples:
  3148. application/json:
  3149. Id: "e90e34656806"
  3150. Warnings: []
  3151. 400:
  3152. description: "bad parameter"
  3153. schema:
  3154. $ref: "#/definitions/ErrorResponse"
  3155. 404:
  3156. description: "no such image"
  3157. schema:
  3158. $ref: "#/definitions/ErrorResponse"
  3159. examples:
  3160. application/json:
  3161. message: "No such image: c2ada9df5af8"
  3162. 406:
  3163. description: "impossible to attach"
  3164. schema:
  3165. $ref: "#/definitions/ErrorResponse"
  3166. 409:
  3167. description: "conflict"
  3168. schema:
  3169. $ref: "#/definitions/ErrorResponse"
  3170. 500:
  3171. description: "server error"
  3172. schema:
  3173. $ref: "#/definitions/ErrorResponse"
  3174. tags: ["Container"]
  3175. /containers/{id}/json:
  3176. get:
  3177. summary: "Inspect a container"
  3178. description: "Return low-level information about a container."
  3179. operationId: "ContainerInspect"
  3180. produces:
  3181. - "application/json"
  3182. responses:
  3183. 200:
  3184. description: "no error"
  3185. schema:
  3186. type: "object"
  3187. properties:
  3188. Id:
  3189. description: "The ID of the container"
  3190. type: "string"
  3191. Created:
  3192. description: "The time the container was created"
  3193. type: "string"
  3194. Path:
  3195. description: "The path to the command being run"
  3196. type: "string"
  3197. Args:
  3198. description: "The arguments to the command being run"
  3199. type: "array"
  3200. items:
  3201. type: "string"
  3202. State:
  3203. description: "The state of the container."
  3204. type: "object"
  3205. properties:
  3206. Status:
  3207. description: |
  3208. The status of the container. For example, `"running"` or `"exited"`.
  3209. type: "string"
  3210. enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"]
  3211. Running:
  3212. description: |
  3213. Whether this container is running.
  3214. Note that a running container can be _paused_. The `Running` and `Paused`
  3215. booleans are not mutually exclusive:
  3216. When pausing a container (on Linux), the cgroups freezer is used to suspend
  3217. all processes in the container. Freezing the process requires the process to
  3218. be running. As a result, paused containers are both `Running` _and_ `Paused`.
  3219. Use the `Status` field instead to determine if a container's state is "running".
  3220. type: "boolean"
  3221. Paused:
  3222. description: "Whether this container is paused."
  3223. type: "boolean"
  3224. Restarting:
  3225. description: "Whether this container is restarting."
  3226. type: "boolean"
  3227. OOMKilled:
  3228. description: "Whether this container has been killed because it ran out of memory."
  3229. type: "boolean"
  3230. Dead:
  3231. type: "boolean"
  3232. Pid:
  3233. description: "The process ID of this container"
  3234. type: "integer"
  3235. ExitCode:
  3236. description: "The last exit code of this container"
  3237. type: "integer"
  3238. Error:
  3239. type: "string"
  3240. StartedAt:
  3241. description: "The time when this container was last started."
  3242. type: "string"
  3243. FinishedAt:
  3244. description: "The time when this container last exited."
  3245. type: "string"
  3246. Image:
  3247. description: "The container's image"
  3248. type: "string"
  3249. ResolvConfPath:
  3250. type: "string"
  3251. HostnamePath:
  3252. type: "string"
  3253. HostsPath:
  3254. type: "string"
  3255. LogPath:
  3256. type: "string"
  3257. Node:
  3258. description: "TODO"
  3259. type: "object"
  3260. Name:
  3261. type: "string"
  3262. RestartCount:
  3263. type: "integer"
  3264. Driver:
  3265. type: "string"
  3266. MountLabel:
  3267. type: "string"
  3268. ProcessLabel:
  3269. type: "string"
  3270. AppArmorProfile:
  3271. type: "string"
  3272. ExecIDs:
  3273. type: "string"
  3274. HostConfig:
  3275. $ref: "#/definitions/HostConfig"
  3276. GraphDriver:
  3277. $ref: "#/definitions/GraphDriverData"
  3278. SizeRw:
  3279. description: "The size of files that have been created or changed by this container."
  3280. type: "integer"
  3281. format: "int64"
  3282. SizeRootFs:
  3283. description: "The total size of all the files in this container."
  3284. type: "integer"
  3285. format: "int64"
  3286. Mounts:
  3287. type: "array"
  3288. items:
  3289. $ref: "#/definitions/MountPoint"
  3290. Config:
  3291. $ref: "#/definitions/ContainerConfig"
  3292. NetworkSettings:
  3293. $ref: "#/definitions/NetworkConfig"
  3294. examples:
  3295. application/json:
  3296. AppArmorProfile: ""
  3297. Args:
  3298. - "-c"
  3299. - "exit 9"
  3300. Config:
  3301. AttachStderr: true
  3302. AttachStdin: false
  3303. AttachStdout: true
  3304. Cmd:
  3305. - "/bin/sh"
  3306. - "-c"
  3307. - "exit 9"
  3308. Domainname: ""
  3309. Env:
  3310. - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  3311. Hostname: "ba033ac44011"
  3312. Image: "ubuntu"
  3313. Labels:
  3314. com.example.vendor: "Acme"
  3315. com.example.license: "GPL"
  3316. com.example.version: "1.0"
  3317. MacAddress: ""
  3318. NetworkDisabled: false
  3319. OpenStdin: false
  3320. StdinOnce: false
  3321. Tty: false
  3322. User: ""
  3323. Volumes:
  3324. /volumes/data: {}
  3325. WorkingDir: ""
  3326. StopSignal: "SIGTERM"
  3327. StopTimeout: 10
  3328. Created: "2015-01-06T15:47:31.485331387Z"
  3329. Driver: "overlay2"
  3330. HostConfig:
  3331. MaximumIOps: 0
  3332. MaximumIOBps: 0
  3333. BlkioWeight: 0
  3334. BlkioWeightDevice:
  3335. - {}
  3336. BlkioDeviceReadBps:
  3337. - {}
  3338. BlkioDeviceWriteBps:
  3339. - {}
  3340. BlkioDeviceReadIOps:
  3341. - {}
  3342. BlkioDeviceWriteIOps:
  3343. - {}
  3344. ContainerIDFile: ""
  3345. CpusetCpus: ""
  3346. CpusetMems: ""
  3347. CpuPercent: 80
  3348. CpuShares: 0
  3349. CpuPeriod: 100000
  3350. CpuRealtimePeriod: 1000000
  3351. CpuRealtimeRuntime: 10000
  3352. Devices: []
  3353. IpcMode: ""
  3354. Memory: 0
  3355. MemorySwap: 0
  3356. MemoryReservation: 0
  3357. KernelMemory: 0
  3358. OomKillDisable: false
  3359. OomScoreAdj: 500
  3360. NetworkMode: "bridge"
  3361. PidMode: ""
  3362. PortBindings: {}
  3363. Privileged: false
  3364. ReadonlyRootfs: false
  3365. PublishAllPorts: false
  3366. RestartPolicy:
  3367. MaximumRetryCount: 2
  3368. Name: "on-failure"
  3369. LogConfig:
  3370. Type: "json-file"
  3371. Sysctls:
  3372. net.ipv4.ip_forward: "1"
  3373. Ulimits:
  3374. - {}
  3375. VolumeDriver: ""
  3376. ShmSize: 67108864
  3377. HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname"
  3378. HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts"
  3379. LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log"
  3380. Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39"
  3381. Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2"
  3382. MountLabel: ""
  3383. Name: "/boring_euclid"
  3384. NetworkSettings:
  3385. Bridge: ""
  3386. SandboxID: ""
  3387. HairpinMode: false
  3388. LinkLocalIPv6Address: ""
  3389. LinkLocalIPv6PrefixLen: 0
  3390. SandboxKey: ""
  3391. SecondaryIPAddresses: null
  3392. SecondaryIPv6Addresses: null
  3393. EndpointID: ""
  3394. Gateway: ""
  3395. GlobalIPv6Address: ""
  3396. GlobalIPv6PrefixLen: 0
  3397. IPAddress: ""
  3398. IPPrefixLen: 0
  3399. IPv6Gateway: ""
  3400. MacAddress: ""
  3401. Networks:
  3402. bridge:
  3403. NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  3404. EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d"
  3405. Gateway: "172.17.0.1"
  3406. IPAddress: "172.17.0.2"
  3407. IPPrefixLen: 16
  3408. IPv6Gateway: ""
  3409. GlobalIPv6Address: ""
  3410. GlobalIPv6PrefixLen: 0
  3411. MacAddress: "02:42:ac:12:00:02"
  3412. Path: "/bin/sh"
  3413. ProcessLabel: ""
  3414. ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf"
  3415. RestartCount: 1
  3416. State:
  3417. Error: ""
  3418. ExitCode: 9
  3419. FinishedAt: "2015-01-06T15:47:32.080254511Z"
  3420. OOMKilled: false
  3421. Dead: false
  3422. Paused: false
  3423. Pid: 0
  3424. Restarting: false
  3425. Running: true
  3426. StartedAt: "2015-01-06T15:47:32.072697474Z"
  3427. Status: "running"
  3428. Mounts:
  3429. - Name: "fac362...80535"
  3430. Source: "/data"
  3431. Destination: "/data"
  3432. Driver: "local"
  3433. Mode: "ro,Z"
  3434. RW: false
  3435. Propagation: ""
  3436. 404:
  3437. description: "no such container"
  3438. schema:
  3439. $ref: "#/definitions/ErrorResponse"
  3440. examples:
  3441. application/json:
  3442. message: "No such container: c2ada9df5af8"
  3443. 500:
  3444. description: "server error"
  3445. schema:
  3446. $ref: "#/definitions/ErrorResponse"
  3447. parameters:
  3448. - name: "id"
  3449. in: "path"
  3450. required: true
  3451. description: "ID or name of the container"
  3452. type: "string"
  3453. - name: "size"
  3454. in: "query"
  3455. type: "boolean"
  3456. default: false
  3457. description: "Return the size of container as fields `SizeRw` and `SizeRootFs`"
  3458. tags: ["Container"]
  3459. /containers/{id}/top:
  3460. get:
  3461. summary: "List processes running inside a container"
  3462. description: "On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows."
  3463. operationId: "ContainerTop"
  3464. responses:
  3465. 200:
  3466. description: "no error"
  3467. schema:
  3468. type: "object"
  3469. properties:
  3470. Titles:
  3471. description: "The ps column titles"
  3472. type: "array"
  3473. items:
  3474. type: "string"
  3475. Processes:
  3476. description: "Each process running in the container, where each is process is an array of values corresponding to the titles"
  3477. type: "array"
  3478. items:
  3479. type: "array"
  3480. items:
  3481. type: "string"
  3482. examples:
  3483. application/json:
  3484. Titles:
  3485. - "UID"
  3486. - "PID"
  3487. - "PPID"
  3488. - "C"
  3489. - "STIME"
  3490. - "TTY"
  3491. - "TIME"
  3492. - "CMD"
  3493. Processes:
  3494. -
  3495. - "root"
  3496. - "13642"
  3497. - "882"
  3498. - "0"
  3499. - "17:03"
  3500. - "pts/0"
  3501. - "00:00:00"
  3502. - "/bin/bash"
  3503. -
  3504. - "root"
  3505. - "13735"
  3506. - "13642"
  3507. - "0"
  3508. - "17:06"
  3509. - "pts/0"
  3510. - "00:00:00"
  3511. - "sleep 10"
  3512. 404:
  3513. description: "no such container"
  3514. schema:
  3515. $ref: "#/definitions/ErrorResponse"
  3516. examples:
  3517. application/json:
  3518. message: "No such container: c2ada9df5af8"
  3519. 500:
  3520. description: "server error"
  3521. schema:
  3522. $ref: "#/definitions/ErrorResponse"
  3523. parameters:
  3524. - name: "id"
  3525. in: "path"
  3526. required: true
  3527. description: "ID or name of the container"
  3528. type: "string"
  3529. - name: "ps_args"
  3530. in: "query"
  3531. description: "The arguments to pass to `ps`. For example, `aux`"
  3532. type: "string"
  3533. default: "-ef"
  3534. tags: ["Container"]
  3535. /containers/{id}/logs:
  3536. get:
  3537. summary: "Get container logs"
  3538. description: |
  3539. Get `stdout` and `stderr` logs from a container.
  3540. Note: This endpoint works only for containers with the `json-file` or `journald` logging driver.
  3541. operationId: "ContainerLogs"
  3542. responses:
  3543. 101:
  3544. description: "logs returned as a stream"
  3545. schema:
  3546. type: "string"
  3547. format: "binary"
  3548. 200:
  3549. description: "logs returned as a string in response body"
  3550. schema:
  3551. type: "string"
  3552. 404:
  3553. description: "no such container"
  3554. schema:
  3555. $ref: "#/definitions/ErrorResponse"
  3556. examples:
  3557. application/json:
  3558. message: "No such container: c2ada9df5af8"
  3559. 500:
  3560. description: "server error"
  3561. schema:
  3562. $ref: "#/definitions/ErrorResponse"
  3563. parameters:
  3564. - name: "id"
  3565. in: "path"
  3566. required: true
  3567. description: "ID or name of the container"
  3568. type: "string"
  3569. - name: "follow"
  3570. in: "query"
  3571. description: |
  3572. Return the logs as a stream.
  3573. This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach).
  3574. type: "boolean"
  3575. default: false
  3576. - name: "stdout"
  3577. in: "query"
  3578. description: "Return logs from `stdout`"
  3579. type: "boolean"
  3580. default: false
  3581. - name: "stderr"
  3582. in: "query"
  3583. description: "Return logs from `stderr`"
  3584. type: "boolean"
  3585. default: false
  3586. - name: "since"
  3587. in: "query"
  3588. description: "Only return logs since this time, as a UNIX timestamp"
  3589. type: "integer"
  3590. default: 0
  3591. - name: "timestamps"
  3592. in: "query"
  3593. description: "Add timestamps to every log line"
  3594. type: "boolean"
  3595. default: false
  3596. - name: "tail"
  3597. in: "query"
  3598. description: "Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines."
  3599. type: "string"
  3600. default: "all"
  3601. tags: ["Container"]
  3602. /containers/{id}/changes:
  3603. get:
  3604. summary: "Get changes on a container’s filesystem"
  3605. description: |
  3606. Returns which files in a container's filesystem have been added, deleted,
  3607. or modified. The `Kind` of modification can be one of:
  3608. - `0`: Modified
  3609. - `1`: Added
  3610. - `2`: Deleted
  3611. operationId: "ContainerChanges"
  3612. produces: ["application/json"]
  3613. responses:
  3614. 200:
  3615. description: "The list of changes"
  3616. schema:
  3617. type: "array"
  3618. items:
  3619. type: "object"
  3620. x-go-name: "ContainerChangeResponseItem"
  3621. required: [Path, Kind]
  3622. properties:
  3623. Path:
  3624. description: "Path to file that has changed"
  3625. type: "string"
  3626. x-nullable: false
  3627. Kind:
  3628. description: "Kind of change"
  3629. type: "integer"
  3630. format: "uint8"
  3631. enum: [0, 1, 2]
  3632. x-nullable: false
  3633. examples:
  3634. application/json:
  3635. - Path: "/dev"
  3636. Kind: 0
  3637. - Path: "/dev/kmsg"
  3638. Kind: 1
  3639. - Path: "/test"
  3640. Kind: 1
  3641. 404:
  3642. description: "no such container"
  3643. schema:
  3644. $ref: "#/definitions/ErrorResponse"
  3645. examples:
  3646. application/json:
  3647. message: "No such container: c2ada9df5af8"
  3648. 500:
  3649. description: "server error"
  3650. schema:
  3651. $ref: "#/definitions/ErrorResponse"
  3652. parameters:
  3653. - name: "id"
  3654. in: "path"
  3655. required: true
  3656. description: "ID or name of the container"
  3657. type: "string"
  3658. tags: ["Container"]
  3659. /containers/{id}/export:
  3660. get:
  3661. summary: "Export a container"
  3662. description: "Export the contents of a container as a tarball."
  3663. operationId: "ContainerExport"
  3664. produces:
  3665. - "application/octet-stream"
  3666. responses:
  3667. 200:
  3668. description: "no error"
  3669. 404:
  3670. description: "no such container"
  3671. schema:
  3672. $ref: "#/definitions/ErrorResponse"
  3673. examples:
  3674. application/json:
  3675. message: "No such container: c2ada9df5af8"
  3676. 500:
  3677. description: "server error"
  3678. schema:
  3679. $ref: "#/definitions/ErrorResponse"
  3680. parameters:
  3681. - name: "id"
  3682. in: "path"
  3683. required: true
  3684. description: "ID or name of the container"
  3685. type: "string"
  3686. tags: ["Container"]
  3687. /containers/{id}/stats:
  3688. get:
  3689. summary: "Get container stats based on resource usage"
  3690. description: |
  3691. This endpoint returns a live stream of a container’s resource usage
  3692. statistics.
  3693. The `precpu_stats` is the CPU statistic of last read, which is used
  3694. for calculating the CPU usage percentage. It is not the same as the
  3695. `cpu_stats` field.
  3696. If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is
  3697. nil then for compatibility with older daemons the length of the
  3698. corresponding `cpu_usage.percpu_usage` array should be used.
  3699. operationId: "ContainerStats"
  3700. produces: ["application/json"]
  3701. responses:
  3702. 200:
  3703. description: "no error"
  3704. schema:
  3705. type: "object"
  3706. examples:
  3707. application/json:
  3708. read: "2015-01-08T22:57:31.547920715Z"
  3709. pids_stats:
  3710. current: 3
  3711. networks:
  3712. eth0:
  3713. rx_bytes: 5338
  3714. rx_dropped: 0
  3715. rx_errors: 0
  3716. rx_packets: 36
  3717. tx_bytes: 648
  3718. tx_dropped: 0
  3719. tx_errors: 0
  3720. tx_packets: 8
  3721. eth5:
  3722. rx_bytes: 4641
  3723. rx_dropped: 0
  3724. rx_errors: 0
  3725. rx_packets: 26
  3726. tx_bytes: 690
  3727. tx_dropped: 0
  3728. tx_errors: 0
  3729. tx_packets: 9
  3730. memory_stats:
  3731. stats:
  3732. total_pgmajfault: 0
  3733. cache: 0
  3734. mapped_file: 0
  3735. total_inactive_file: 0
  3736. pgpgout: 414
  3737. rss: 6537216
  3738. total_mapped_file: 0
  3739. writeback: 0
  3740. unevictable: 0
  3741. pgpgin: 477
  3742. total_unevictable: 0
  3743. pgmajfault: 0
  3744. total_rss: 6537216
  3745. total_rss_huge: 6291456
  3746. total_writeback: 0
  3747. total_inactive_anon: 0
  3748. rss_huge: 6291456
  3749. hierarchical_memory_limit: 67108864
  3750. total_pgfault: 964
  3751. total_active_file: 0
  3752. active_anon: 6537216
  3753. total_active_anon: 6537216
  3754. total_pgpgout: 414
  3755. total_cache: 0
  3756. inactive_anon: 0
  3757. active_file: 0
  3758. pgfault: 964
  3759. inactive_file: 0
  3760. total_pgpgin: 477
  3761. max_usage: 6651904
  3762. usage: 6537216
  3763. failcnt: 0
  3764. limit: 67108864
  3765. blkio_stats: {}
  3766. cpu_stats:
  3767. cpu_usage:
  3768. percpu_usage:
  3769. - 8646879
  3770. - 24472255
  3771. - 36438778
  3772. - 30657443
  3773. usage_in_usermode: 50000000
  3774. total_usage: 100215355
  3775. usage_in_kernelmode: 30000000
  3776. system_cpu_usage: 739306590000000
  3777. online_cpus: 4
  3778. throttling_data:
  3779. periods: 0
  3780. throttled_periods: 0
  3781. throttled_time: 0
  3782. precpu_stats:
  3783. cpu_usage:
  3784. percpu_usage:
  3785. - 8646879
  3786. - 24350896
  3787. - 36438778
  3788. - 30657443
  3789. usage_in_usermode: 50000000
  3790. total_usage: 100093996
  3791. usage_in_kernelmode: 30000000
  3792. system_cpu_usage: 9492140000000
  3793. online_cpus: 4
  3794. throttling_data:
  3795. periods: 0
  3796. throttled_periods: 0
  3797. throttled_time: 0
  3798. 404:
  3799. description: "no such container"
  3800. schema:
  3801. $ref: "#/definitions/ErrorResponse"
  3802. examples:
  3803. application/json:
  3804. message: "No such container: c2ada9df5af8"
  3805. 500:
  3806. description: "server error"
  3807. schema:
  3808. $ref: "#/definitions/ErrorResponse"
  3809. parameters:
  3810. - name: "id"
  3811. in: "path"
  3812. required: true
  3813. description: "ID or name of the container"
  3814. type: "string"
  3815. - name: "stream"
  3816. in: "query"
  3817. description: "Stream the output. If false, the stats will be output once and then it will disconnect."
  3818. type: "boolean"
  3819. default: true
  3820. tags: ["Container"]
  3821. /containers/{id}/resize:
  3822. post:
  3823. summary: "Resize a container TTY"
  3824. description: "Resize the TTY for a container. You must restart the container for the resize to take effect."
  3825. operationId: "ContainerResize"
  3826. consumes:
  3827. - "application/octet-stream"
  3828. produces:
  3829. - "text/plain"
  3830. responses:
  3831. 200:
  3832. description: "no error"
  3833. 404:
  3834. description: "no such container"
  3835. schema:
  3836. $ref: "#/definitions/ErrorResponse"
  3837. examples:
  3838. application/json:
  3839. message: "No such container: c2ada9df5af8"
  3840. 500:
  3841. description: "cannot resize container"
  3842. schema:
  3843. $ref: "#/definitions/ErrorResponse"
  3844. parameters:
  3845. - name: "id"
  3846. in: "path"
  3847. required: true
  3848. description: "ID or name of the container"
  3849. type: "string"
  3850. - name: "h"
  3851. in: "query"
  3852. description: "Height of the tty session in characters"
  3853. type: "integer"
  3854. - name: "w"
  3855. in: "query"
  3856. description: "Width of the tty session in characters"
  3857. type: "integer"
  3858. tags: ["Container"]
  3859. /containers/{id}/start:
  3860. post:
  3861. summary: "Start a container"
  3862. operationId: "ContainerStart"
  3863. responses:
  3864. 204:
  3865. description: "no error"
  3866. 304:
  3867. description: "container already started"
  3868. schema:
  3869. $ref: "#/definitions/ErrorResponse"
  3870. 404:
  3871. description: "no such container"
  3872. schema:
  3873. $ref: "#/definitions/ErrorResponse"
  3874. examples:
  3875. application/json:
  3876. message: "No such container: c2ada9df5af8"
  3877. 500:
  3878. description: "server error"
  3879. schema:
  3880. $ref: "#/definitions/ErrorResponse"
  3881. parameters:
  3882. - name: "id"
  3883. in: "path"
  3884. required: true
  3885. description: "ID or name of the container"
  3886. type: "string"
  3887. - name: "detachKeys"
  3888. in: "query"
  3889. description: "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`."
  3890. type: "string"
  3891. tags: ["Container"]
  3892. /containers/{id}/stop:
  3893. post:
  3894. summary: "Stop a container"
  3895. operationId: "ContainerStop"
  3896. responses:
  3897. 204:
  3898. description: "no error"
  3899. 304:
  3900. description: "container already stopped"
  3901. schema:
  3902. $ref: "#/definitions/ErrorResponse"
  3903. 404:
  3904. description: "no such container"
  3905. schema:
  3906. $ref: "#/definitions/ErrorResponse"
  3907. examples:
  3908. application/json:
  3909. message: "No such container: c2ada9df5af8"
  3910. 500:
  3911. description: "server error"
  3912. schema:
  3913. $ref: "#/definitions/ErrorResponse"
  3914. parameters:
  3915. - name: "id"
  3916. in: "path"
  3917. required: true
  3918. description: "ID or name of the container"
  3919. type: "string"
  3920. - name: "t"
  3921. in: "query"
  3922. description: "Number of seconds to wait before killing the container"
  3923. type: "integer"
  3924. tags: ["Container"]
  3925. /containers/{id}/restart:
  3926. post:
  3927. summary: "Restart a container"
  3928. operationId: "ContainerRestart"
  3929. responses:
  3930. 204:
  3931. description: "no error"
  3932. 404:
  3933. description: "no such container"
  3934. schema:
  3935. $ref: "#/definitions/ErrorResponse"
  3936. examples:
  3937. application/json:
  3938. message: "No such container: c2ada9df5af8"
  3939. 500:
  3940. description: "server error"
  3941. schema:
  3942. $ref: "#/definitions/ErrorResponse"
  3943. parameters:
  3944. - name: "id"
  3945. in: "path"
  3946. required: true
  3947. description: "ID or name of the container"
  3948. type: "string"
  3949. - name: "t"
  3950. in: "query"
  3951. description: "Number of seconds to wait before killing the container"
  3952. type: "integer"
  3953. tags: ["Container"]
  3954. /containers/{id}/kill:
  3955. post:
  3956. summary: "Kill a container"
  3957. description: "Send a POSIX signal to a container, defaulting to killing to the container."
  3958. operationId: "ContainerKill"
  3959. responses:
  3960. 204:
  3961. description: "no error"
  3962. 404:
  3963. description: "no such container"
  3964. schema:
  3965. $ref: "#/definitions/ErrorResponse"
  3966. examples:
  3967. application/json:
  3968. message: "No such container: c2ada9df5af8"
  3969. 500:
  3970. description: "server error"
  3971. schema:
  3972. $ref: "#/definitions/ErrorResponse"
  3973. parameters:
  3974. - name: "id"
  3975. in: "path"
  3976. required: true
  3977. description: "ID or name of the container"
  3978. type: "string"
  3979. - name: "signal"
  3980. in: "query"
  3981. description: "Signal to send to the container as an integer or string (e.g. `SIGINT`)"
  3982. type: "string"
  3983. default: "SIGKILL"
  3984. tags: ["Container"]
  3985. /containers/{id}/update:
  3986. post:
  3987. summary: "Update a container"
  3988. description: "Change various configuration options of a container without having to recreate it."
  3989. operationId: "ContainerUpdate"
  3990. consumes: ["application/json"]
  3991. produces: ["application/json"]
  3992. responses:
  3993. 200:
  3994. description: "The container has been updated."
  3995. schema:
  3996. type: "object"
  3997. properties:
  3998. Warnings:
  3999. type: "array"
  4000. items:
  4001. type: "string"
  4002. 404:
  4003. description: "no such container"
  4004. schema:
  4005. $ref: "#/definitions/ErrorResponse"
  4006. examples:
  4007. application/json:
  4008. message: "No such container: c2ada9df5af8"
  4009. 500:
  4010. description: "server error"
  4011. schema:
  4012. $ref: "#/definitions/ErrorResponse"
  4013. parameters:
  4014. - name: "id"
  4015. in: "path"
  4016. required: true
  4017. description: "ID or name of the container"
  4018. type: "string"
  4019. - name: "update"
  4020. in: "body"
  4021. required: true
  4022. schema:
  4023. allOf:
  4024. - $ref: "#/definitions/Resources"
  4025. - type: "object"
  4026. properties:
  4027. RestartPolicy:
  4028. $ref: "#/definitions/RestartPolicy"
  4029. example:
  4030. BlkioWeight: 300
  4031. CpuShares: 512
  4032. CpuPeriod: 100000
  4033. CpuQuota: 50000
  4034. CpuRealtimePeriod: 1000000
  4035. CpuRealtimeRuntime: 10000
  4036. CpusetCpus: "0,1"
  4037. CpusetMems: "0"
  4038. Memory: 314572800
  4039. MemorySwap: 514288000
  4040. MemoryReservation: 209715200
  4041. KernelMemory: 52428800
  4042. RestartPolicy:
  4043. MaximumRetryCount: 4
  4044. Name: "on-failure"
  4045. tags: ["Container"]
  4046. /containers/{id}/rename:
  4047. post:
  4048. summary: "Rename a container"
  4049. operationId: "ContainerRename"
  4050. responses:
  4051. 204:
  4052. description: "no error"
  4053. 404:
  4054. description: "no such container"
  4055. schema:
  4056. $ref: "#/definitions/ErrorResponse"
  4057. examples:
  4058. application/json:
  4059. message: "No such container: c2ada9df5af8"
  4060. 409:
  4061. description: "name already in use"
  4062. schema:
  4063. $ref: "#/definitions/ErrorResponse"
  4064. 500:
  4065. description: "server error"
  4066. schema:
  4067. $ref: "#/definitions/ErrorResponse"
  4068. parameters:
  4069. - name: "id"
  4070. in: "path"
  4071. required: true
  4072. description: "ID or name of the container"
  4073. type: "string"
  4074. - name: "name"
  4075. in: "query"
  4076. required: true
  4077. description: "New name for the container"
  4078. type: "string"
  4079. tags: ["Container"]
  4080. /containers/{id}/pause:
  4081. post:
  4082. summary: "Pause a container"
  4083. description: |
  4084. Use the cgroups freezer to suspend all processes in a container.
  4085. Traditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the cgroups freezer the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed.
  4086. operationId: "ContainerPause"
  4087. responses:
  4088. 204:
  4089. description: "no error"
  4090. 404:
  4091. description: "no such container"
  4092. schema:
  4093. $ref: "#/definitions/ErrorResponse"
  4094. examples:
  4095. application/json:
  4096. message: "No such container: c2ada9df5af8"
  4097. 500:
  4098. description: "server error"
  4099. schema:
  4100. $ref: "#/definitions/ErrorResponse"
  4101. parameters:
  4102. - name: "id"
  4103. in: "path"
  4104. required: true
  4105. description: "ID or name of the container"
  4106. type: "string"
  4107. tags: ["Container"]
  4108. /containers/{id}/unpause:
  4109. post:
  4110. summary: "Unpause a container"
  4111. description: "Resume a container which has been paused."
  4112. operationId: "ContainerUnpause"
  4113. responses:
  4114. 204:
  4115. description: "no error"
  4116. 404:
  4117. description: "no such container"
  4118. schema:
  4119. $ref: "#/definitions/ErrorResponse"
  4120. examples:
  4121. application/json:
  4122. message: "No such container: c2ada9df5af8"
  4123. 500:
  4124. description: "server error"
  4125. schema:
  4126. $ref: "#/definitions/ErrorResponse"
  4127. parameters:
  4128. - name: "id"
  4129. in: "path"
  4130. required: true
  4131. description: "ID or name of the container"
  4132. type: "string"
  4133. tags: ["Container"]
  4134. /containers/{id}/attach:
  4135. post:
  4136. summary: "Attach to a container"
  4137. description: |
  4138. Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached.
  4139. Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything.
  4140. See [the documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details.
  4141. ### Hijacking
  4142. This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket.
  4143. This is the response from the daemon for an attach request:
  4144. ```
  4145. HTTP/1.1 200 OK
  4146. Content-Type: application/vnd.docker.raw-stream
  4147. [STREAM]
  4148. ```
  4149. After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server.
  4150. To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers.
  4151. For example, the client sends this request to upgrade the connection:
  4152. ```
  4153. POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1
  4154. Upgrade: tcp
  4155. Connection: Upgrade
  4156. ```
  4157. The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream:
  4158. ```
  4159. HTTP/1.1 101 UPGRADED
  4160. Content-Type: application/vnd.docker.raw-stream
  4161. Connection: Upgrade
  4162. Upgrade: tcp
  4163. [STREAM]
  4164. ```
  4165. ### Stream format
  4166. When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload.
  4167. The header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`).
  4168. It is encoded on the first eight bytes like this:
  4169. ```go
  4170. header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}
  4171. ```
  4172. `STREAM_TYPE` can be:
  4173. - 0: `stdin` (is written on `stdout`)
  4174. - 1: `stdout`
  4175. - 2: `stderr`
  4176. `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian.
  4177. Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`.
  4178. The simplest way to implement this protocol is the following:
  4179. 1. Read 8 bytes.
  4180. 2. Choose `stdout` or `stderr` depending on the first byte.
  4181. 3. Extract the frame size from the last four bytes.
  4182. 4. Read the extracted size and output it on the correct output.
  4183. 5. Goto 1.
  4184. ### Stream format when using a TTY
  4185. When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's `stdin`.
  4186. operationId: "ContainerAttach"
  4187. produces:
  4188. - "application/vnd.docker.raw-stream"
  4189. responses:
  4190. 101:
  4191. description: "no error, hints proxy about hijacking"
  4192. 200:
  4193. description: "no error, no upgrade header found"
  4194. 400:
  4195. description: "bad parameter"
  4196. schema:
  4197. $ref: "#/definitions/ErrorResponse"
  4198. 404:
  4199. description: "no such container"
  4200. schema:
  4201. $ref: "#/definitions/ErrorResponse"
  4202. examples:
  4203. application/json:
  4204. message: "No such container: c2ada9df5af8"
  4205. 500:
  4206. description: "server error"
  4207. schema:
  4208. $ref: "#/definitions/ErrorResponse"
  4209. parameters:
  4210. - name: "id"
  4211. in: "path"
  4212. required: true
  4213. description: "ID or name of the container"
  4214. type: "string"
  4215. - name: "detachKeys"
  4216. in: "query"
  4217. description: "Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`."
  4218. type: "string"
  4219. - name: "logs"
  4220. in: "query"
  4221. description: |
  4222. Replay previous logs from the container.
  4223. This is useful for attaching to a container that has started and you want to output everything since the container started.
  4224. If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output.
  4225. type: "boolean"
  4226. default: false
  4227. - name: "stream"
  4228. in: "query"
  4229. description: "Stream attached streams from the time the request was made onwards"
  4230. type: "boolean"
  4231. default: false
  4232. - name: "stdin"
  4233. in: "query"
  4234. description: "Attach to `stdin`"
  4235. type: "boolean"
  4236. default: false
  4237. - name: "stdout"
  4238. in: "query"
  4239. description: "Attach to `stdout`"
  4240. type: "boolean"
  4241. default: false
  4242. - name: "stderr"
  4243. in: "query"
  4244. description: "Attach to `stderr`"
  4245. type: "boolean"
  4246. default: false
  4247. tags: ["Container"]
  4248. /containers/{id}/attach/ws:
  4249. get:
  4250. summary: "Attach to a container via a websocket"
  4251. operationId: "ContainerAttachWebsocket"
  4252. responses:
  4253. 101:
  4254. description: "no error, hints proxy about hijacking"
  4255. 200:
  4256. description: "no error, no upgrade header found"
  4257. 400:
  4258. description: "bad parameter"
  4259. schema:
  4260. $ref: "#/definitions/ErrorResponse"
  4261. 404:
  4262. description: "no such container"
  4263. schema:
  4264. $ref: "#/definitions/ErrorResponse"
  4265. examples:
  4266. application/json:
  4267. message: "No such container: c2ada9df5af8"
  4268. 500:
  4269. description: "server error"
  4270. schema:
  4271. $ref: "#/definitions/ErrorResponse"
  4272. parameters:
  4273. - name: "id"
  4274. in: "path"
  4275. required: true
  4276. description: "ID or name of the container"
  4277. type: "string"
  4278. - name: "detachKeys"
  4279. in: "query"
  4280. description: "Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`."
  4281. type: "string"
  4282. - name: "logs"
  4283. in: "query"
  4284. description: "Return logs"
  4285. type: "boolean"
  4286. default: false
  4287. - name: "stream"
  4288. in: "query"
  4289. description: "Return stream"
  4290. type: "boolean"
  4291. default: false
  4292. tags: ["Container"]
  4293. /containers/{id}/wait:
  4294. post:
  4295. summary: "Wait for a container"
  4296. description: "Block until a container stops, then returns the exit code."
  4297. operationId: "ContainerWait"
  4298. produces: ["application/json"]
  4299. responses:
  4300. 200:
  4301. description: "The container has exit."
  4302. schema:
  4303. type: "object"
  4304. required: [StatusCode]
  4305. properties:
  4306. StatusCode:
  4307. description: "Exit code of the container"
  4308. type: "integer"
  4309. x-nullable: false
  4310. 400:
  4311. description: "bad parameter"
  4312. schema:
  4313. $ref: "#/definitions/ErrorResponse"
  4314. 404:
  4315. description: "no such container"
  4316. schema:
  4317. $ref: "#/definitions/ErrorResponse"
  4318. examples:
  4319. application/json:
  4320. message: "No such container: c2ada9df5af8"
  4321. 500:
  4322. description: "server error"
  4323. schema:
  4324. $ref: "#/definitions/ErrorResponse"
  4325. parameters:
  4326. - name: "id"
  4327. in: "path"
  4328. required: true
  4329. description: "ID or name of the container"
  4330. type: "string"
  4331. - name: "condition"
  4332. in: "query"
  4333. description: |
  4334. Wait until a container state reaches the given condition.
  4335. Defaults to `not-running` if omitted or empty.
  4336. type: "string"
  4337. enum:
  4338. - "not-running"
  4339. - "next-exit"
  4340. - "removed"
  4341. default: "not-running"
  4342. tags: ["Container"]
  4343. /containers/{id}:
  4344. delete:
  4345. summary: "Remove a container"
  4346. operationId: "ContainerDelete"
  4347. responses:
  4348. 204:
  4349. description: "no error"
  4350. 400:
  4351. description: "bad parameter"
  4352. schema:
  4353. $ref: "#/definitions/ErrorResponse"
  4354. 404:
  4355. description: "no such container"
  4356. schema:
  4357. $ref: "#/definitions/ErrorResponse"
  4358. examples:
  4359. application/json:
  4360. message: "No such container: c2ada9df5af8"
  4361. 409:
  4362. description: "conflict"
  4363. schema:
  4364. $ref: "#/definitions/ErrorResponse"
  4365. examples:
  4366. application/json:
  4367. message: "You cannot remove a running container: c2ada9df5af8. Stop the container before attempting removal or force remove"
  4368. 500:
  4369. description: "server error"
  4370. schema:
  4371. $ref: "#/definitions/ErrorResponse"
  4372. parameters:
  4373. - name: "id"
  4374. in: "path"
  4375. required: true
  4376. description: "ID or name of the container"
  4377. type: "string"
  4378. - name: "v"
  4379. in: "query"
  4380. description: "Remove anonymous volumes associated with the container."
  4381. type: "boolean"
  4382. default: false
  4383. - name: "force"
  4384. in: "query"
  4385. description: "If the container is running, kill it before removing it."
  4386. type: "boolean"
  4387. default: false
  4388. - name: "link"
  4389. in: "query"
  4390. description: "Remove the specified link associated with the container."
  4391. type: "boolean"
  4392. default: false
  4393. tags: ["Container"]
  4394. /containers/{id}/archive:
  4395. head:
  4396. summary: "Get information about files in a container"
  4397. description: "A response header `X-Docker-Container-Path-Stat` is return containing a base64 - encoded JSON object with some filesystem header information about the path."
  4398. operationId: "ContainerArchiveInfo"
  4399. responses:
  4400. 200:
  4401. description: "no error"
  4402. headers:
  4403. X-Docker-Container-Path-Stat:
  4404. type: "string"
  4405. description: "TODO"
  4406. 400:
  4407. description: "Bad parameter"
  4408. schema:
  4409. $ref: "#/definitions/ErrorResponse"
  4410. 404:
  4411. description: "Container or path does not exist"
  4412. schema:
  4413. $ref: "#/definitions/ErrorResponse"
  4414. examples:
  4415. application/json:
  4416. message: "No such container: c2ada9df5af8"
  4417. 500:
  4418. description: "Server error"
  4419. schema:
  4420. $ref: "#/definitions/ErrorResponse"
  4421. parameters:
  4422. - name: "id"
  4423. in: "path"
  4424. required: true
  4425. description: "ID or name of the container"
  4426. type: "string"
  4427. - name: "path"
  4428. in: "query"
  4429. required: true
  4430. description: "Resource in the container’s filesystem to archive."
  4431. type: "string"
  4432. tags: ["Container"]
  4433. get:
  4434. summary: "Get an archive of a filesystem resource in a container"
  4435. description: "Get a tar archive of a resource in the filesystem of container id."
  4436. operationId: "ContainerArchive"
  4437. produces: ["application/x-tar"]
  4438. responses:
  4439. 200:
  4440. description: "no error"
  4441. 400:
  4442. description: "Bad parameter"
  4443. schema:
  4444. $ref: "#/definitions/ErrorResponse"
  4445. 404:
  4446. description: "Container or path does not exist"
  4447. schema:
  4448. $ref: "#/definitions/ErrorResponse"
  4449. examples:
  4450. application/json:
  4451. message: "No such container: c2ada9df5af8"
  4452. 500:
  4453. description: "server error"
  4454. schema:
  4455. $ref: "#/definitions/ErrorResponse"
  4456. parameters:
  4457. - name: "id"
  4458. in: "path"
  4459. required: true
  4460. description: "ID or name of the container"
  4461. type: "string"
  4462. - name: "path"
  4463. in: "query"
  4464. required: true
  4465. description: "Resource in the container’s filesystem to archive."
  4466. type: "string"
  4467. tags: ["Container"]
  4468. put:
  4469. summary: "Extract an archive of files or folders to a directory in a container"
  4470. description: |
  4471. Upload a tar archive to be extracted to a path in the filesystem of container id.
  4472. `path` parameter is asserted to be a directory. If it exists as a file, 400 error
  4473. will be returned with message "not a directory".
  4474. operationId: "PutContainerArchive"
  4475. consumes: ["application/x-tar", "application/octet-stream"]
  4476. responses:
  4477. 200:
  4478. description: "The content was extracted successfully"
  4479. 400:
  4480. description: "Bad parameter"
  4481. schema:
  4482. $ref: "#/definitions/ErrorResponse"
  4483. examples:
  4484. application/json:
  4485. message: "not a directory"
  4486. 403:
  4487. description: "Permission denied, the volume or container rootfs is marked as read-only."
  4488. schema:
  4489. $ref: "#/definitions/ErrorResponse"
  4490. 404:
  4491. description: "No such container or path does not exist inside the container"
  4492. schema:
  4493. $ref: "#/definitions/ErrorResponse"
  4494. examples:
  4495. application/json:
  4496. message: "No such container: c2ada9df5af8"
  4497. 500:
  4498. description: "Server error"
  4499. schema:
  4500. $ref: "#/definitions/ErrorResponse"
  4501. parameters:
  4502. - name: "id"
  4503. in: "path"
  4504. required: true
  4505. description: "ID or name of the container"
  4506. type: "string"
  4507. - name: "path"
  4508. in: "query"
  4509. required: true
  4510. description: "Path to a directory in the container to extract the archive’s contents into. "
  4511. type: "string"
  4512. - name: "noOverwriteDirNonDir"
  4513. in: "query"
  4514. description: "If “1”, “true”, or “True” then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa."
  4515. type: "string"
  4516. - name: "inputStream"
  4517. in: "body"
  4518. required: true
  4519. description: "The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz."
  4520. schema:
  4521. type: "string"
  4522. tags: ["Container"]
  4523. /containers/prune:
  4524. post:
  4525. summary: "Delete stopped containers"
  4526. produces:
  4527. - "application/json"
  4528. operationId: "ContainerPrune"
  4529. parameters:
  4530. - name: "filters"
  4531. in: "query"
  4532. description: |
  4533. Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  4534. Available filters:
  4535. - `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.
  4536. - `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.
  4537. type: "string"
  4538. responses:
  4539. 200:
  4540. description: "No error"
  4541. schema:
  4542. type: "object"
  4543. properties:
  4544. ContainersDeleted:
  4545. description: "Container IDs that were deleted"
  4546. type: "array"
  4547. items:
  4548. type: "string"
  4549. SpaceReclaimed:
  4550. description: "Disk space reclaimed in bytes"
  4551. type: "integer"
  4552. format: "int64"
  4553. 500:
  4554. description: "Server error"
  4555. schema:
  4556. $ref: "#/definitions/ErrorResponse"
  4557. tags: ["Container"]
  4558. /images/json:
  4559. get:
  4560. summary: "List Images"
  4561. 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."
  4562. operationId: "ImageList"
  4563. produces:
  4564. - "application/json"
  4565. responses:
  4566. 200:
  4567. description: "Summary image data for the images matching the query"
  4568. schema:
  4569. type: "array"
  4570. items:
  4571. $ref: "#/definitions/ImageSummary"
  4572. examples:
  4573. application/json:
  4574. - Id: "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8"
  4575. ParentId: ""
  4576. RepoTags:
  4577. - "ubuntu:12.04"
  4578. - "ubuntu:precise"
  4579. RepoDigests:
  4580. - "ubuntu@sha256:992069aee4016783df6345315302fa59681aae51a8eeb2f889dea59290f21787"
  4581. Created: 1474925151
  4582. Size: 103579269
  4583. VirtualSize: 103579269
  4584. SharedSize: 0
  4585. Labels: {}
  4586. Containers: 2
  4587. - Id: "sha256:3e314f95dcace0f5e4fd37b10862fe8398e3c60ed36600bc0ca5fda78b087175"
  4588. ParentId: ""
  4589. RepoTags:
  4590. - "ubuntu:12.10"
  4591. - "ubuntu:quantal"
  4592. RepoDigests:
  4593. - "ubuntu@sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7"
  4594. - "ubuntu@sha256:68ea0200f0b90df725d99d823905b04cf844f6039ef60c60bf3e019915017bd3"
  4595. Created: 1403128455
  4596. Size: 172064416
  4597. VirtualSize: 172064416
  4598. SharedSize: 0
  4599. Labels: {}
  4600. Containers: 5
  4601. 500:
  4602. description: "server error"
  4603. schema:
  4604. $ref: "#/definitions/ErrorResponse"
  4605. parameters:
  4606. - name: "all"
  4607. in: "query"
  4608. description: "Show all images. Only images from a final layer (no children) are shown by default."
  4609. type: "boolean"
  4610. default: false
  4611. - name: "filters"
  4612. in: "query"
  4613. description: |
  4614. A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:
  4615. - `before`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)
  4616. - `dangling=true`
  4617. - `label=key` or `label="key=value"` of an image label
  4618. - `reference`=(`<image-name>[:<tag>]`)
  4619. - `since`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)
  4620. type: "string"
  4621. - name: "digests"
  4622. in: "query"
  4623. description: "Show digest information as a `RepoDigests` field on each image."
  4624. type: "boolean"
  4625. default: false
  4626. tags: ["Image"]
  4627. /build:
  4628. post:
  4629. summary: "Build an image"
  4630. description: |
  4631. Build an image from a tar archive with a `Dockerfile` in it.
  4632. 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/).
  4633. 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.
  4634. The build is canceled if the client drops the connection by quitting or being killed.
  4635. operationId: "ImageBuild"
  4636. consumes:
  4637. - "application/octet-stream"
  4638. produces:
  4639. - "application/json"
  4640. parameters:
  4641. - name: "inputStream"
  4642. in: "body"
  4643. description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz."
  4644. schema:
  4645. type: "string"
  4646. format: "binary"
  4647. - name: "dockerfile"
  4648. in: "query"
  4649. description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`."
  4650. type: "string"
  4651. default: "Dockerfile"
  4652. - name: "t"
  4653. in: "query"
  4654. 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."
  4655. type: "string"
  4656. - name: "extrahosts"
  4657. in: "query"
  4658. description: "Extra hosts to add to /etc/hosts"
  4659. type: "string"
  4660. - name: "remote"
  4661. in: "query"
  4662. 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."
  4663. type: "string"
  4664. - name: "q"
  4665. in: "query"
  4666. description: "Suppress verbose build output."
  4667. type: "boolean"
  4668. default: false
  4669. - name: "nocache"
  4670. in: "query"
  4671. description: "Do not use the cache when building the image."
  4672. type: "boolean"
  4673. default: false
  4674. - name: "cachefrom"
  4675. in: "query"
  4676. description: "JSON array of images used for build cache resolution."
  4677. type: "string"
  4678. - name: "pull"
  4679. in: "query"
  4680. description: "Attempt to pull the image even if an older image exists locally."
  4681. type: "string"
  4682. - name: "rm"
  4683. in: "query"
  4684. description: "Remove intermediate containers after a successful build."
  4685. type: "boolean"
  4686. default: true
  4687. - name: "forcerm"
  4688. in: "query"
  4689. description: "Always remove intermediate containers, even upon failure."
  4690. type: "boolean"
  4691. default: false
  4692. - name: "memory"
  4693. in: "query"
  4694. description: "Set memory limit for build."
  4695. type: "integer"
  4696. - name: "memswap"
  4697. in: "query"
  4698. description: "Total memory (memory + swap). Set as `-1` to disable swap."
  4699. type: "integer"
  4700. - name: "cpushares"
  4701. in: "query"
  4702. description: "CPU shares (relative weight)."
  4703. type: "integer"
  4704. - name: "cpusetcpus"
  4705. in: "query"
  4706. description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)."
  4707. type: "string"
  4708. - name: "cpuperiod"
  4709. in: "query"
  4710. description: "The length of a CPU period in microseconds."
  4711. type: "integer"
  4712. - name: "cpuquota"
  4713. in: "query"
  4714. description: "Microseconds of CPU time that the container can get in a CPU period."
  4715. type: "integer"
  4716. - name: "buildargs"
  4717. in: "query"
  4718. description: "JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)"
  4719. type: "integer"
  4720. - name: "shmsize"
  4721. in: "query"
  4722. description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB."
  4723. type: "integer"
  4724. - name: "squash"
  4725. in: "query"
  4726. description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*"
  4727. type: "boolean"
  4728. - name: "labels"
  4729. in: "query"
  4730. description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs."
  4731. type: "string"
  4732. - name: "networkmode"
  4733. in: "query"
  4734. description: "Sets the networking mode for the run commands during
  4735. build. Supported standard values are: `bridge`, `host`, `none`, and
  4736. `container:<name|id>`. Any other value is taken as a custom network's
  4737. name to which this container should connect to."
  4738. type: "string"
  4739. - name: "Content-type"
  4740. in: "header"
  4741. type: "string"
  4742. enum:
  4743. - "application/x-tar"
  4744. default: "application/x-tar"
  4745. - name: "X-Registry-Config"
  4746. in: "header"
  4747. description: |
  4748. This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to.
  4749. The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example:
  4750. ```
  4751. {
  4752. "docker.example.com": {
  4753. "username": "janedoe",
  4754. "password": "hunter2"
  4755. },
  4756. "https://index.docker.io/v1/": {
  4757. "username": "mobydock",
  4758. "password": "conta1n3rize14"
  4759. }
  4760. }
  4761. ```
  4762. 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.
  4763. type: "string"
  4764. responses:
  4765. 200:
  4766. description: "no error"
  4767. 400:
  4768. description: "Bad parameter"
  4769. schema:
  4770. $ref: "#/definitions/ErrorResponse"
  4771. 500:
  4772. description: "server error"
  4773. schema:
  4774. $ref: "#/definitions/ErrorResponse"
  4775. tags: ["Image"]
  4776. /images/create:
  4777. post:
  4778. summary: "Create an image"
  4779. description: "Create an image by either pulling it from a registry or importing it."
  4780. operationId: "ImageCreate"
  4781. consumes:
  4782. - "text/plain"
  4783. - "application/octet-stream"
  4784. produces:
  4785. - "application/json"
  4786. responses:
  4787. 200:
  4788. description: "no error"
  4789. 404:
  4790. description: "repository does not exist or no read access"
  4791. schema:
  4792. $ref: "#/definitions/ErrorResponse"
  4793. 500:
  4794. description: "server error"
  4795. schema:
  4796. $ref: "#/definitions/ErrorResponse"
  4797. parameters:
  4798. - name: "fromImage"
  4799. in: "query"
  4800. 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."
  4801. type: "string"
  4802. - name: "fromSrc"
  4803. in: "query"
  4804. 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."
  4805. type: "string"
  4806. - name: "repo"
  4807. in: "query"
  4808. 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."
  4809. type: "string"
  4810. - name: "tag"
  4811. in: "query"
  4812. description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled."
  4813. type: "string"
  4814. - name: "inputImage"
  4815. in: "body"
  4816. description: "Image content if the value `-` has been specified in fromSrc query parameter"
  4817. schema:
  4818. type: "string"
  4819. required: false
  4820. - name: "X-Registry-Auth"
  4821. in: "header"
  4822. description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)"
  4823. type: "string"
  4824. tags: ["Image"]
  4825. /images/{name}/json:
  4826. get:
  4827. summary: "Inspect an image"
  4828. description: "Return low-level information about an image."
  4829. operationId: "ImageInspect"
  4830. produces:
  4831. - "application/json"
  4832. responses:
  4833. 200:
  4834. description: "No error"
  4835. schema:
  4836. $ref: "#/definitions/Image"
  4837. examples:
  4838. application/json:
  4839. Id: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c"
  4840. Container: "cb91e48a60d01f1e27028b4fc6819f4f290b3cf12496c8176ec714d0d390984a"
  4841. Comment: ""
  4842. Os: "linux"
  4843. Architecture: "amd64"
  4844. Parent: "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
  4845. ContainerConfig:
  4846. Tty: false
  4847. Hostname: "e611e15f9c9d"
  4848. Domainname: ""
  4849. AttachStdout: false
  4850. PublishService: ""
  4851. AttachStdin: false
  4852. OpenStdin: false
  4853. StdinOnce: false
  4854. NetworkDisabled: false
  4855. OnBuild: []
  4856. Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
  4857. User: ""
  4858. WorkingDir: ""
  4859. MacAddress: ""
  4860. AttachStderr: false
  4861. Labels:
  4862. com.example.license: "GPL"
  4863. com.example.version: "1.0"
  4864. com.example.vendor: "Acme"
  4865. Env:
  4866. - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  4867. Cmd:
  4868. - "/bin/sh"
  4869. - "-c"
  4870. - "#(nop) LABEL com.example.vendor=Acme com.example.license=GPL com.example.version=1.0"
  4871. DockerVersion: "1.9.0-dev"
  4872. VirtualSize: 188359297
  4873. Size: 0
  4874. Author: ""
  4875. Created: "2015-09-10T08:30:53.26995814Z"
  4876. GraphDriver:
  4877. Name: "aufs"
  4878. Data: {}
  4879. RepoDigests:
  4880. - "localhost:5000/test/busybox/example@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf"
  4881. RepoTags:
  4882. - "example:1.0"
  4883. - "example:latest"
  4884. - "example:stable"
  4885. Config:
  4886. Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
  4887. NetworkDisabled: false
  4888. OnBuild: []
  4889. StdinOnce: false
  4890. PublishService: ""
  4891. AttachStdin: false
  4892. OpenStdin: false
  4893. Domainname: ""
  4894. AttachStdout: false
  4895. Tty: false
  4896. Hostname: "e611e15f9c9d"
  4897. Cmd:
  4898. - "/bin/bash"
  4899. Env:
  4900. - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  4901. Labels:
  4902. com.example.vendor: "Acme"
  4903. com.example.version: "1.0"
  4904. com.example.license: "GPL"
  4905. MacAddress: ""
  4906. AttachStderr: false
  4907. WorkingDir: ""
  4908. User: ""
  4909. RootFS:
  4910. Type: "layers"
  4911. Layers:
  4912. - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6"
  4913. - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
  4914. 404:
  4915. description: "No such image"
  4916. schema:
  4917. $ref: "#/definitions/ErrorResponse"
  4918. examples:
  4919. application/json:
  4920. message: "No such image: someimage (tag: latest)"
  4921. 500:
  4922. description: "Server error"
  4923. schema:
  4924. $ref: "#/definitions/ErrorResponse"
  4925. parameters:
  4926. - name: "name"
  4927. in: "path"
  4928. description: "Image name or id"
  4929. type: "string"
  4930. required: true
  4931. tags: ["Image"]
  4932. /images/{name}/history:
  4933. get:
  4934. summary: "Get the history of an image"
  4935. description: "Return parent layers of an image."
  4936. operationId: "ImageHistory"
  4937. produces: ["application/json"]
  4938. responses:
  4939. 200:
  4940. description: "List of image layers"
  4941. schema:
  4942. type: "array"
  4943. items:
  4944. type: "object"
  4945. x-go-name: HistoryResponseItem
  4946. required: [Id, Created, CreatedBy, Tags, Size, Comment]
  4947. properties:
  4948. Id:
  4949. type: "string"
  4950. x-nullable: false
  4951. Created:
  4952. type: "integer"
  4953. format: "int64"
  4954. x-nullable: false
  4955. CreatedBy:
  4956. type: "string"
  4957. x-nullable: false
  4958. Tags:
  4959. type: "array"
  4960. items:
  4961. type: "string"
  4962. Size:
  4963. type: "integer"
  4964. format: "int64"
  4965. x-nullable: false
  4966. Comment:
  4967. type: "string"
  4968. x-nullable: false
  4969. examples:
  4970. application/json:
  4971. - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710"
  4972. Created: 1398108230
  4973. CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /"
  4974. Tags:
  4975. - "ubuntu:lucid"
  4976. - "ubuntu:10.04"
  4977. Size: 182964289
  4978. Comment: ""
  4979. - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8"
  4980. Created: 1398108222
  4981. 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/"
  4982. Tags: []
  4983. Size: 0
  4984. Comment: ""
  4985. - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158"
  4986. Created: 1371157430
  4987. CreatedBy: ""
  4988. Tags:
  4989. - "scratch12:latest"
  4990. - "scratch:latest"
  4991. Size: 0
  4992. Comment: "Imported from -"
  4993. 404:
  4994. description: "No such image"
  4995. schema:
  4996. $ref: "#/definitions/ErrorResponse"
  4997. 500:
  4998. description: "Server error"
  4999. schema:
  5000. $ref: "#/definitions/ErrorResponse"
  5001. parameters:
  5002. - name: "name"
  5003. in: "path"
  5004. description: "Image name or ID"
  5005. type: "string"
  5006. required: true
  5007. tags: ["Image"]
  5008. /images/{name}/push:
  5009. post:
  5010. summary: "Push an image"
  5011. description: |
  5012. Push an image to a registry.
  5013. If you wish to push an image on to a private registry, that image must already have a tag which references the registry. For example, `registry.example.com/myimage:latest`.
  5014. The push is cancelled if the HTTP connection is closed.
  5015. operationId: "ImagePush"
  5016. consumes:
  5017. - "application/octet-stream"
  5018. responses:
  5019. 200:
  5020. description: "No error"
  5021. 404:
  5022. description: "No such image"
  5023. schema:
  5024. $ref: "#/definitions/ErrorResponse"
  5025. 500:
  5026. description: "Server error"
  5027. schema:
  5028. $ref: "#/definitions/ErrorResponse"
  5029. parameters:
  5030. - name: "name"
  5031. in: "path"
  5032. description: "Image name or ID."
  5033. type: "string"
  5034. required: true
  5035. - name: "tag"
  5036. in: "query"
  5037. description: "The tag to associate with the image on the registry."
  5038. type: "string"
  5039. - name: "X-Registry-Auth"
  5040. in: "header"
  5041. description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)"
  5042. type: "string"
  5043. required: true
  5044. tags: ["Image"]
  5045. /images/{name}/tag:
  5046. post:
  5047. summary: "Tag an image"
  5048. description: "Tag an image so that it becomes part of a repository."
  5049. operationId: "ImageTag"
  5050. responses:
  5051. 201:
  5052. description: "No error"
  5053. 400:
  5054. description: "Bad parameter"
  5055. schema:
  5056. $ref: "#/definitions/ErrorResponse"
  5057. 404:
  5058. description: "No such image"
  5059. schema:
  5060. $ref: "#/definitions/ErrorResponse"
  5061. 409:
  5062. description: "Conflict"
  5063. schema:
  5064. $ref: "#/definitions/ErrorResponse"
  5065. 500:
  5066. description: "Server error"
  5067. schema:
  5068. $ref: "#/definitions/ErrorResponse"
  5069. parameters:
  5070. - name: "name"
  5071. in: "path"
  5072. description: "Image name or ID to tag."
  5073. type: "string"
  5074. required: true
  5075. - name: "repo"
  5076. in: "query"
  5077. description: "The repository to tag in. For example, `someuser/someimage`."
  5078. type: "string"
  5079. - name: "tag"
  5080. in: "query"
  5081. description: "The name of the new tag."
  5082. type: "string"
  5083. tags: ["Image"]
  5084. /images/{name}:
  5085. delete:
  5086. summary: "Remove an image"
  5087. description: |
  5088. Remove an image, along with any untagged parent images that were
  5089. referenced by that image.
  5090. Images can't be removed if they have descendant images, are being
  5091. used by a running container or are being used by a build.
  5092. operationId: "ImageDelete"
  5093. produces: ["application/json"]
  5094. responses:
  5095. 200:
  5096. description: "The image was deleted successfully"
  5097. schema:
  5098. type: "array"
  5099. items:
  5100. $ref: "#/definitions/ImageDeleteResponseItem"
  5101. examples:
  5102. application/json:
  5103. - Untagged: "3e2f21a89f"
  5104. - Deleted: "3e2f21a89f"
  5105. - Deleted: "53b4f83ac9"
  5106. 404:
  5107. description: "No such image"
  5108. schema:
  5109. $ref: "#/definitions/ErrorResponse"
  5110. 409:
  5111. description: "Conflict"
  5112. schema:
  5113. $ref: "#/definitions/ErrorResponse"
  5114. 500:
  5115. description: "Server error"
  5116. schema:
  5117. $ref: "#/definitions/ErrorResponse"
  5118. parameters:
  5119. - name: "name"
  5120. in: "path"
  5121. description: "Image name or ID"
  5122. type: "string"
  5123. required: true
  5124. - name: "force"
  5125. in: "query"
  5126. description: "Remove the image even if it is being used by stopped containers or has other tags"
  5127. type: "boolean"
  5128. default: false
  5129. - name: "noprune"
  5130. in: "query"
  5131. description: "Do not delete untagged parent images"
  5132. type: "boolean"
  5133. default: false
  5134. tags: ["Image"]
  5135. /images/search:
  5136. get:
  5137. summary: "Search images"
  5138. description: "Search for an image on Docker Hub."
  5139. operationId: "ImageSearch"
  5140. produces:
  5141. - "application/json"
  5142. responses:
  5143. 200:
  5144. description: "No error"
  5145. schema:
  5146. type: "array"
  5147. items:
  5148. type: "object"
  5149. properties:
  5150. description:
  5151. type: "string"
  5152. is_official:
  5153. type: "boolean"
  5154. is_automated:
  5155. type: "boolean"
  5156. name:
  5157. type: "string"
  5158. star_count:
  5159. type: "integer"
  5160. examples:
  5161. application/json:
  5162. - description: ""
  5163. is_official: false
  5164. is_automated: false
  5165. name: "wma55/u1210sshd"
  5166. star_count: 0
  5167. - description: ""
  5168. is_official: false
  5169. is_automated: false
  5170. name: "jdswinbank/sshd"
  5171. star_count: 0
  5172. - description: ""
  5173. is_official: false
  5174. is_automated: false
  5175. name: "vgauthier/sshd"
  5176. star_count: 0
  5177. 500:
  5178. description: "Server error"
  5179. schema:
  5180. $ref: "#/definitions/ErrorResponse"
  5181. parameters:
  5182. - name: "term"
  5183. in: "query"
  5184. description: "Term to search"
  5185. type: "string"
  5186. required: true
  5187. - name: "limit"
  5188. in: "query"
  5189. description: "Maximum number of results to return"
  5190. type: "integer"
  5191. - name: "filters"
  5192. in: "query"
  5193. description: |
  5194. A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:
  5195. - `is-automated=(true|false)`
  5196. - `is-official=(true|false)`
  5197. - `stars=<number>` Matches images that has at least 'number' stars.
  5198. type: "string"
  5199. tags: ["Image"]
  5200. /images/prune:
  5201. post:
  5202. summary: "Delete unused images"
  5203. produces:
  5204. - "application/json"
  5205. operationId: "ImagePrune"
  5206. parameters:
  5207. - name: "filters"
  5208. in: "query"
  5209. description: |
  5210. Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters:
  5211. - `dangling=<boolean>` When set to `true` (or `1`), prune only
  5212. unused *and* untagged images. When set to `false`
  5213. (or `0`), all unused images are pruned.
  5214. - `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.
  5215. - `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.
  5216. type: "string"
  5217. responses:
  5218. 200:
  5219. description: "No error"
  5220. schema:
  5221. type: "object"
  5222. properties:
  5223. ImagesDeleted:
  5224. description: "Images that were deleted"
  5225. type: "array"
  5226. items:
  5227. $ref: "#/definitions/ImageDeleteResponseItem"
  5228. SpaceReclaimed:
  5229. description: "Disk space reclaimed in bytes"
  5230. type: "integer"
  5231. format: "int64"
  5232. 500:
  5233. description: "Server error"
  5234. schema:
  5235. $ref: "#/definitions/ErrorResponse"
  5236. tags: ["Image"]
  5237. /auth:
  5238. post:
  5239. summary: "Check auth configuration"
  5240. description: "Validate credentials for a registry and, if available, get an identity token for accessing the registry without password."
  5241. operationId: "SystemAuth"
  5242. consumes: ["application/json"]
  5243. produces: ["application/json"]
  5244. responses:
  5245. 200:
  5246. description: "An identity token was generated successfully."
  5247. schema:
  5248. type: "object"
  5249. required: [Status]
  5250. properties:
  5251. Status:
  5252. description: "The status of the authentication"
  5253. type: "string"
  5254. x-nullable: false
  5255. IdentityToken:
  5256. description: "An opaque token used to authenticate a user after a successful login"
  5257. type: "string"
  5258. x-nullable: false
  5259. examples:
  5260. application/json:
  5261. Status: "Login Succeeded"
  5262. IdentityToken: "9cbaf023786cd7..."
  5263. 204:
  5264. description: "No error"
  5265. 500:
  5266. description: "Server error"
  5267. schema:
  5268. $ref: "#/definitions/ErrorResponse"
  5269. parameters:
  5270. - name: "authConfig"
  5271. in: "body"
  5272. description: "Authentication to check"
  5273. schema:
  5274. $ref: "#/definitions/AuthConfig"
  5275. tags: ["System"]
  5276. /info:
  5277. get:
  5278. summary: "Get system information"
  5279. operationId: "SystemInfo"
  5280. produces:
  5281. - "application/json"
  5282. responses:
  5283. 200:
  5284. description: "No error"
  5285. schema:
  5286. type: "object"
  5287. properties:
  5288. Architecture:
  5289. type: "string"
  5290. Containers:
  5291. type: "integer"
  5292. ContainersRunning:
  5293. type: "integer"
  5294. ContainersStopped:
  5295. type: "integer"
  5296. ContainersPaused:
  5297. type: "integer"
  5298. CpuCfsPeriod:
  5299. type: "boolean"
  5300. CpuCfsQuota:
  5301. type: "boolean"
  5302. Debug:
  5303. type: "boolean"
  5304. DiscoveryBackend:
  5305. type: "string"
  5306. DockerRootDir:
  5307. type: "string"
  5308. Driver:
  5309. type: "string"
  5310. DriverStatus:
  5311. type: "array"
  5312. items:
  5313. type: "array"
  5314. items:
  5315. type: "string"
  5316. SystemStatus:
  5317. type: "array"
  5318. items:
  5319. type: "array"
  5320. items:
  5321. type: "string"
  5322. Plugins:
  5323. type: "object"
  5324. properties:
  5325. Volume:
  5326. type: "array"
  5327. items:
  5328. type: "string"
  5329. Network:
  5330. type: "array"
  5331. items:
  5332. type: "string"
  5333. Log:
  5334. type: "array"
  5335. items:
  5336. type: "string"
  5337. ExperimentalBuild:
  5338. type: "boolean"
  5339. HttpProxy:
  5340. type: "string"
  5341. HttpsProxy:
  5342. type: "string"
  5343. ID:
  5344. type: "string"
  5345. IPv4Forwarding:
  5346. type: "boolean"
  5347. Images:
  5348. type: "integer"
  5349. IndexServerAddress:
  5350. type: "string"
  5351. InitPath:
  5352. type: "string"
  5353. InitSha1:
  5354. type: "string"
  5355. KernelVersion:
  5356. type: "string"
  5357. Labels:
  5358. type: "array"
  5359. items:
  5360. type: "string"
  5361. MemTotal:
  5362. type: "integer"
  5363. MemoryLimit:
  5364. type: "boolean"
  5365. NCPU:
  5366. type: "integer"
  5367. NEventsListener:
  5368. type: "integer"
  5369. NFd:
  5370. type: "integer"
  5371. NGoroutines:
  5372. type: "integer"
  5373. Name:
  5374. type: "string"
  5375. NoProxy:
  5376. type: "string"
  5377. OomKillDisable:
  5378. type: "boolean"
  5379. OSType:
  5380. type: "string"
  5381. OomScoreAdj:
  5382. type: "integer"
  5383. OperatingSystem:
  5384. type: "string"
  5385. RegistryConfig:
  5386. type: "object"
  5387. properties:
  5388. IndexConfigs:
  5389. type: "object"
  5390. additionalProperties:
  5391. type: "object"
  5392. properties:
  5393. Mirrors:
  5394. type: "array"
  5395. items:
  5396. type: "string"
  5397. Name:
  5398. type: "string"
  5399. Official:
  5400. type: "boolean"
  5401. Secure:
  5402. type: "boolean"
  5403. InsecureRegistryCIDRs:
  5404. type: "array"
  5405. items:
  5406. type: "string"
  5407. SwapLimit:
  5408. type: "boolean"
  5409. SystemTime:
  5410. type: "string"
  5411. ServerVersion:
  5412. type: "string"
  5413. examples:
  5414. application/json:
  5415. Architecture: "x86_64"
  5416. ClusterStore: "etcd://localhost:2379"
  5417. CgroupDriver: "cgroupfs"
  5418. Containers: 11
  5419. ContainersRunning: 7
  5420. ContainersStopped: 3
  5421. ContainersPaused: 1
  5422. CpuCfsPeriod: true
  5423. CpuCfsQuota: true
  5424. Debug: false
  5425. DockerRootDir: "/var/lib/docker"
  5426. Driver: "btrfs"
  5427. DriverStatus:
  5428. -
  5429. - ""
  5430. ExperimentalBuild: false
  5431. HttpProxy: "http://test:test@localhost:8080"
  5432. HttpsProxy: "https://test:test@localhost:8080"
  5433. ID: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS"
  5434. IPv4Forwarding: true
  5435. Images: 16
  5436. IndexServerAddress: "https://index.docker.io/v1/"
  5437. InitPath: "/usr/bin/docker"
  5438. InitSha1: ""
  5439. KernelMemory: true
  5440. KernelVersion: "3.12.0-1-amd64"
  5441. Labels:
  5442. - "storage=ssd"
  5443. MemTotal: 2099236864
  5444. MemoryLimit: true
  5445. NCPU: 1
  5446. NEventsListener: 0
  5447. NFd: 11
  5448. NGoroutines: 21
  5449. Name: "prod-server-42"
  5450. NoProxy: "9.81.1.160"
  5451. OomKillDisable: true
  5452. OSType: "linux"
  5453. OperatingSystem: "Boot2Docker"
  5454. Plugins:
  5455. Volume:
  5456. - "local"
  5457. Network:
  5458. - "null"
  5459. - "host"
  5460. - "bridge"
  5461. RegistryConfig:
  5462. IndexConfigs:
  5463. docker.io:
  5464. Name: "docker.io"
  5465. Official: true
  5466. Secure: true
  5467. InsecureRegistryCIDRs:
  5468. - "127.0.0.0/8"
  5469. SecurityOptions:
  5470. - Key: "Name"
  5471. Value: "seccomp"
  5472. - Key: "Profile"
  5473. Value: "default"
  5474. - Key: "Name"
  5475. Value: "apparmor"
  5476. - Key: "Name"
  5477. Value: "selinux"
  5478. - Key: "Name"
  5479. Value: "userns"
  5480. ServerVersion: "1.9.0"
  5481. SwapLimit: false
  5482. SystemStatus:
  5483. -
  5484. - "State"
  5485. - "Healthy"
  5486. SystemTime: "2015-03-10T11:11:23.730591467-07:00"
  5487. 500:
  5488. description: "Server error"
  5489. schema:
  5490. $ref: "#/definitions/ErrorResponse"
  5491. tags: ["System"]
  5492. /version:
  5493. get:
  5494. summary: "Get version"
  5495. description: "Returns the version of Docker that is running and various information about the system that Docker is running on."
  5496. operationId: "SystemVersion"
  5497. produces: ["application/json"]
  5498. responses:
  5499. 200:
  5500. description: "no error"
  5501. schema:
  5502. type: "object"
  5503. properties:
  5504. Version:
  5505. type: "string"
  5506. ApiVersion:
  5507. type: "string"
  5508. MinAPIVersion:
  5509. type: "string"
  5510. GitCommit:
  5511. type: "string"
  5512. GoVersion:
  5513. type: "string"
  5514. Os:
  5515. type: "string"
  5516. Arch:
  5517. type: "string"
  5518. KernelVersion:
  5519. type: "string"
  5520. Experimental:
  5521. type: "boolean"
  5522. BuildTime:
  5523. type: "string"
  5524. examples:
  5525. application/json:
  5526. Version: "17.04.0"
  5527. Os: "linux"
  5528. KernelVersion: "3.19.0-23-generic"
  5529. GoVersion: "go1.7.5"
  5530. GitCommit: "deadbee"
  5531. Arch: "amd64"
  5532. ApiVersion: "1.27"
  5533. MinAPIVersion: "1.12"
  5534. BuildTime: "2016-06-14T07:09:13.444803460+00:00"
  5535. Experimental: true
  5536. 500:
  5537. description: "server error"
  5538. schema:
  5539. $ref: "#/definitions/ErrorResponse"
  5540. tags: ["System"]
  5541. /_ping:
  5542. get:
  5543. summary: "Ping"
  5544. description: "This is a dummy endpoint you can use to test if the server is accessible."
  5545. operationId: "SystemPing"
  5546. produces: ["text/plain"]
  5547. responses:
  5548. 200:
  5549. description: "no error"
  5550. schema:
  5551. type: "string"
  5552. example: "OK"
  5553. headers:
  5554. API-Version:
  5555. type: "string"
  5556. description: "Max API Version the server supports"
  5557. Docker-Experimental:
  5558. type: "boolean"
  5559. description: "If the server is running with experimental mode enabled"
  5560. 500:
  5561. description: "server error"
  5562. schema:
  5563. $ref: "#/definitions/ErrorResponse"
  5564. tags: ["System"]
  5565. /commit:
  5566. post:
  5567. summary: "Create a new image from a container"
  5568. operationId: "ImageCommit"
  5569. consumes:
  5570. - "application/json"
  5571. produces:
  5572. - "application/json"
  5573. responses:
  5574. 201:
  5575. description: "no error"
  5576. schema:
  5577. $ref: "#/definitions/IdResponse"
  5578. 404:
  5579. description: "no such container"
  5580. schema:
  5581. $ref: "#/definitions/ErrorResponse"
  5582. examples:
  5583. application/json:
  5584. message: "No such container: c2ada9df5af8"
  5585. 500:
  5586. description: "server error"
  5587. schema:
  5588. $ref: "#/definitions/ErrorResponse"
  5589. parameters:
  5590. - name: "containerConfig"
  5591. in: "body"
  5592. description: "The container configuration"
  5593. schema:
  5594. $ref: "#/definitions/ContainerConfig"
  5595. - name: "container"
  5596. in: "query"
  5597. description: "The ID or name of the container to commit"
  5598. type: "string"
  5599. - name: "repo"
  5600. in: "query"
  5601. description: "Repository name for the created image"
  5602. type: "string"
  5603. - name: "tag"
  5604. in: "query"
  5605. description: "Tag name for the create image"
  5606. type: "string"
  5607. - name: "comment"
  5608. in: "query"
  5609. description: "Commit message"
  5610. type: "string"
  5611. - name: "author"
  5612. in: "query"
  5613. description: "Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)"
  5614. type: "string"
  5615. - name: "pause"
  5616. in: "query"
  5617. description: "Whether to pause the container before committing"
  5618. type: "boolean"
  5619. default: true
  5620. - name: "changes"
  5621. in: "query"
  5622. description: "`Dockerfile` instructions to apply while committing"
  5623. type: "string"
  5624. tags: ["Image"]
  5625. /events:
  5626. get:
  5627. summary: "Monitor events"
  5628. description: |
  5629. Stream real-time events from the server.
  5630. Various objects within Docker report events when something happens to them.
  5631. Containers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, and `update`
  5632. Images report these events: `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, and `untag`
  5633. Volumes report these events: `create`, `mount`, `unmount`, and `destroy`
  5634. Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, and `remove`
  5635. The Docker daemon reports these events: `reload`
  5636. Services report these events: `create`, `update`, and `remove`
  5637. Nodes report these events: `create`, `update`, and `remove`
  5638. Secrets report these events: `create`, `update`, and `remove`
  5639. operationId: "SystemEvents"
  5640. produces:
  5641. - "application/json"
  5642. responses:
  5643. 200:
  5644. description: "no error"
  5645. schema:
  5646. type: "object"
  5647. properties:
  5648. Type:
  5649. description: "The type of object emitting the event"
  5650. type: "string"
  5651. Action:
  5652. description: "The type of event"
  5653. type: "string"
  5654. Actor:
  5655. type: "object"
  5656. properties:
  5657. ID:
  5658. description: "The ID of the object emitting the event"
  5659. type: "string"
  5660. Attributes:
  5661. description: "Various key/value attributes of the object, depending on its type"
  5662. type: "object"
  5663. additionalProperties:
  5664. type: "string"
  5665. time:
  5666. description: "Timestamp of event"
  5667. type: "integer"
  5668. timeNano:
  5669. description: "Timestamp of event, with nanosecond accuracy"
  5670. type: "integer"
  5671. format: "int64"
  5672. examples:
  5673. application/json:
  5674. Type: "container"
  5675. Action: "create"
  5676. Actor:
  5677. ID: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743"
  5678. Attributes:
  5679. com.example.some-label: "some-label-value"
  5680. image: "alpine"
  5681. name: "my-container"
  5682. time: 1461943101
  5683. 400:
  5684. description: "bad parameter"
  5685. schema:
  5686. $ref: "#/definitions/ErrorResponse"
  5687. 500:
  5688. description: "server error"
  5689. schema:
  5690. $ref: "#/definitions/ErrorResponse"
  5691. parameters:
  5692. - name: "since"
  5693. in: "query"
  5694. description: "Show events created since this timestamp then stream new events."
  5695. type: "string"
  5696. - name: "until"
  5697. in: "query"
  5698. description: "Show events created until this timestamp then stop streaming."
  5699. type: "string"
  5700. - name: "filters"
  5701. in: "query"
  5702. description: |
  5703. A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters:
  5704. - `container=<string>` container name or ID
  5705. - `daemon=<string>` daemon name or ID
  5706. - `event=<string>` event type
  5707. - `image=<string>` image name or ID
  5708. - `label=<string>` image or container label
  5709. - `network=<string>` network name or ID
  5710. - `plugin`=<string> plugin name or ID
  5711. - `scope`=<string> local or swarm
  5712. - `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service` or `secret`
  5713. - `volume=<string>` volume name or ID
  5714. type: "string"
  5715. tags: ["System"]
  5716. /system/df:
  5717. get:
  5718. summary: "Get data usage information"
  5719. operationId: "SystemDataUsage"
  5720. responses:
  5721. 200:
  5722. description: "no error"
  5723. schema:
  5724. type: "object"
  5725. properties:
  5726. LayersSize:
  5727. type: "integer"
  5728. format: "int64"
  5729. Images:
  5730. type: "array"
  5731. items:
  5732. $ref: "#/definitions/ImageSummary"
  5733. Containers:
  5734. type: "array"
  5735. items:
  5736. $ref: "#/definitions/ContainerSummary"
  5737. Volumes:
  5738. type: "array"
  5739. items:
  5740. $ref: "#/definitions/Volume"
  5741. example:
  5742. LayersSize: 1092588
  5743. Images:
  5744. -
  5745. Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
  5746. ParentId: ""
  5747. RepoTags:
  5748. - "busybox:latest"
  5749. RepoDigests:
  5750. - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6"
  5751. Created: 1466724217
  5752. Size: 1092588
  5753. SharedSize: 0
  5754. VirtualSize: 1092588
  5755. Labels: {}
  5756. Containers: 1
  5757. Containers:
  5758. -
  5759. Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148"
  5760. Names:
  5761. - "/top"
  5762. Image: "busybox"
  5763. ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
  5764. Command: "top"
  5765. Created: 1472592424
  5766. Ports: []
  5767. SizeRootFs: 1092588
  5768. Labels: {}
  5769. State: "exited"
  5770. Status: "Exited (0) 56 minutes ago"
  5771. HostConfig:
  5772. NetworkMode: "default"
  5773. NetworkSettings:
  5774. Networks:
  5775. bridge:
  5776. IPAMConfig: null
  5777. Links: null
  5778. Aliases: null
  5779. NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92"
  5780. EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a"
  5781. Gateway: "172.18.0.1"
  5782. IPAddress: "172.18.0.2"
  5783. IPPrefixLen: 16
  5784. IPv6Gateway: ""
  5785. GlobalIPv6Address: ""
  5786. GlobalIPv6PrefixLen: 0
  5787. MacAddress: "02:42:ac:12:00:02"
  5788. Mounts: []
  5789. Volumes:
  5790. -
  5791. Name: "my-volume"
  5792. Driver: "local"
  5793. Mountpoint: "/var/lib/docker/volumes/my-volume/_data"
  5794. Labels: null
  5795. Scope: "local"
  5796. Options: null
  5797. UsageData:
  5798. Size: 10920104
  5799. RefCount: 2
  5800. 500:
  5801. description: "server error"
  5802. schema:
  5803. $ref: "#/definitions/ErrorResponse"
  5804. tags: ["System"]
  5805. /images/{name}/get:
  5806. get:
  5807. summary: "Export an image"
  5808. description: |
  5809. Get a tarball containing all images and metadata for a repository.
  5810. 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.
  5811. ### Image tarball format
  5812. An image tarball contains one directory per image layer (named using its long ID), each containing these files:
  5813. - `VERSION`: currently `1.0` - the file format version
  5814. - `json`: detailed layer information, similar to `docker inspect layer_id`
  5815. - `layer.tar`: A tarfile containing the filesystem changes in this layer
  5816. The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions.
  5817. 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.
  5818. ```json
  5819. {
  5820. "hello-world": {
  5821. "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"
  5822. }
  5823. }
  5824. ```
  5825. operationId: "ImageGet"
  5826. produces:
  5827. - "application/x-tar"
  5828. responses:
  5829. 200:
  5830. description: "no error"
  5831. schema:
  5832. type: "string"
  5833. format: "binary"
  5834. 500:
  5835. description: "server error"
  5836. schema:
  5837. $ref: "#/definitions/ErrorResponse"
  5838. parameters:
  5839. - name: "name"
  5840. in: "path"
  5841. description: "Image name or ID"
  5842. type: "string"
  5843. required: true
  5844. tags: ["Image"]
  5845. /images/get:
  5846. get:
  5847. summary: "Export several images"
  5848. description: |
  5849. Get a tarball containing all images and metadata for several image repositories.
  5850. For each value of the `names` parameter: if it is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned; if it is an image ID, similarly only that image (and its parents) are returned and there would be no names referenced in the 'repositories' file for this image ID.
  5851. For details on the format, see [the export image endpoint](#operation/ImageGet).
  5852. operationId: "ImageGetAll"
  5853. produces:
  5854. - "application/x-tar"
  5855. responses:
  5856. 200:
  5857. description: "no error"
  5858. schema:
  5859. type: "string"
  5860. format: "binary"
  5861. 500:
  5862. description: "server error"
  5863. schema:
  5864. $ref: "#/definitions/ErrorResponse"
  5865. parameters:
  5866. - name: "names"
  5867. in: "query"
  5868. description: "Image names to filter by"
  5869. type: "array"
  5870. items:
  5871. type: "string"
  5872. tags: ["Image"]
  5873. /images/load:
  5874. post:
  5875. summary: "Import images"
  5876. description: |
  5877. Load a set of images and tags into a repository.
  5878. For details on the format, see [the export image endpoint](#operation/ImageGet).
  5879. operationId: "ImageLoad"
  5880. consumes:
  5881. - "application/x-tar"
  5882. produces:
  5883. - "application/json"
  5884. responses:
  5885. 200:
  5886. description: "no error"
  5887. 500:
  5888. description: "server error"
  5889. schema:
  5890. $ref: "#/definitions/ErrorResponse"
  5891. parameters:
  5892. - name: "imagesTarball"
  5893. in: "body"
  5894. description: "Tar archive containing images"
  5895. schema:
  5896. type: "string"
  5897. format: "binary"
  5898. - name: "quiet"
  5899. in: "query"
  5900. description: "Suppress progress details during load."
  5901. type: "boolean"
  5902. default: false
  5903. tags: ["Image"]
  5904. /containers/{id}/exec:
  5905. post:
  5906. summary: "Create an exec instance"
  5907. description: "Run a command inside a running container."
  5908. operationId: "ContainerExec"
  5909. consumes:
  5910. - "application/json"
  5911. produces:
  5912. - "application/json"
  5913. responses:
  5914. 201:
  5915. description: "no error"
  5916. schema:
  5917. $ref: "#/definitions/IdResponse"
  5918. 404:
  5919. description: "no such container"
  5920. schema:
  5921. $ref: "#/definitions/ErrorResponse"
  5922. examples:
  5923. application/json:
  5924. message: "No such container: c2ada9df5af8"
  5925. 409:
  5926. description: "container is paused"
  5927. schema:
  5928. $ref: "#/definitions/ErrorResponse"
  5929. 500:
  5930. description: "Server error"
  5931. schema:
  5932. $ref: "#/definitions/ErrorResponse"
  5933. parameters:
  5934. - name: "execConfig"
  5935. in: "body"
  5936. description: "Exec configuration"
  5937. schema:
  5938. type: "object"
  5939. properties:
  5940. AttachStdin:
  5941. type: "boolean"
  5942. description: "Attach to `stdin` of the exec command."
  5943. AttachStdout:
  5944. type: "boolean"
  5945. description: "Attach to `stdout` of the exec command."
  5946. AttachStderr:
  5947. type: "boolean"
  5948. description: "Attach to `stderr` of the exec command."
  5949. DetachKeys:
  5950. type: "string"
  5951. description: "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`."
  5952. Tty:
  5953. type: "boolean"
  5954. description: "Allocate a pseudo-TTY."
  5955. Env:
  5956. description: "A list of environment variables in the form `[\"VAR=value\", ...]`."
  5957. type: "array"
  5958. items:
  5959. type: "string"
  5960. Cmd:
  5961. type: "array"
  5962. description: "Command to run, as a string or array of strings."
  5963. items:
  5964. type: "string"
  5965. Privileged:
  5966. type: "boolean"
  5967. description: "Runs the exec process with extended privileges."
  5968. default: false
  5969. User:
  5970. type: "string"
  5971. description: "The user, and optionally, group to run the exec process inside the container. Format is one of: `user`, `user:group`, `uid`, or `uid:gid`."
  5972. example:
  5973. AttachStdin: false
  5974. AttachStdout: true
  5975. AttachStderr: true
  5976. DetachKeys: "ctrl-p,ctrl-q"
  5977. Tty: false
  5978. Cmd:
  5979. - "date"
  5980. Env:
  5981. - "FOO=bar"
  5982. - "BAZ=quux"
  5983. required: true
  5984. - name: "id"
  5985. in: "path"
  5986. description: "ID or name of container"
  5987. type: "string"
  5988. required: true
  5989. tags: ["Exec"]
  5990. /exec/{id}/start:
  5991. post:
  5992. summary: "Start an exec instance"
  5993. description: "Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command."
  5994. operationId: "ExecStart"
  5995. consumes:
  5996. - "application/json"
  5997. produces:
  5998. - "application/vnd.docker.raw-stream"
  5999. responses:
  6000. 200:
  6001. description: "No error"
  6002. 404:
  6003. description: "No such exec instance"
  6004. schema:
  6005. $ref: "#/definitions/ErrorResponse"
  6006. 409:
  6007. description: "Container is stopped or paused"
  6008. schema:
  6009. $ref: "#/definitions/ErrorResponse"
  6010. parameters:
  6011. - name: "execStartConfig"
  6012. in: "body"
  6013. schema:
  6014. type: "object"
  6015. properties:
  6016. Detach:
  6017. type: "boolean"
  6018. description: "Detach from the command."
  6019. Tty:
  6020. type: "boolean"
  6021. description: "Allocate a pseudo-TTY."
  6022. example:
  6023. Detach: false
  6024. Tty: false
  6025. - name: "id"
  6026. in: "path"
  6027. description: "Exec instance ID"
  6028. required: true
  6029. type: "string"
  6030. tags: ["Exec"]
  6031. /exec/{id}/resize:
  6032. post:
  6033. summary: "Resize an exec instance"
  6034. description: "Resize the TTY session used by an exec instance. This endpoint only works if `tty` was specified as part of creating and starting the exec instance."
  6035. operationId: "ExecResize"
  6036. responses:
  6037. 200:
  6038. description: "No error"
  6039. 400:
  6040. description: "bad parameter"
  6041. schema:
  6042. $ref: "#/definitions/ErrorResponse"
  6043. 404:
  6044. description: "No such exec instance"
  6045. schema:
  6046. $ref: "#/definitions/ErrorResponse"
  6047. 500:
  6048. description: "Server error"
  6049. schema:
  6050. $ref: "#/definitions/ErrorResponse"
  6051. parameters:
  6052. - name: "id"
  6053. in: "path"
  6054. description: "Exec instance ID"
  6055. required: true
  6056. type: "string"
  6057. - name: "h"
  6058. in: "query"
  6059. description: "Height of the TTY session in characters"
  6060. type: "integer"
  6061. - name: "w"
  6062. in: "query"
  6063. description: "Width of the TTY session in characters"
  6064. type: "integer"
  6065. tags: ["Exec"]
  6066. /exec/{id}/json:
  6067. get:
  6068. summary: "Inspect an exec instance"
  6069. description: "Return low-level information about an exec instance."
  6070. operationId: "ExecInspect"
  6071. produces:
  6072. - "application/json"
  6073. responses:
  6074. 200:
  6075. description: "No error"
  6076. schema:
  6077. type: "object"
  6078. properties:
  6079. ID:
  6080. type: "string"
  6081. Running:
  6082. type: "boolean"
  6083. ExitCode:
  6084. type: "integer"
  6085. ProcessConfig:
  6086. $ref: "#/definitions/ProcessConfig"
  6087. OpenStdin:
  6088. type: "boolean"
  6089. OpenStderr:
  6090. type: "boolean"
  6091. OpenStdout:
  6092. type: "boolean"
  6093. ContainerID:
  6094. type: "string"
  6095. Pid:
  6096. type: "integer"
  6097. description: "The system process ID for the exec process."
  6098. examples:
  6099. application/json:
  6100. CanRemove: false
  6101. ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126"
  6102. DetachKeys: ""
  6103. ExitCode: 2
  6104. ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b"
  6105. OpenStderr: true
  6106. OpenStdin: true
  6107. OpenStdout: true
  6108. ProcessConfig:
  6109. arguments:
  6110. - "-c"
  6111. - "exit 2"
  6112. entrypoint: "sh"
  6113. privileged: false
  6114. tty: true
  6115. user: "1000"
  6116. Running: false
  6117. Pid: 42000
  6118. 404:
  6119. description: "No such exec instance"
  6120. schema:
  6121. $ref: "#/definitions/ErrorResponse"
  6122. 500:
  6123. description: "Server error"
  6124. schema:
  6125. $ref: "#/definitions/ErrorResponse"
  6126. parameters:
  6127. - name: "id"
  6128. in: "path"
  6129. description: "Exec instance ID"
  6130. required: true
  6131. type: "string"
  6132. tags: ["Exec"]
  6133. /volumes:
  6134. get:
  6135. summary: "List volumes"
  6136. operationId: "VolumeList"
  6137. produces: ["application/json"]
  6138. responses:
  6139. 200:
  6140. description: "Summary volume data that matches the query"
  6141. schema:
  6142. type: "object"
  6143. required: [Volumes, Warnings]
  6144. properties:
  6145. Volumes:
  6146. type: "array"
  6147. x-nullable: false
  6148. description: "List of volumes"
  6149. items:
  6150. $ref: "#/definitions/Volume"
  6151. Warnings:
  6152. type: "array"
  6153. x-nullable: false
  6154. description: "Warnings that occurred when fetching the list of volumes"
  6155. items:
  6156. type: "string"
  6157. examples:
  6158. application/json:
  6159. Volumes:
  6160. - Name: "tardis"
  6161. Driver: "local"
  6162. Mountpoint: "/var/lib/docker/volumes/tardis"
  6163. Labels:
  6164. com.example.some-label: "some-value"
  6165. com.example.some-other-label: "some-other-value"
  6166. Scope: "local"
  6167. Options:
  6168. device: "tmpfs"
  6169. o: "size=100m,uid=1000"
  6170. type: "tmpfs"
  6171. Warnings: []
  6172. 500:
  6173. description: "Server error"
  6174. schema:
  6175. $ref: "#/definitions/ErrorResponse"
  6176. parameters:
  6177. - name: "filters"
  6178. in: "query"
  6179. description: |
  6180. JSON encoded value of the filters (a `map[string][]string`) to
  6181. process on the volumes list. Available filters:
  6182. - `dangling=<boolean>` When set to `true` (or `1`), returns all
  6183. volumes that are not in use by a container. When set to `false`
  6184. (or `0`), only volumes that are in use by one or more
  6185. containers are returned.
  6186. - `driver=<volume-driver-name>` Matches volumes based on their driver.
  6187. - `label=<key>` or `label=<key>:<value>` Matches volumes based on
  6188. the presence of a `label` alone or a `label` and a value.
  6189. - `name=<volume-name>` Matches all or part of a volume name.
  6190. type: "string"
  6191. format: "json"
  6192. tags: ["Volume"]
  6193. /volumes/create:
  6194. post:
  6195. summary: "Create a volume"
  6196. operationId: "VolumeCreate"
  6197. consumes: ["application/json"]
  6198. produces: ["application/json"]
  6199. responses:
  6200. 201:
  6201. description: "The volume was created successfully"
  6202. schema:
  6203. $ref: "#/definitions/Volume"
  6204. 500:
  6205. description: "Server error"
  6206. schema:
  6207. $ref: "#/definitions/ErrorResponse"
  6208. parameters:
  6209. - name: "volumeConfig"
  6210. in: "body"
  6211. required: true
  6212. description: "Volume configuration"
  6213. schema:
  6214. type: "object"
  6215. properties:
  6216. Name:
  6217. description: "The new volume's name. If not specified, Docker generates a name."
  6218. type: "string"
  6219. x-nullable: false
  6220. Driver:
  6221. description: "Name of the volume driver to use."
  6222. type: "string"
  6223. default: "local"
  6224. x-nullable: false
  6225. DriverOpts:
  6226. description: "A mapping of driver options and values. These options are passed directly to the driver and are driver specific."
  6227. type: "object"
  6228. additionalProperties:
  6229. type: "string"
  6230. Labels:
  6231. description: "User-defined key/value metadata."
  6232. type: "object"
  6233. additionalProperties:
  6234. type: "string"
  6235. example:
  6236. Name: "tardis"
  6237. Labels:
  6238. com.example.some-label: "some-value"
  6239. com.example.some-other-label: "some-other-value"
  6240. Driver: "custom"
  6241. tags: ["Volume"]
  6242. /volumes/{name}:
  6243. get:
  6244. summary: "Inspect a volume"
  6245. operationId: "VolumeInspect"
  6246. produces: ["application/json"]
  6247. responses:
  6248. 200:
  6249. description: "No error"
  6250. schema:
  6251. $ref: "#/definitions/Volume"
  6252. 404:
  6253. description: "No such volume"
  6254. schema:
  6255. $ref: "#/definitions/ErrorResponse"
  6256. 500:
  6257. description: "Server error"
  6258. schema:
  6259. $ref: "#/definitions/ErrorResponse"
  6260. parameters:
  6261. - name: "name"
  6262. in: "path"
  6263. required: true
  6264. description: "Volume name or ID"
  6265. type: "string"
  6266. tags: ["Volume"]
  6267. delete:
  6268. summary: "Remove a volume"
  6269. description: "Instruct the driver to remove the volume."
  6270. operationId: "VolumeDelete"
  6271. responses:
  6272. 204:
  6273. description: "The volume was removed"
  6274. 404:
  6275. description: "No such volume or volume driver"
  6276. schema:
  6277. $ref: "#/definitions/ErrorResponse"
  6278. 409:
  6279. description: "Volume is in use and cannot be removed"
  6280. schema:
  6281. $ref: "#/definitions/ErrorResponse"
  6282. 500:
  6283. description: "Server error"
  6284. schema:
  6285. $ref: "#/definitions/ErrorResponse"
  6286. parameters:
  6287. - name: "name"
  6288. in: "path"
  6289. required: true
  6290. description: "Volume name or ID"
  6291. type: "string"
  6292. - name: "force"
  6293. in: "query"
  6294. description: "Force the removal of the volume"
  6295. type: "boolean"
  6296. default: false
  6297. tags: ["Volume"]
  6298. /volumes/prune:
  6299. post:
  6300. summary: "Delete unused volumes"
  6301. produces:
  6302. - "application/json"
  6303. operationId: "VolumePrune"
  6304. parameters:
  6305. - name: "filters"
  6306. in: "query"
  6307. description: |
  6308. Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  6309. Available filters:
  6310. - `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.
  6311. type: "string"
  6312. responses:
  6313. 200:
  6314. description: "No error"
  6315. schema:
  6316. type: "object"
  6317. properties:
  6318. VolumesDeleted:
  6319. description: "Volumes that were deleted"
  6320. type: "array"
  6321. items:
  6322. type: "string"
  6323. SpaceReclaimed:
  6324. description: "Disk space reclaimed in bytes"
  6325. type: "integer"
  6326. format: "int64"
  6327. 500:
  6328. description: "Server error"
  6329. schema:
  6330. $ref: "#/definitions/ErrorResponse"
  6331. tags: ["Volume"]
  6332. /networks:
  6333. get:
  6334. summary: "List networks"
  6335. description: |
  6336. Returns a list of networks. For details on the format, see [the network inspect endpoint](#operation/NetworkInspect).
  6337. Note that it uses a different, smaller representation of a network than inspecting a single network. For example,
  6338. the list of containers attached to the network is not propagated in API versions 1.28 and up.
  6339. operationId: "NetworkList"
  6340. produces:
  6341. - "application/json"
  6342. responses:
  6343. 200:
  6344. description: "No error"
  6345. schema:
  6346. type: "array"
  6347. items:
  6348. $ref: "#/definitions/Network"
  6349. examples:
  6350. application/json:
  6351. - Name: "bridge"
  6352. Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566"
  6353. Created: "2016-10-19T06:21:00.416543526Z"
  6354. Scope: "local"
  6355. Driver: "bridge"
  6356. EnableIPv6: false
  6357. Internal: false
  6358. Attachable: false
  6359. Ingress: false
  6360. IPAM:
  6361. Driver: "default"
  6362. Config:
  6363. -
  6364. Subnet: "172.17.0.0/16"
  6365. Options:
  6366. com.docker.network.bridge.default_bridge: "true"
  6367. com.docker.network.bridge.enable_icc: "true"
  6368. com.docker.network.bridge.enable_ip_masquerade: "true"
  6369. com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  6370. com.docker.network.bridge.name: "docker0"
  6371. com.docker.network.driver.mtu: "1500"
  6372. - Name: "none"
  6373. Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794"
  6374. Created: "0001-01-01T00:00:00Z"
  6375. Scope: "local"
  6376. Driver: "null"
  6377. EnableIPv6: false
  6378. Internal: false
  6379. Attachable: false
  6380. Ingress: false
  6381. IPAM:
  6382. Driver: "default"
  6383. Config: []
  6384. Containers: {}
  6385. Options: {}
  6386. - Name: "host"
  6387. Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e"
  6388. Created: "0001-01-01T00:00:00Z"
  6389. Scope: "local"
  6390. Driver: "host"
  6391. EnableIPv6: false
  6392. Internal: false
  6393. Attachable: false
  6394. Ingress: false
  6395. IPAM:
  6396. Driver: "default"
  6397. Config: []
  6398. Containers: {}
  6399. Options: {}
  6400. 500:
  6401. description: "Server error"
  6402. schema:
  6403. $ref: "#/definitions/ErrorResponse"
  6404. parameters:
  6405. - name: "filters"
  6406. in: "query"
  6407. description: |
  6408. JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters:
  6409. - `driver=<driver-name>` Matches a network's driver.
  6410. - `id=<network-id>` Matches all or part of a network ID.
  6411. - `label=<key>` or `label=<key>=<value>` of a network label.
  6412. - `name=<network-name>` Matches all or part of a network name.
  6413. - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`).
  6414. - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks.
  6415. type: "string"
  6416. tags: ["Network"]
  6417. /networks/{id}:
  6418. get:
  6419. summary: "Inspect a network"
  6420. operationId: "NetworkInspect"
  6421. produces:
  6422. - "application/json"
  6423. responses:
  6424. 200:
  6425. description: "No error"
  6426. schema:
  6427. $ref: "#/definitions/Network"
  6428. 404:
  6429. description: "Network not found"
  6430. schema:
  6431. $ref: "#/definitions/ErrorResponse"
  6432. 500:
  6433. description: "Server error"
  6434. schema:
  6435. $ref: "#/definitions/ErrorResponse"
  6436. parameters:
  6437. - name: "id"
  6438. in: "path"
  6439. description: "Network ID or name"
  6440. required: true
  6441. type: "string"
  6442. - name: "verbose"
  6443. in: "query"
  6444. description: "Detailed inspect output for troubleshooting"
  6445. type: "boolean"
  6446. default: false
  6447. tags: ["Network"]
  6448. delete:
  6449. summary: "Remove a network"
  6450. operationId: "NetworkDelete"
  6451. responses:
  6452. 204:
  6453. description: "No error"
  6454. 403:
  6455. description: "operation not supported for pre-defined networks"
  6456. schema:
  6457. $ref: "#/definitions/ErrorResponse"
  6458. 404:
  6459. description: "no such network"
  6460. schema:
  6461. $ref: "#/definitions/ErrorResponse"
  6462. 500:
  6463. description: "Server error"
  6464. schema:
  6465. $ref: "#/definitions/ErrorResponse"
  6466. parameters:
  6467. - name: "id"
  6468. in: "path"
  6469. description: "Network ID or name"
  6470. required: true
  6471. type: "string"
  6472. tags: ["Network"]
  6473. /networks/create:
  6474. post:
  6475. summary: "Create a network"
  6476. operationId: "NetworkCreate"
  6477. consumes:
  6478. - "application/json"
  6479. produces:
  6480. - "application/json"
  6481. responses:
  6482. 201:
  6483. description: "No error"
  6484. schema:
  6485. type: "object"
  6486. properties:
  6487. Id:
  6488. description: "The ID of the created network."
  6489. type: "string"
  6490. Warning:
  6491. type: "string"
  6492. example:
  6493. Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30"
  6494. Warning: ""
  6495. 400:
  6496. description: "bad parameter"
  6497. schema:
  6498. $ref: "#/definitions/ErrorResponse"
  6499. 403:
  6500. description: "operation not supported for pre-defined networks"
  6501. schema:
  6502. $ref: "#/definitions/ErrorResponse"
  6503. 404:
  6504. description: "plugin not found"
  6505. schema:
  6506. $ref: "#/definitions/ErrorResponse"
  6507. 500:
  6508. description: "Server error"
  6509. schema:
  6510. $ref: "#/definitions/ErrorResponse"
  6511. parameters:
  6512. - name: "networkConfig"
  6513. in: "body"
  6514. description: "Network configuration"
  6515. required: true
  6516. schema:
  6517. type: "object"
  6518. required: ["Name"]
  6519. properties:
  6520. Name:
  6521. description: "The network's name."
  6522. type: "string"
  6523. CheckDuplicate:
  6524. description: "Check for networks with duplicate names. Since Network is primarily keyed based on a random ID and not on the name, and network name is strictly a user-friendly alias to the network which is uniquely identified using ID, there is no guaranteed way to check for duplicates. CheckDuplicate is there to provide a best effort checking of any networks which has the same name but it is not guaranteed to catch all name collisions."
  6525. type: "boolean"
  6526. Driver:
  6527. description: "Name of the network driver plugin to use."
  6528. type: "string"
  6529. default: "bridge"
  6530. Internal:
  6531. description: "Restrict external access to the network."
  6532. type: "boolean"
  6533. Attachable:
  6534. description: "Globally scoped network is manually attachable by regular containers from workers in swarm mode."
  6535. type: "boolean"
  6536. Ingress:
  6537. description: "Ingress network is the network which provides the routing-mesh in swarm mode."
  6538. type: "boolean"
  6539. IPAM:
  6540. description: "Optional custom IP scheme for the network."
  6541. $ref: "#/definitions/IPAM"
  6542. EnableIPv6:
  6543. description: "Enable IPv6 on the network."
  6544. type: "boolean"
  6545. Options:
  6546. description: "Network specific options to be used by the drivers."
  6547. type: "object"
  6548. additionalProperties:
  6549. type: "string"
  6550. Labels:
  6551. description: "User-defined key/value metadata."
  6552. type: "object"
  6553. additionalProperties:
  6554. type: "string"
  6555. example:
  6556. Name: "isolated_nw"
  6557. CheckDuplicate: false
  6558. Driver: "bridge"
  6559. EnableIPv6: true
  6560. IPAM:
  6561. Driver: "default"
  6562. Config:
  6563. - Subnet: "172.20.0.0/16"
  6564. IPRange: "172.20.10.0/24"
  6565. Gateway: "172.20.10.11"
  6566. - Subnet: "2001:db8:abcd::/64"
  6567. Gateway: "2001:db8:abcd::1011"
  6568. Options:
  6569. foo: "bar"
  6570. Internal: true
  6571. Attachable: false
  6572. Ingress: false
  6573. Options:
  6574. com.docker.network.bridge.default_bridge: "true"
  6575. com.docker.network.bridge.enable_icc: "true"
  6576. com.docker.network.bridge.enable_ip_masquerade: "true"
  6577. com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  6578. com.docker.network.bridge.name: "docker0"
  6579. com.docker.network.driver.mtu: "1500"
  6580. Labels:
  6581. com.example.some-label: "some-value"
  6582. com.example.some-other-label: "some-other-value"
  6583. tags: ["Network"]
  6584. /networks/{id}/connect:
  6585. post:
  6586. summary: "Connect a container to a network"
  6587. operationId: "NetworkConnect"
  6588. consumes:
  6589. - "application/octet-stream"
  6590. responses:
  6591. 200:
  6592. description: "No error"
  6593. 403:
  6594. description: "Operation not supported for swarm scoped networks"
  6595. schema:
  6596. $ref: "#/definitions/ErrorResponse"
  6597. 404:
  6598. description: "Network or container not found"
  6599. schema:
  6600. $ref: "#/definitions/ErrorResponse"
  6601. 500:
  6602. description: "Server error"
  6603. schema:
  6604. $ref: "#/definitions/ErrorResponse"
  6605. parameters:
  6606. - name: "id"
  6607. in: "path"
  6608. description: "Network ID or name"
  6609. required: true
  6610. type: "string"
  6611. - name: "container"
  6612. in: "body"
  6613. required: true
  6614. schema:
  6615. type: "object"
  6616. properties:
  6617. Container:
  6618. type: "string"
  6619. description: "The ID or name of the container to connect to the network."
  6620. EndpointConfig:
  6621. $ref: "#/definitions/EndpointSettings"
  6622. example:
  6623. Container: "3613f73ba0e4"
  6624. EndpointConfig:
  6625. IPAMConfig:
  6626. IPv4Address: "172.24.56.89"
  6627. IPv6Address: "2001:db8::5689"
  6628. tags: ["Network"]
  6629. /networks/{id}/disconnect:
  6630. post:
  6631. summary: "Disconnect a container from a network"
  6632. operationId: "NetworkDisconnect"
  6633. consumes:
  6634. - "application/json"
  6635. responses:
  6636. 200:
  6637. description: "No error"
  6638. 403:
  6639. description: "Operation not supported for swarm scoped networks"
  6640. schema:
  6641. $ref: "#/definitions/ErrorResponse"
  6642. 404:
  6643. description: "Network or container not found"
  6644. schema:
  6645. $ref: "#/definitions/ErrorResponse"
  6646. 500:
  6647. description: "Server error"
  6648. schema:
  6649. $ref: "#/definitions/ErrorResponse"
  6650. parameters:
  6651. - name: "id"
  6652. in: "path"
  6653. description: "Network ID or name"
  6654. required: true
  6655. type: "string"
  6656. - name: "container"
  6657. in: "body"
  6658. required: true
  6659. schema:
  6660. type: "object"
  6661. properties:
  6662. Container:
  6663. type: "string"
  6664. description: "The ID or name of the container to disconnect from the network."
  6665. Force:
  6666. type: "boolean"
  6667. description: "Force the container to disconnect from the network."
  6668. tags: ["Network"]
  6669. /networks/prune:
  6670. post:
  6671. summary: "Delete unused networks"
  6672. produces:
  6673. - "application/json"
  6674. operationId: "NetworkPrune"
  6675. parameters:
  6676. - name: "filters"
  6677. in: "query"
  6678. description: |
  6679. Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  6680. Available filters:
  6681. - `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.
  6682. - `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.
  6683. type: "string"
  6684. responses:
  6685. 200:
  6686. description: "No error"
  6687. schema:
  6688. type: "object"
  6689. properties:
  6690. NetworksDeleted:
  6691. description: "Networks that were deleted"
  6692. type: "array"
  6693. items:
  6694. type: "string"
  6695. 500:
  6696. description: "Server error"
  6697. schema:
  6698. $ref: "#/definitions/ErrorResponse"
  6699. tags: ["Network"]
  6700. /plugins:
  6701. get:
  6702. summary: "List plugins"
  6703. operationId: "PluginList"
  6704. description: "Returns information about installed plugins."
  6705. produces: ["application/json"]
  6706. responses:
  6707. 200:
  6708. description: "No error"
  6709. schema:
  6710. type: "array"
  6711. items:
  6712. $ref: "#/definitions/Plugin"
  6713. 500:
  6714. description: "Server error"
  6715. schema:
  6716. $ref: "#/definitions/ErrorResponse"
  6717. parameters:
  6718. - name: "filters"
  6719. in: "query"
  6720. type: "string"
  6721. description: |
  6722. A JSON encoded value of the filters (a `map[string][]string`) to process on the plugin list. Available filters:
  6723. - `capability=<capability name>`
  6724. - `enable=<true>|<false>`
  6725. tags: ["Plugin"]
  6726. /plugins/privileges:
  6727. get:
  6728. summary: "Get plugin privileges"
  6729. operationId: "GetPluginPrivileges"
  6730. responses:
  6731. 200:
  6732. description: "no error"
  6733. schema:
  6734. type: "array"
  6735. items:
  6736. description: "Describes a permission the user has to accept upon installing the plugin."
  6737. type: "object"
  6738. properties:
  6739. Name:
  6740. type: "string"
  6741. Description:
  6742. type: "string"
  6743. Value:
  6744. type: "array"
  6745. items:
  6746. type: "string"
  6747. example:
  6748. - Name: "network"
  6749. Description: ""
  6750. Value:
  6751. - "host"
  6752. - Name: "mount"
  6753. Description: ""
  6754. Value:
  6755. - "/data"
  6756. - Name: "device"
  6757. Description: ""
  6758. Value:
  6759. - "/dev/cpu_dma_latency"
  6760. 500:
  6761. description: "server error"
  6762. schema:
  6763. $ref: "#/definitions/ErrorResponse"
  6764. parameters:
  6765. - name: "remote"
  6766. in: "query"
  6767. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  6768. required: true
  6769. type: "string"
  6770. tags:
  6771. - "Plugin"
  6772. /plugins/pull:
  6773. post:
  6774. summary: "Install a plugin"
  6775. operationId: "PluginPull"
  6776. description: |
  6777. Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable).
  6778. produces:
  6779. - "application/json"
  6780. responses:
  6781. 204:
  6782. description: "no error"
  6783. 500:
  6784. description: "server error"
  6785. schema:
  6786. $ref: "#/definitions/ErrorResponse"
  6787. parameters:
  6788. - name: "remote"
  6789. in: "query"
  6790. description: |
  6791. Remote reference for plugin to install.
  6792. The `:latest` tag is optional, and is used as the default if omitted.
  6793. required: true
  6794. type: "string"
  6795. - name: "name"
  6796. in: "query"
  6797. description: |
  6798. Local name for the pulled plugin.
  6799. The `:latest` tag is optional, and is used as the default if omitted.
  6800. required: false
  6801. type: "string"
  6802. - name: "X-Registry-Auth"
  6803. in: "header"
  6804. description: "A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication)"
  6805. type: "string"
  6806. - name: "body"
  6807. in: "body"
  6808. schema:
  6809. type: "array"
  6810. items:
  6811. description: "Describes a permission accepted by the user upon installing the plugin."
  6812. type: "object"
  6813. properties:
  6814. Name:
  6815. type: "string"
  6816. Description:
  6817. type: "string"
  6818. Value:
  6819. type: "array"
  6820. items:
  6821. type: "string"
  6822. example:
  6823. - Name: "network"
  6824. Description: ""
  6825. Value:
  6826. - "host"
  6827. - Name: "mount"
  6828. Description: ""
  6829. Value:
  6830. - "/data"
  6831. - Name: "device"
  6832. Description: ""
  6833. Value:
  6834. - "/dev/cpu_dma_latency"
  6835. tags: ["Plugin"]
  6836. /plugins/{name}/json:
  6837. get:
  6838. summary: "Inspect a plugin"
  6839. operationId: "PluginInspect"
  6840. responses:
  6841. 200:
  6842. description: "no error"
  6843. schema:
  6844. $ref: "#/definitions/Plugin"
  6845. 404:
  6846. description: "plugin is not installed"
  6847. schema:
  6848. $ref: "#/definitions/ErrorResponse"
  6849. 500:
  6850. description: "server error"
  6851. schema:
  6852. $ref: "#/definitions/ErrorResponse"
  6853. parameters:
  6854. - name: "name"
  6855. in: "path"
  6856. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  6857. required: true
  6858. type: "string"
  6859. tags: ["Plugin"]
  6860. /plugins/{name}:
  6861. delete:
  6862. summary: "Remove a plugin"
  6863. operationId: "PluginDelete"
  6864. responses:
  6865. 200:
  6866. description: "no error"
  6867. schema:
  6868. $ref: "#/definitions/Plugin"
  6869. 404:
  6870. description: "plugin is not installed"
  6871. schema:
  6872. $ref: "#/definitions/ErrorResponse"
  6873. 500:
  6874. description: "server error"
  6875. schema:
  6876. $ref: "#/definitions/ErrorResponse"
  6877. parameters:
  6878. - name: "name"
  6879. in: "path"
  6880. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  6881. required: true
  6882. type: "string"
  6883. - name: "force"
  6884. in: "query"
  6885. description: "Disable the plugin before removing. This may result in issues if the plugin is in use by a container."
  6886. type: "boolean"
  6887. default: false
  6888. tags: ["Plugin"]
  6889. /plugins/{name}/enable:
  6890. post:
  6891. summary: "Enable a plugin"
  6892. operationId: "PluginEnable"
  6893. responses:
  6894. 200:
  6895. description: "no error"
  6896. 404:
  6897. description: "plugin is not installed"
  6898. schema:
  6899. $ref: "#/definitions/ErrorResponse"
  6900. 500:
  6901. description: "server error"
  6902. schema:
  6903. $ref: "#/definitions/ErrorResponse"
  6904. parameters:
  6905. - name: "name"
  6906. in: "path"
  6907. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  6908. required: true
  6909. type: "string"
  6910. - name: "timeout"
  6911. in: "query"
  6912. description: "Set the HTTP client timeout (in seconds)"
  6913. type: "integer"
  6914. default: 0
  6915. tags: ["Plugin"]
  6916. /plugins/{name}/disable:
  6917. post:
  6918. summary: "Disable a plugin"
  6919. operationId: "PluginDisable"
  6920. responses:
  6921. 200:
  6922. description: "no error"
  6923. 404:
  6924. description: "plugin is not installed"
  6925. schema:
  6926. $ref: "#/definitions/ErrorResponse"
  6927. 500:
  6928. description: "server error"
  6929. schema:
  6930. $ref: "#/definitions/ErrorResponse"
  6931. parameters:
  6932. - name: "name"
  6933. in: "path"
  6934. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  6935. required: true
  6936. type: "string"
  6937. - name: "force"
  6938. in: "query"
  6939. description: |
  6940. Force disable a plugin even if still in use.
  6941. required: false
  6942. type: "boolean"
  6943. tags: ["Plugin"]
  6944. /plugins/{name}/upgrade:
  6945. post:
  6946. summary: "Upgrade a plugin"
  6947. operationId: "PluginUpgrade"
  6948. responses:
  6949. 204:
  6950. description: "no error"
  6951. 404:
  6952. description: "plugin not installed"
  6953. schema:
  6954. $ref: "#/definitions/ErrorResponse"
  6955. 500:
  6956. description: "server error"
  6957. schema:
  6958. $ref: "#/definitions/ErrorResponse"
  6959. parameters:
  6960. - name: "name"
  6961. in: "path"
  6962. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  6963. required: true
  6964. type: "string"
  6965. - name: "remote"
  6966. in: "query"
  6967. description: |
  6968. Remote reference to upgrade to.
  6969. The `:latest` tag is optional, and is used as the default if omitted.
  6970. required: true
  6971. type: "string"
  6972. - name: "X-Registry-Auth"
  6973. in: "header"
  6974. description: "A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication)"
  6975. type: "string"
  6976. - name: "body"
  6977. in: "body"
  6978. schema:
  6979. type: "array"
  6980. items:
  6981. description: "Describes a permission accepted by the user upon installing the plugin."
  6982. type: "object"
  6983. properties:
  6984. Name:
  6985. type: "string"
  6986. Description:
  6987. type: "string"
  6988. Value:
  6989. type: "array"
  6990. items:
  6991. type: "string"
  6992. example:
  6993. - Name: "network"
  6994. Description: ""
  6995. Value:
  6996. - "host"
  6997. - Name: "mount"
  6998. Description: ""
  6999. Value:
  7000. - "/data"
  7001. - Name: "device"
  7002. Description: ""
  7003. Value:
  7004. - "/dev/cpu_dma_latency"
  7005. tags: ["Plugin"]
  7006. /plugins/create:
  7007. post:
  7008. summary: "Create a plugin"
  7009. operationId: "PluginCreate"
  7010. consumes:
  7011. - "application/x-tar"
  7012. responses:
  7013. 204:
  7014. description: "no error"
  7015. 500:
  7016. description: "server error"
  7017. schema:
  7018. $ref: "#/definitions/ErrorResponse"
  7019. parameters:
  7020. - name: "name"
  7021. in: "query"
  7022. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  7023. required: true
  7024. type: "string"
  7025. - name: "tarContext"
  7026. in: "body"
  7027. description: "Path to tar containing plugin rootfs and manifest"
  7028. schema:
  7029. type: "string"
  7030. format: "binary"
  7031. tags: ["Plugin"]
  7032. /plugins/{name}/push:
  7033. post:
  7034. summary: "Push a plugin"
  7035. operationId: "PluginPush"
  7036. description: |
  7037. Push a plugin to the registry.
  7038. parameters:
  7039. - name: "name"
  7040. in: "path"
  7041. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  7042. required: true
  7043. type: "string"
  7044. responses:
  7045. 200:
  7046. description: "no error"
  7047. 404:
  7048. description: "plugin not installed"
  7049. schema:
  7050. $ref: "#/definitions/ErrorResponse"
  7051. 500:
  7052. description: "server error"
  7053. schema:
  7054. $ref: "#/definitions/ErrorResponse"
  7055. tags: ["Plugin"]
  7056. /plugins/{name}/set:
  7057. post:
  7058. summary: "Configure a plugin"
  7059. operationId: "PluginSet"
  7060. consumes:
  7061. - "application/json"
  7062. parameters:
  7063. - name: "name"
  7064. in: "path"
  7065. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  7066. required: true
  7067. type: "string"
  7068. - name: "body"
  7069. in: "body"
  7070. schema:
  7071. type: "array"
  7072. items:
  7073. type: "string"
  7074. example: ["DEBUG=1"]
  7075. responses:
  7076. 204:
  7077. description: "No error"
  7078. 404:
  7079. description: "Plugin not installed"
  7080. schema:
  7081. $ref: "#/definitions/ErrorResponse"
  7082. 500:
  7083. description: "Server error"
  7084. schema:
  7085. $ref: "#/definitions/ErrorResponse"
  7086. tags: ["Plugin"]
  7087. /nodes:
  7088. get:
  7089. summary: "List nodes"
  7090. operationId: "NodeList"
  7091. responses:
  7092. 200:
  7093. description: "no error"
  7094. schema:
  7095. type: "array"
  7096. items:
  7097. $ref: "#/definitions/Node"
  7098. 500:
  7099. description: "server error"
  7100. schema:
  7101. $ref: "#/definitions/ErrorResponse"
  7102. 503:
  7103. description: "node is not part of a swarm"
  7104. schema:
  7105. $ref: "#/definitions/ErrorResponse"
  7106. parameters:
  7107. - name: "filters"
  7108. in: "query"
  7109. description: |
  7110. Filters to process on the nodes list, encoded as JSON (a `map[string][]string`).
  7111. Available filters:
  7112. - `id=<node id>`
  7113. - `label=<engine label>`
  7114. - `membership=`(`accepted`|`pending`)`
  7115. - `name=<node name>`
  7116. - `role=`(`manager`|`worker`)`
  7117. type: "string"
  7118. tags: ["Node"]
  7119. /nodes/{id}:
  7120. get:
  7121. summary: "Inspect a node"
  7122. operationId: "NodeInspect"
  7123. responses:
  7124. 200:
  7125. description: "no error"
  7126. schema:
  7127. $ref: "#/definitions/Node"
  7128. 404:
  7129. description: "no such node"
  7130. schema:
  7131. $ref: "#/definitions/ErrorResponse"
  7132. 500:
  7133. description: "server error"
  7134. schema:
  7135. $ref: "#/definitions/ErrorResponse"
  7136. 503:
  7137. description: "node is not part of a swarm"
  7138. schema:
  7139. $ref: "#/definitions/ErrorResponse"
  7140. parameters:
  7141. - name: "id"
  7142. in: "path"
  7143. description: "The ID or name of the node"
  7144. type: "string"
  7145. required: true
  7146. tags: ["Node"]
  7147. delete:
  7148. summary: "Delete a node"
  7149. operationId: "NodeDelete"
  7150. responses:
  7151. 200:
  7152. description: "no error"
  7153. 404:
  7154. description: "no such node"
  7155. schema:
  7156. $ref: "#/definitions/ErrorResponse"
  7157. 500:
  7158. description: "server error"
  7159. schema:
  7160. $ref: "#/definitions/ErrorResponse"
  7161. 503:
  7162. description: "node is not part of a swarm"
  7163. schema:
  7164. $ref: "#/definitions/ErrorResponse"
  7165. parameters:
  7166. - name: "id"
  7167. in: "path"
  7168. description: "The ID or name of the node"
  7169. type: "string"
  7170. required: true
  7171. - name: "force"
  7172. in: "query"
  7173. description: "Force remove a node from the swarm"
  7174. default: false
  7175. type: "boolean"
  7176. tags: ["Node"]
  7177. /nodes/{id}/update:
  7178. post:
  7179. summary: "Update a node"
  7180. operationId: "NodeUpdate"
  7181. responses:
  7182. 200:
  7183. description: "no error"
  7184. 400:
  7185. description: "bad parameter"
  7186. schema:
  7187. $ref: "#/definitions/ErrorResponse"
  7188. 404:
  7189. description: "no such node"
  7190. schema:
  7191. $ref: "#/definitions/ErrorResponse"
  7192. 500:
  7193. description: "server error"
  7194. schema:
  7195. $ref: "#/definitions/ErrorResponse"
  7196. 503:
  7197. description: "node is not part of a swarm"
  7198. schema:
  7199. $ref: "#/definitions/ErrorResponse"
  7200. parameters:
  7201. - name: "id"
  7202. in: "path"
  7203. description: "The ID of the node"
  7204. type: "string"
  7205. required: true
  7206. - name: "body"
  7207. in: "body"
  7208. schema:
  7209. $ref: "#/definitions/NodeSpec"
  7210. - name: "version"
  7211. in: "query"
  7212. description: "The version number of the node object being updated. This is required to avoid conflicting writes."
  7213. type: "integer"
  7214. format: "int64"
  7215. required: true
  7216. tags: ["Node"]
  7217. /swarm:
  7218. get:
  7219. summary: "Inspect swarm"
  7220. operationId: "SwarmInspect"
  7221. responses:
  7222. 200:
  7223. description: "no error"
  7224. schema:
  7225. allOf:
  7226. - $ref: "#/definitions/ClusterInfo"
  7227. - type: "object"
  7228. properties:
  7229. JoinTokens:
  7230. description: "The tokens workers and managers need to join the swarm."
  7231. type: "object"
  7232. properties:
  7233. Worker:
  7234. description: "The token workers can use to join the swarm."
  7235. type: "string"
  7236. Manager:
  7237. description: "The token managers can use to join the swarm."
  7238. type: "string"
  7239. example:
  7240. CreatedAt: "2016-08-15T16:00:20.349727406Z"
  7241. Spec:
  7242. Dispatcher:
  7243. HeartbeatPeriod: 5000000000
  7244. Orchestration:
  7245. TaskHistoryRetentionLimit: 10
  7246. CAConfig:
  7247. NodeCertExpiry: 7776000000000000
  7248. Raft:
  7249. LogEntriesForSlowFollowers: 500
  7250. HeartbeatTick: 1
  7251. SnapshotInterval: 10000
  7252. ElectionTick: 3
  7253. TaskDefaults: {}
  7254. EncryptionConfig:
  7255. AutoLockManagers: false
  7256. Name: "default"
  7257. JoinTokens:
  7258. Worker: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-6qmn92w6bu3jdvnglku58u11a"
  7259. Manager: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-8llk83c4wm9lwioey2s316r9l"
  7260. ID: "70ilmkj2f6sp2137c753w2nmt"
  7261. UpdatedAt: "2016-08-15T16:32:09.623207604Z"
  7262. Version:
  7263. Index: 51
  7264. RootRotationInProgress: false
  7265. TLSInfo:
  7266. TrustRoot: |
  7267. -----BEGIN CERTIFICATE-----
  7268. MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw
  7269. EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0
  7270. MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH
  7271. A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf
  7272. 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB
  7273. Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO
  7274. PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz
  7275. pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H
  7276. -----END CERTIFICATE-----
  7277. CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh"
  7278. CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A=="
  7279. 404:
  7280. description: "no such swarm"
  7281. schema:
  7282. $ref: "#/definitions/ErrorResponse"
  7283. 500:
  7284. description: "server error"
  7285. schema:
  7286. $ref: "#/definitions/ErrorResponse"
  7287. 503:
  7288. description: "node is not part of a swarm"
  7289. schema:
  7290. $ref: "#/definitions/ErrorResponse"
  7291. tags: ["Swarm"]
  7292. /swarm/init:
  7293. post:
  7294. summary: "Initialize a new swarm"
  7295. operationId: "SwarmInit"
  7296. produces:
  7297. - "application/json"
  7298. - "text/plain"
  7299. responses:
  7300. 200:
  7301. description: "no error"
  7302. schema:
  7303. description: "The node ID"
  7304. type: "string"
  7305. example: "7v2t30z9blmxuhnyo6s4cpenp"
  7306. 400:
  7307. description: "bad parameter"
  7308. schema:
  7309. $ref: "#/definitions/ErrorResponse"
  7310. 500:
  7311. description: "server error"
  7312. schema:
  7313. $ref: "#/definitions/ErrorResponse"
  7314. 503:
  7315. description: "node is already part of a swarm"
  7316. schema:
  7317. $ref: "#/definitions/ErrorResponse"
  7318. parameters:
  7319. - name: "body"
  7320. in: "body"
  7321. required: true
  7322. schema:
  7323. type: "object"
  7324. properties:
  7325. ListenAddr:
  7326. description: "Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the default swarm listening port is used."
  7327. type: "string"
  7328. AdvertiseAddr:
  7329. description: "Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible."
  7330. type: "string"
  7331. DataPathAddr:
  7332. description: |
  7333. Address or interface to use for data path traffic (format: `<ip|interface>`), for example, `192.168.1.1`,
  7334. or an interface, like `eth0`. If `DataPathAddr` is unspecified, the same address as `AdvertiseAddr`
  7335. is used.
  7336. The `DataPathAddr` specifies the address that global scope network drivers will publish towards other
  7337. nodes in order to reach the containers running on this node. Using this parameter it is possible to
  7338. separate the container data traffic from the management traffic of the cluster.
  7339. type: "string"
  7340. ForceNewCluster:
  7341. description: "Force creation of a new swarm."
  7342. type: "boolean"
  7343. Spec:
  7344. $ref: "#/definitions/SwarmSpec"
  7345. example:
  7346. ListenAddr: "0.0.0.0:2377"
  7347. AdvertiseAddr: "192.168.1.1:2377"
  7348. ForceNewCluster: false
  7349. Spec:
  7350. Orchestration: {}
  7351. Raft: {}
  7352. Dispatcher: {}
  7353. CAConfig: {}
  7354. EncryptionConfig:
  7355. AutoLockManagers: false
  7356. tags: ["Swarm"]
  7357. /swarm/join:
  7358. post:
  7359. summary: "Join an existing swarm"
  7360. operationId: "SwarmJoin"
  7361. responses:
  7362. 200:
  7363. description: "no error"
  7364. 400:
  7365. description: "bad parameter"
  7366. schema:
  7367. $ref: "#/definitions/ErrorResponse"
  7368. 500:
  7369. description: "server error"
  7370. schema:
  7371. $ref: "#/definitions/ErrorResponse"
  7372. 503:
  7373. description: "node is already part of a swarm"
  7374. schema:
  7375. $ref: "#/definitions/ErrorResponse"
  7376. parameters:
  7377. - name: "body"
  7378. in: "body"
  7379. required: true
  7380. schema:
  7381. type: "object"
  7382. properties:
  7383. ListenAddr:
  7384. description: "Listen address used for inter-manager communication if the node gets promoted to manager, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP)."
  7385. type: "string"
  7386. AdvertiseAddr:
  7387. description: "Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible."
  7388. type: "string"
  7389. DataPathAddr:
  7390. description: |
  7391. Address or interface to use for data path traffic (format: `<ip|interface>`), for example, `192.168.1.1`,
  7392. or an interface, like `eth0`. If `DataPathAddr` is unspecified, the same address as `AdvertiseAddr`
  7393. is used.
  7394. The `DataPathAddr` specifies the address that global scope network drivers will publish towards other
  7395. nodes in order to reach the containers running on this node. Using this parameter it is possible to
  7396. separate the container data traffic from the management traffic of the cluster.
  7397. type: "string"
  7398. RemoteAddrs:
  7399. description: "Addresses of manager nodes already participating in the swarm."
  7400. type: "string"
  7401. JoinToken:
  7402. description: "Secret token for joining this swarm."
  7403. type: "string"
  7404. example:
  7405. ListenAddr: "0.0.0.0:2377"
  7406. AdvertiseAddr: "192.168.1.1:2377"
  7407. RemoteAddrs:
  7408. - "node1:2377"
  7409. JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2"
  7410. tags: ["Swarm"]
  7411. /swarm/leave:
  7412. post:
  7413. summary: "Leave a swarm"
  7414. operationId: "SwarmLeave"
  7415. responses:
  7416. 200:
  7417. description: "no error"
  7418. 500:
  7419. description: "server error"
  7420. schema:
  7421. $ref: "#/definitions/ErrorResponse"
  7422. 503:
  7423. description: "node is not part of a swarm"
  7424. schema:
  7425. $ref: "#/definitions/ErrorResponse"
  7426. parameters:
  7427. - name: "force"
  7428. description: "Force leave swarm, even if this is the last manager or that it will break the cluster."
  7429. in: "query"
  7430. type: "boolean"
  7431. default: false
  7432. tags: ["Swarm"]
  7433. /swarm/update:
  7434. post:
  7435. summary: "Update a swarm"
  7436. operationId: "SwarmUpdate"
  7437. responses:
  7438. 200:
  7439. description: "no error"
  7440. 400:
  7441. description: "bad parameter"
  7442. schema:
  7443. $ref: "#/definitions/ErrorResponse"
  7444. 500:
  7445. description: "server error"
  7446. schema:
  7447. $ref: "#/definitions/ErrorResponse"
  7448. 503:
  7449. description: "node is not part of a swarm"
  7450. schema:
  7451. $ref: "#/definitions/ErrorResponse"
  7452. parameters:
  7453. - name: "body"
  7454. in: "body"
  7455. required: true
  7456. schema:
  7457. $ref: "#/definitions/SwarmSpec"
  7458. - name: "version"
  7459. in: "query"
  7460. description: "The version number of the swarm object being updated. This is required to avoid conflicting writes."
  7461. type: "integer"
  7462. format: "int64"
  7463. required: true
  7464. - name: "rotateWorkerToken"
  7465. in: "query"
  7466. description: "Rotate the worker join token."
  7467. type: "boolean"
  7468. default: false
  7469. - name: "rotateManagerToken"
  7470. in: "query"
  7471. description: "Rotate the manager join token."
  7472. type: "boolean"
  7473. default: false
  7474. - name: "rotateManagerUnlockKey"
  7475. in: "query"
  7476. description: "Rotate the manager unlock key."
  7477. type: "boolean"
  7478. default: false
  7479. tags: ["Swarm"]
  7480. /swarm/unlockkey:
  7481. get:
  7482. summary: "Get the unlock key"
  7483. operationId: "SwarmUnlockkey"
  7484. consumes:
  7485. - "application/json"
  7486. responses:
  7487. 200:
  7488. description: "no error"
  7489. schema:
  7490. type: "object"
  7491. properties:
  7492. UnlockKey:
  7493. description: "The swarm's unlock key."
  7494. type: "string"
  7495. example:
  7496. UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
  7497. 500:
  7498. description: "server error"
  7499. schema:
  7500. $ref: "#/definitions/ErrorResponse"
  7501. 503:
  7502. description: "node is not part of a swarm"
  7503. schema:
  7504. $ref: "#/definitions/ErrorResponse"
  7505. tags: ["Swarm"]
  7506. /swarm/unlock:
  7507. post:
  7508. summary: "Unlock a locked manager"
  7509. operationId: "SwarmUnlock"
  7510. consumes:
  7511. - "application/json"
  7512. produces:
  7513. - "application/json"
  7514. parameters:
  7515. - name: "body"
  7516. in: "body"
  7517. required: true
  7518. schema:
  7519. type: "object"
  7520. properties:
  7521. UnlockKey:
  7522. description: "The swarm's unlock key."
  7523. type: "string"
  7524. example:
  7525. UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
  7526. responses:
  7527. 200:
  7528. description: "no error"
  7529. 500:
  7530. description: "server error"
  7531. schema:
  7532. $ref: "#/definitions/ErrorResponse"
  7533. 503:
  7534. description: "node is not part of a swarm"
  7535. schema:
  7536. $ref: "#/definitions/ErrorResponse"
  7537. tags: ["Swarm"]
  7538. /services:
  7539. get:
  7540. summary: "List services"
  7541. operationId: "ServiceList"
  7542. responses:
  7543. 200:
  7544. description: "no error"
  7545. schema:
  7546. type: "array"
  7547. items:
  7548. $ref: "#/definitions/Service"
  7549. 500:
  7550. description: "server error"
  7551. schema:
  7552. $ref: "#/definitions/ErrorResponse"
  7553. 503:
  7554. description: "node is not part of a swarm"
  7555. schema:
  7556. $ref: "#/definitions/ErrorResponse"
  7557. parameters:
  7558. - name: "filters"
  7559. in: "query"
  7560. type: "string"
  7561. description: |
  7562. A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters:
  7563. - `id=<service id>`
  7564. - `label=<service label>`
  7565. - `mode=["replicated"|"global"]`
  7566. - `name=<service name>`
  7567. tags: ["Service"]
  7568. /services/create:
  7569. post:
  7570. summary: "Create a service"
  7571. operationId: "ServiceCreate"
  7572. consumes:
  7573. - "application/json"
  7574. produces:
  7575. - "application/json"
  7576. responses:
  7577. 201:
  7578. description: "no error"
  7579. schema:
  7580. type: "object"
  7581. properties:
  7582. ID:
  7583. description: "The ID of the created service."
  7584. type: "string"
  7585. Warning:
  7586. description: "Optional warning message"
  7587. type: "string"
  7588. example:
  7589. ID: "ak7w3gjqoa3kuz8xcpnyy0pvl"
  7590. Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"
  7591. 400:
  7592. description: "bad parameter"
  7593. schema:
  7594. $ref: "#/definitions/ErrorResponse"
  7595. 403:
  7596. description: "network is not eligible for services"
  7597. schema:
  7598. $ref: "#/definitions/ErrorResponse"
  7599. 409:
  7600. description: "name conflicts with an existing service"
  7601. schema:
  7602. $ref: "#/definitions/ErrorResponse"
  7603. 500:
  7604. description: "server error"
  7605. schema:
  7606. $ref: "#/definitions/ErrorResponse"
  7607. 503:
  7608. description: "node is not part of a swarm"
  7609. schema:
  7610. $ref: "#/definitions/ErrorResponse"
  7611. parameters:
  7612. - name: "body"
  7613. in: "body"
  7614. required: true
  7615. schema:
  7616. allOf:
  7617. - $ref: "#/definitions/ServiceSpec"
  7618. - type: "object"
  7619. example:
  7620. Name: "web"
  7621. TaskTemplate:
  7622. ContainerSpec:
  7623. Image: "nginx:alpine"
  7624. Mounts:
  7625. -
  7626. ReadOnly: true
  7627. Source: "web-data"
  7628. Target: "/usr/share/nginx/html"
  7629. Type: "volume"
  7630. VolumeOptions:
  7631. DriverConfig: {}
  7632. Labels:
  7633. com.example.something: "something-value"
  7634. Hosts: ["10.10.10.10 host1", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"]
  7635. User: "33"
  7636. DNSConfig:
  7637. Nameservers: ["8.8.8.8"]
  7638. Search: ["example.org"]
  7639. Options: ["timeout:3"]
  7640. Secrets:
  7641. -
  7642. File:
  7643. Name: "www.example.org.key"
  7644. UID: "33"
  7645. GID: "33"
  7646. Mode: 384
  7647. SecretID: "fpjqlhnwb19zds35k8wn80lq9"
  7648. SecretName: "example_org_domain_key"
  7649. LogDriver:
  7650. Name: "json-file"
  7651. Options:
  7652. max-file: "3"
  7653. max-size: "10M"
  7654. Placement: {}
  7655. Resources:
  7656. Limits:
  7657. MemoryBytes: 104857600
  7658. Reservations: {}
  7659. RestartPolicy:
  7660. Condition: "on-failure"
  7661. Delay: 10000000000
  7662. MaxAttempts: 10
  7663. Mode:
  7664. Replicated:
  7665. Replicas: 4
  7666. UpdateConfig:
  7667. Parallelism: 2
  7668. Delay: 1000000000
  7669. FailureAction: "pause"
  7670. Monitor: 15000000000
  7671. MaxFailureRatio: 0.15
  7672. RollbackConfig:
  7673. Parallelism: 1
  7674. Delay: 1000000000
  7675. FailureAction: "pause"
  7676. Monitor: 15000000000
  7677. MaxFailureRatio: 0.15
  7678. EndpointSpec:
  7679. Ports:
  7680. -
  7681. Protocol: "tcp"
  7682. PublishedPort: 8080
  7683. TargetPort: 80
  7684. Labels:
  7685. foo: "bar"
  7686. - name: "X-Registry-Auth"
  7687. in: "header"
  7688. description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)"
  7689. type: "string"
  7690. tags: ["Service"]
  7691. /services/{id}:
  7692. get:
  7693. summary: "Inspect a service"
  7694. operationId: "ServiceInspect"
  7695. responses:
  7696. 200:
  7697. description: "no error"
  7698. schema:
  7699. $ref: "#/definitions/Service"
  7700. 404:
  7701. description: "no such service"
  7702. schema:
  7703. $ref: "#/definitions/ErrorResponse"
  7704. 500:
  7705. description: "server error"
  7706. schema:
  7707. $ref: "#/definitions/ErrorResponse"
  7708. 503:
  7709. description: "node is not part of a swarm"
  7710. schema:
  7711. $ref: "#/definitions/ErrorResponse"
  7712. parameters:
  7713. - name: "id"
  7714. in: "path"
  7715. description: "ID or name of service."
  7716. required: true
  7717. type: "string"
  7718. - name: "insertDefaults"
  7719. in: "query"
  7720. description: "Fill empty fields with default values."
  7721. type: "boolean"
  7722. default: false
  7723. tags: ["Service"]
  7724. delete:
  7725. summary: "Delete a service"
  7726. operationId: "ServiceDelete"
  7727. responses:
  7728. 200:
  7729. description: "no error"
  7730. 404:
  7731. description: "no such service"
  7732. schema:
  7733. $ref: "#/definitions/ErrorResponse"
  7734. 500:
  7735. description: "server error"
  7736. schema:
  7737. $ref: "#/definitions/ErrorResponse"
  7738. 503:
  7739. description: "node is not part of a swarm"
  7740. schema:
  7741. $ref: "#/definitions/ErrorResponse"
  7742. parameters:
  7743. - name: "id"
  7744. in: "path"
  7745. description: "ID or name of service."
  7746. required: true
  7747. type: "string"
  7748. tags: ["Service"]
  7749. /services/{id}/update:
  7750. post:
  7751. summary: "Update a service"
  7752. operationId: "ServiceUpdate"
  7753. consumes: ["application/json"]
  7754. produces: ["application/json"]
  7755. responses:
  7756. 200:
  7757. description: "no error"
  7758. schema:
  7759. $ref: "#/definitions/ServiceUpdateResponse"
  7760. 400:
  7761. description: "bad parameter"
  7762. schema:
  7763. $ref: "#/definitions/ErrorResponse"
  7764. 404:
  7765. description: "no such service"
  7766. schema:
  7767. $ref: "#/definitions/ErrorResponse"
  7768. 500:
  7769. description: "server error"
  7770. schema:
  7771. $ref: "#/definitions/ErrorResponse"
  7772. 503:
  7773. description: "node is not part of a swarm"
  7774. schema:
  7775. $ref: "#/definitions/ErrorResponse"
  7776. parameters:
  7777. - name: "id"
  7778. in: "path"
  7779. description: "ID or name of service."
  7780. required: true
  7781. type: "string"
  7782. - name: "body"
  7783. in: "body"
  7784. required: true
  7785. schema:
  7786. allOf:
  7787. - $ref: "#/definitions/ServiceSpec"
  7788. - type: "object"
  7789. example:
  7790. Name: "top"
  7791. TaskTemplate:
  7792. ContainerSpec:
  7793. Image: "busybox"
  7794. Args:
  7795. - "top"
  7796. Resources:
  7797. Limits: {}
  7798. Reservations: {}
  7799. RestartPolicy:
  7800. Condition: "any"
  7801. MaxAttempts: 0
  7802. Placement: {}
  7803. ForceUpdate: 0
  7804. Mode:
  7805. Replicated:
  7806. Replicas: 1
  7807. UpdateConfig:
  7808. Parallelism: 2
  7809. Delay: 1000000000
  7810. FailureAction: "pause"
  7811. Monitor: 15000000000
  7812. MaxFailureRatio: 0.15
  7813. RollbackConfig:
  7814. Parallelism: 1
  7815. Delay: 1000000000
  7816. FailureAction: "pause"
  7817. Monitor: 15000000000
  7818. MaxFailureRatio: 0.15
  7819. EndpointSpec:
  7820. Mode: "vip"
  7821. - name: "version"
  7822. in: "query"
  7823. description: "The version number of the service object being updated. This is required to avoid conflicting writes."
  7824. required: true
  7825. type: "integer"
  7826. - name: "registryAuthFrom"
  7827. in: "query"
  7828. type: "string"
  7829. description: "If the X-Registry-Auth header is not specified, this
  7830. parameter indicates where to find registry authorization credentials. The
  7831. valid values are `spec` and `previous-spec`."
  7832. default: "spec"
  7833. - name: "rollback"
  7834. in: "query"
  7835. type: "string"
  7836. description: "Set to this parameter to `previous` to cause a
  7837. server-side rollback to the previous service spec. The supplied spec will be
  7838. ignored in this case."
  7839. - name: "X-Registry-Auth"
  7840. in: "header"
  7841. description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)"
  7842. type: "string"
  7843. tags: ["Service"]
  7844. /services/{id}/logs:
  7845. get:
  7846. summary: "Get service logs"
  7847. description: |
  7848. Get `stdout` and `stderr` logs from a service.
  7849. **Note**: This endpoint works only for services with the `json-file` or `journald` logging drivers.
  7850. operationId: "ServiceLogs"
  7851. produces:
  7852. - "application/vnd.docker.raw-stream"
  7853. - "application/json"
  7854. responses:
  7855. 101:
  7856. description: "logs returned as a stream"
  7857. schema:
  7858. type: "string"
  7859. format: "binary"
  7860. 200:
  7861. description: "logs returned as a string in response body"
  7862. schema:
  7863. type: "string"
  7864. 404:
  7865. description: "no such service"
  7866. schema:
  7867. $ref: "#/definitions/ErrorResponse"
  7868. examples:
  7869. application/json:
  7870. message: "No such service: c2ada9df5af8"
  7871. 500:
  7872. description: "server error"
  7873. schema:
  7874. $ref: "#/definitions/ErrorResponse"
  7875. 503:
  7876. description: "node is not part of a swarm"
  7877. schema:
  7878. $ref: "#/definitions/ErrorResponse"
  7879. parameters:
  7880. - name: "id"
  7881. in: "path"
  7882. required: true
  7883. description: "ID or name of the service"
  7884. type: "string"
  7885. - name: "details"
  7886. in: "query"
  7887. description: "Show service context and extra details provided to logs."
  7888. type: "boolean"
  7889. default: false
  7890. - name: "follow"
  7891. in: "query"
  7892. description: |
  7893. Return the logs as a stream.
  7894. This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach).
  7895. type: "boolean"
  7896. default: false
  7897. - name: "stdout"
  7898. in: "query"
  7899. description: "Return logs from `stdout`"
  7900. type: "boolean"
  7901. default: false
  7902. - name: "stderr"
  7903. in: "query"
  7904. description: "Return logs from `stderr`"
  7905. type: "boolean"
  7906. default: false
  7907. - name: "since"
  7908. in: "query"
  7909. description: "Only return logs since this time, as a UNIX timestamp"
  7910. type: "integer"
  7911. default: 0
  7912. - name: "timestamps"
  7913. in: "query"
  7914. description: "Add timestamps to every log line"
  7915. type: "boolean"
  7916. default: false
  7917. - name: "tail"
  7918. in: "query"
  7919. description: "Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines."
  7920. type: "string"
  7921. default: "all"
  7922. tags: ["Service"]
  7923. /tasks:
  7924. get:
  7925. summary: "List tasks"
  7926. operationId: "TaskList"
  7927. produces:
  7928. - "application/json"
  7929. responses:
  7930. 200:
  7931. description: "no error"
  7932. schema:
  7933. type: "array"
  7934. items:
  7935. $ref: "#/definitions/Task"
  7936. example:
  7937. - ID: "0kzzo1i0y4jz6027t0k7aezc7"
  7938. Version:
  7939. Index: 71
  7940. CreatedAt: "2016-06-07T21:07:31.171892745Z"
  7941. UpdatedAt: "2016-06-07T21:07:31.376370513Z"
  7942. Spec:
  7943. ContainerSpec:
  7944. Image: "redis"
  7945. Resources:
  7946. Limits: {}
  7947. Reservations: {}
  7948. RestartPolicy:
  7949. Condition: "any"
  7950. MaxAttempts: 0
  7951. Placement: {}
  7952. ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  7953. Slot: 1
  7954. NodeID: "60gvrl6tm78dmak4yl7srz94v"
  7955. Status:
  7956. Timestamp: "2016-06-07T21:07:31.290032978Z"
  7957. State: "running"
  7958. Message: "started"
  7959. ContainerStatus:
  7960. ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
  7961. PID: 677
  7962. DesiredState: "running"
  7963. NetworksAttachments:
  7964. - Network:
  7965. ID: "4qvuz4ko70xaltuqbt8956gd1"
  7966. Version:
  7967. Index: 18
  7968. CreatedAt: "2016-06-07T20:31:11.912919752Z"
  7969. UpdatedAt: "2016-06-07T21:07:29.955277358Z"
  7970. Spec:
  7971. Name: "ingress"
  7972. Labels:
  7973. com.docker.swarm.internal: "true"
  7974. DriverConfiguration: {}
  7975. IPAMOptions:
  7976. Driver: {}
  7977. Configs:
  7978. - Subnet: "10.255.0.0/16"
  7979. Gateway: "10.255.0.1"
  7980. DriverState:
  7981. Name: "overlay"
  7982. Options:
  7983. com.docker.network.driver.overlay.vxlanid_list: "256"
  7984. IPAMOptions:
  7985. Driver:
  7986. Name: "default"
  7987. Configs:
  7988. - Subnet: "10.255.0.0/16"
  7989. Gateway: "10.255.0.1"
  7990. Addresses:
  7991. - "10.255.0.10/16"
  7992. - ID: "1yljwbmlr8er2waf8orvqpwms"
  7993. Version:
  7994. Index: 30
  7995. CreatedAt: "2016-06-07T21:07:30.019104782Z"
  7996. UpdatedAt: "2016-06-07T21:07:30.231958098Z"
  7997. Name: "hopeful_cori"
  7998. Spec:
  7999. ContainerSpec:
  8000. Image: "redis"
  8001. Resources:
  8002. Limits: {}
  8003. Reservations: {}
  8004. RestartPolicy:
  8005. Condition: "any"
  8006. MaxAttempts: 0
  8007. Placement: {}
  8008. ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  8009. Slot: 1
  8010. NodeID: "60gvrl6tm78dmak4yl7srz94v"
  8011. Status:
  8012. Timestamp: "2016-06-07T21:07:30.202183143Z"
  8013. State: "shutdown"
  8014. Message: "shutdown"
  8015. ContainerStatus:
  8016. ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213"
  8017. DesiredState: "shutdown"
  8018. NetworksAttachments:
  8019. - Network:
  8020. ID: "4qvuz4ko70xaltuqbt8956gd1"
  8021. Version:
  8022. Index: 18
  8023. CreatedAt: "2016-06-07T20:31:11.912919752Z"
  8024. UpdatedAt: "2016-06-07T21:07:29.955277358Z"
  8025. Spec:
  8026. Name: "ingress"
  8027. Labels:
  8028. com.docker.swarm.internal: "true"
  8029. DriverConfiguration: {}
  8030. IPAMOptions:
  8031. Driver: {}
  8032. Configs:
  8033. - Subnet: "10.255.0.0/16"
  8034. Gateway: "10.255.0.1"
  8035. DriverState:
  8036. Name: "overlay"
  8037. Options:
  8038. com.docker.network.driver.overlay.vxlanid_list: "256"
  8039. IPAMOptions:
  8040. Driver:
  8041. Name: "default"
  8042. Configs:
  8043. - Subnet: "10.255.0.0/16"
  8044. Gateway: "10.255.0.1"
  8045. Addresses:
  8046. - "10.255.0.5/16"
  8047. 500:
  8048. description: "server error"
  8049. schema:
  8050. $ref: "#/definitions/ErrorResponse"
  8051. 503:
  8052. description: "node is not part of a swarm"
  8053. schema:
  8054. $ref: "#/definitions/ErrorResponse"
  8055. parameters:
  8056. - name: "filters"
  8057. in: "query"
  8058. type: "string"
  8059. description: |
  8060. A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters:
  8061. - `desired-state=(running | shutdown | accepted)`
  8062. - `id=<task id>`
  8063. - `label=key` or `label="key=value"`
  8064. - `name=<task name>`
  8065. - `node=<node id or name>`
  8066. - `service=<service name>`
  8067. tags: ["Task"]
  8068. /tasks/{id}:
  8069. get:
  8070. summary: "Inspect a task"
  8071. operationId: "TaskInspect"
  8072. produces:
  8073. - "application/json"
  8074. responses:
  8075. 200:
  8076. description: "no error"
  8077. schema:
  8078. $ref: "#/definitions/Task"
  8079. 404:
  8080. description: "no such task"
  8081. schema:
  8082. $ref: "#/definitions/ErrorResponse"
  8083. 500:
  8084. description: "server error"
  8085. schema:
  8086. $ref: "#/definitions/ErrorResponse"
  8087. 503:
  8088. description: "node is not part of a swarm"
  8089. schema:
  8090. $ref: "#/definitions/ErrorResponse"
  8091. parameters:
  8092. - name: "id"
  8093. in: "path"
  8094. description: "ID of the task"
  8095. required: true
  8096. type: "string"
  8097. tags: ["Task"]
  8098. /tasks/{id}/logs:
  8099. get:
  8100. summary: "Get task logs"
  8101. description: |
  8102. Get `stdout` and `stderr` logs from a task.
  8103. **Note**: This endpoint works only for services with the `json-file` or `journald` logging drivers.
  8104. operationId: "TaskLogs"
  8105. produces:
  8106. - "application/vnd.docker.raw-stream"
  8107. - "application/json"
  8108. responses:
  8109. 101:
  8110. description: "logs returned as a stream"
  8111. schema:
  8112. type: "string"
  8113. format: "binary"
  8114. 200:
  8115. description: "logs returned as a string in response body"
  8116. schema:
  8117. type: "string"
  8118. 404:
  8119. description: "no such task"
  8120. schema:
  8121. $ref: "#/definitions/ErrorResponse"
  8122. examples:
  8123. application/json:
  8124. message: "No such task: c2ada9df5af8"
  8125. 500:
  8126. description: "server error"
  8127. schema:
  8128. $ref: "#/definitions/ErrorResponse"
  8129. 503:
  8130. description: "node is not part of a swarm"
  8131. schema:
  8132. $ref: "#/definitions/ErrorResponse"
  8133. parameters:
  8134. - name: "id"
  8135. in: "path"
  8136. required: true
  8137. description: "ID of the task"
  8138. type: "string"
  8139. - name: "details"
  8140. in: "query"
  8141. description: "Show task context and extra details provided to logs."
  8142. type: "boolean"
  8143. default: false
  8144. - name: "follow"
  8145. in: "query"
  8146. description: |
  8147. Return the logs as a stream.
  8148. This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach).
  8149. type: "boolean"
  8150. default: false
  8151. - name: "stdout"
  8152. in: "query"
  8153. description: "Return logs from `stdout`"
  8154. type: "boolean"
  8155. default: false
  8156. - name: "stderr"
  8157. in: "query"
  8158. description: "Return logs from `stderr`"
  8159. type: "boolean"
  8160. default: false
  8161. - name: "since"
  8162. in: "query"
  8163. description: "Only return logs since this time, as a UNIX timestamp"
  8164. type: "integer"
  8165. default: 0
  8166. - name: "timestamps"
  8167. in: "query"
  8168. description: "Add timestamps to every log line"
  8169. type: "boolean"
  8170. default: false
  8171. - name: "tail"
  8172. in: "query"
  8173. description: "Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines."
  8174. type: "string"
  8175. default: "all"
  8176. /secrets:
  8177. get:
  8178. summary: "List secrets"
  8179. operationId: "SecretList"
  8180. produces:
  8181. - "application/json"
  8182. responses:
  8183. 200:
  8184. description: "no error"
  8185. schema:
  8186. type: "array"
  8187. items:
  8188. $ref: "#/definitions/Secret"
  8189. example:
  8190. - ID: "ktnbjxoalbkvbvedmg1urrz8h"
  8191. Version:
  8192. Index: 11
  8193. CreatedAt: "2016-11-05T01:20:17.327670065Z"
  8194. UpdatedAt: "2016-11-05T01:20:17.327670065Z"
  8195. Spec:
  8196. Name: "app-dev.crt"
  8197. 500:
  8198. description: "server error"
  8199. schema:
  8200. $ref: "#/definitions/ErrorResponse"
  8201. 503:
  8202. description: "node is not part of a swarm"
  8203. schema:
  8204. $ref: "#/definitions/ErrorResponse"
  8205. parameters:
  8206. - name: "filters"
  8207. in: "query"
  8208. type: "string"
  8209. description: |
  8210. A JSON encoded value of the filters (a `map[string][]string`) to process on the secrets list. Available filters:
  8211. - `id=<secret id>`
  8212. - `label=<key> or label=<key>=value`
  8213. - `name=<secret name>`
  8214. - `names=<secret name>`
  8215. tags: ["Secret"]
  8216. /secrets/create:
  8217. post:
  8218. summary: "Create a secret"
  8219. operationId: "SecretCreate"
  8220. consumes:
  8221. - "application/json"
  8222. produces:
  8223. - "application/json"
  8224. responses:
  8225. 201:
  8226. description: "no error"
  8227. schema:
  8228. type: "object"
  8229. properties:
  8230. ID:
  8231. description: "The ID of the created secret."
  8232. type: "string"
  8233. example:
  8234. ID: "ktnbjxoalbkvbvedmg1urrz8h"
  8235. 409:
  8236. description: "name conflicts with an existing object"
  8237. schema:
  8238. $ref: "#/definitions/ErrorResponse"
  8239. 500:
  8240. description: "server error"
  8241. schema:
  8242. $ref: "#/definitions/ErrorResponse"
  8243. 503:
  8244. description: "node is not part of a swarm"
  8245. schema:
  8246. $ref: "#/definitions/ErrorResponse"
  8247. parameters:
  8248. - name: "body"
  8249. in: "body"
  8250. schema:
  8251. allOf:
  8252. - $ref: "#/definitions/SecretSpec"
  8253. - type: "object"
  8254. example:
  8255. Name: "app-key.crt"
  8256. Labels:
  8257. foo: "bar"
  8258. Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg=="
  8259. tags: ["Secret"]
  8260. /secrets/{id}:
  8261. get:
  8262. summary: "Inspect a secret"
  8263. operationId: "SecretInspect"
  8264. produces:
  8265. - "application/json"
  8266. responses:
  8267. 200:
  8268. description: "no error"
  8269. schema:
  8270. $ref: "#/definitions/Secret"
  8271. examples:
  8272. application/json:
  8273. ID: "ktnbjxoalbkvbvedmg1urrz8h"
  8274. Version:
  8275. Index: 11
  8276. CreatedAt: "2016-11-05T01:20:17.327670065Z"
  8277. UpdatedAt: "2016-11-05T01:20:17.327670065Z"
  8278. Spec:
  8279. Name: "app-dev.crt"
  8280. 404:
  8281. description: "secret not found"
  8282. schema:
  8283. $ref: "#/definitions/ErrorResponse"
  8284. 500:
  8285. description: "server error"
  8286. schema:
  8287. $ref: "#/definitions/ErrorResponse"
  8288. 503:
  8289. description: "node is not part of a swarm"
  8290. schema:
  8291. $ref: "#/definitions/ErrorResponse"
  8292. parameters:
  8293. - name: "id"
  8294. in: "path"
  8295. required: true
  8296. type: "string"
  8297. description: "ID of the secret"
  8298. tags: ["Secret"]
  8299. delete:
  8300. summary: "Delete a secret"
  8301. operationId: "SecretDelete"
  8302. produces:
  8303. - "application/json"
  8304. responses:
  8305. 204:
  8306. description: "no error"
  8307. 404:
  8308. description: "secret not found"
  8309. schema:
  8310. $ref: "#/definitions/ErrorResponse"
  8311. 500:
  8312. description: "server error"
  8313. schema:
  8314. $ref: "#/definitions/ErrorResponse"
  8315. 503:
  8316. description: "node is not part of a swarm"
  8317. schema:
  8318. $ref: "#/definitions/ErrorResponse"
  8319. parameters:
  8320. - name: "id"
  8321. in: "path"
  8322. required: true
  8323. type: "string"
  8324. description: "ID of the secret"
  8325. tags: ["Secret"]
  8326. /secrets/{id}/update:
  8327. post:
  8328. summary: "Update a Secret"
  8329. operationId: "SecretUpdate"
  8330. responses:
  8331. 200:
  8332. description: "no error"
  8333. 400:
  8334. description: "bad parameter"
  8335. schema:
  8336. $ref: "#/definitions/ErrorResponse"
  8337. 404:
  8338. description: "no such secret"
  8339. schema:
  8340. $ref: "#/definitions/ErrorResponse"
  8341. 500:
  8342. description: "server error"
  8343. schema:
  8344. $ref: "#/definitions/ErrorResponse"
  8345. 503:
  8346. description: "node is not part of a swarm"
  8347. schema:
  8348. $ref: "#/definitions/ErrorResponse"
  8349. parameters:
  8350. - name: "id"
  8351. in: "path"
  8352. description: "The ID or name of the secret"
  8353. type: "string"
  8354. required: true
  8355. - name: "body"
  8356. in: "body"
  8357. schema:
  8358. $ref: "#/definitions/SecretSpec"
  8359. description: "The spec of the secret to update. Currently, only the Labels field can be updated. All other fields must remain unchanged from the [SecretInspect endpoint](#operation/SecretInspect) response values."
  8360. - name: "version"
  8361. in: "query"
  8362. description: "The version number of the secret object being updated. This is required to avoid conflicting writes."
  8363. type: "integer"
  8364. format: "int64"
  8365. required: true
  8366. tags: ["Secret"]
  8367. /configs:
  8368. get:
  8369. summary: "List configs"
  8370. operationId: "ConfigList"
  8371. produces:
  8372. - "application/json"
  8373. responses:
  8374. 200:
  8375. description: "no error"
  8376. schema:
  8377. type: "array"
  8378. items:
  8379. $ref: "#/definitions/Config"
  8380. example:
  8381. - ID: "ktnbjxoalbkvbvedmg1urrz8h"
  8382. Version:
  8383. Index: 11
  8384. CreatedAt: "2016-11-05T01:20:17.327670065Z"
  8385. UpdatedAt: "2016-11-05T01:20:17.327670065Z"
  8386. Spec:
  8387. Name: "server.conf"
  8388. 500:
  8389. description: "server error"
  8390. schema:
  8391. $ref: "#/definitions/ErrorResponse"
  8392. 503:
  8393. description: "node is not part of a swarm"
  8394. schema:
  8395. $ref: "#/definitions/ErrorResponse"
  8396. parameters:
  8397. - name: "filters"
  8398. in: "query"
  8399. type: "string"
  8400. description: |
  8401. A JSON encoded value of the filters (a `map[string][]string`) to process on the configs list. Available filters:
  8402. - `id=<config id>`
  8403. - `label=<key> or label=<key>=value`
  8404. - `name=<config name>`
  8405. - `names=<config name>`
  8406. tags: ["Config"]
  8407. /configs/create:
  8408. post:
  8409. summary: "Create a config"
  8410. operationId: "ConfigCreate"
  8411. consumes:
  8412. - "application/json"
  8413. produces:
  8414. - "application/json"
  8415. responses:
  8416. 201:
  8417. description: "no error"
  8418. schema:
  8419. type: "object"
  8420. properties:
  8421. ID:
  8422. description: "The ID of the created config."
  8423. type: "string"
  8424. example:
  8425. ID: "ktnbjxoalbkvbvedmg1urrz8h"
  8426. 409:
  8427. description: "name conflicts with an existing object"
  8428. schema:
  8429. $ref: "#/definitions/ErrorResponse"
  8430. 500:
  8431. description: "server error"
  8432. schema:
  8433. $ref: "#/definitions/ErrorResponse"
  8434. 503:
  8435. description: "node is not part of a swarm"
  8436. schema:
  8437. $ref: "#/definitions/ErrorResponse"
  8438. parameters:
  8439. - name: "body"
  8440. in: "body"
  8441. schema:
  8442. allOf:
  8443. - $ref: "#/definitions/ConfigSpec"
  8444. - type: "object"
  8445. example:
  8446. Name: "server.conf"
  8447. Labels:
  8448. foo: "bar"
  8449. Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg=="
  8450. tags: ["Config"]
  8451. /configs/{id}:
  8452. get:
  8453. summary: "Inspect a config"
  8454. operationId: "ConfigInspect"
  8455. produces:
  8456. - "application/json"
  8457. responses:
  8458. 200:
  8459. description: "no error"
  8460. schema:
  8461. $ref: "#/definitions/Config"
  8462. examples:
  8463. application/json:
  8464. ID: "ktnbjxoalbkvbvedmg1urrz8h"
  8465. Version:
  8466. Index: 11
  8467. CreatedAt: "2016-11-05T01:20:17.327670065Z"
  8468. UpdatedAt: "2016-11-05T01:20:17.327670065Z"
  8469. Spec:
  8470. Name: "app-dev.crt"
  8471. 404:
  8472. description: "config not found"
  8473. schema:
  8474. $ref: "#/definitions/ErrorResponse"
  8475. 500:
  8476. description: "server error"
  8477. schema:
  8478. $ref: "#/definitions/ErrorResponse"
  8479. 503:
  8480. description: "node is not part of a swarm"
  8481. schema:
  8482. $ref: "#/definitions/ErrorResponse"
  8483. parameters:
  8484. - name: "id"
  8485. in: "path"
  8486. required: true
  8487. type: "string"
  8488. description: "ID of the config"
  8489. tags: ["Config"]
  8490. delete:
  8491. summary: "Delete a config"
  8492. operationId: "ConfigDelete"
  8493. produces:
  8494. - "application/json"
  8495. responses:
  8496. 204:
  8497. description: "no error"
  8498. 404:
  8499. description: "config not found"
  8500. schema:
  8501. $ref: "#/definitions/ErrorResponse"
  8502. 500:
  8503. description: "server error"
  8504. schema:
  8505. $ref: "#/definitions/ErrorResponse"
  8506. 503:
  8507. description: "node is not part of a swarm"
  8508. schema:
  8509. $ref: "#/definitions/ErrorResponse"
  8510. parameters:
  8511. - name: "id"
  8512. in: "path"
  8513. required: true
  8514. type: "string"
  8515. description: "ID of the config"
  8516. tags: ["Config"]
  8517. /configs/{id}/update:
  8518. post:
  8519. summary: "Update a Config"
  8520. operationId: "ConfigUpdate"
  8521. responses:
  8522. 200:
  8523. description: "no error"
  8524. 400:
  8525. description: "bad parameter"
  8526. schema:
  8527. $ref: "#/definitions/ErrorResponse"
  8528. 404:
  8529. description: "no such config"
  8530. schema:
  8531. $ref: "#/definitions/ErrorResponse"
  8532. 500:
  8533. description: "server error"
  8534. schema:
  8535. $ref: "#/definitions/ErrorResponse"
  8536. 503:
  8537. description: "node is not part of a swarm"
  8538. schema:
  8539. $ref: "#/definitions/ErrorResponse"
  8540. parameters:
  8541. - name: "id"
  8542. in: "path"
  8543. description: "The ID or name of the config"
  8544. type: "string"
  8545. required: true
  8546. - name: "body"
  8547. in: "body"
  8548. schema:
  8549. $ref: "#/definitions/ConfigSpec"
  8550. description: "The spec of the config to update. Currently, only the Labels field can be updated. All other fields must remain unchanged from the [ConfigInspect endpoint](#operation/ConfigInspect) response values."
  8551. - name: "version"
  8552. in: "query"
  8553. description: "The version number of the config object being updated. This is required to avoid conflicting writes."
  8554. type: "integer"
  8555. format: "int64"
  8556. required: true
  8557. tags: ["Config"]
  8558. /distribution/{name}/json:
  8559. get:
  8560. summary: "Get image information from the registry"
  8561. description: "Return image digest and platform information by contacting the registry."
  8562. operationId: "DistributionInspect"
  8563. produces:
  8564. - "application/json"
  8565. responses:
  8566. 200:
  8567. description: "descriptor and platform information"
  8568. schema:
  8569. type: "object"
  8570. x-go-name: DistributionInspect
  8571. required: [Descriptor, Platforms]
  8572. properties:
  8573. Descriptor:
  8574. type: "object"
  8575. description: "A descriptor struct containing digest, media type, and size"
  8576. properties:
  8577. MediaType:
  8578. type: "string"
  8579. Size:
  8580. type: "integer"
  8581. format: "int64"
  8582. Digest:
  8583. type: "string"
  8584. URLs:
  8585. type: "array"
  8586. items:
  8587. type: "string"
  8588. Platforms:
  8589. type: "array"
  8590. description: "An array containing all platforms supported by the image"
  8591. items:
  8592. type: "object"
  8593. properties:
  8594. Architecture:
  8595. type: "string"
  8596. OS:
  8597. type: "string"
  8598. OSVersion:
  8599. type: "string"
  8600. OSFeatures:
  8601. type: "array"
  8602. items:
  8603. type: "string"
  8604. Variant:
  8605. type: "string"
  8606. Features:
  8607. type: "array"
  8608. items:
  8609. type: "string"
  8610. examples:
  8611. application/json:
  8612. Descriptor:
  8613. MediaType: "application/vnd.docker.distribution.manifest.v2+json"
  8614. Digest: "sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96"
  8615. Size: 3987495
  8616. URLs:
  8617. - ""
  8618. Platforms:
  8619. - Architecture: "amd64"
  8620. OS: "linux"
  8621. OSVersion: ""
  8622. OSFeatures:
  8623. - ""
  8624. Variant: ""
  8625. Features:
  8626. - ""
  8627. 401:
  8628. description: "Failed authentication or no image found"
  8629. schema:
  8630. $ref: "#/definitions/ErrorResponse"
  8631. examples:
  8632. application/json:
  8633. message: "No such image: someimage (tag: latest)"
  8634. 500:
  8635. description: "Server error"
  8636. schema:
  8637. $ref: "#/definitions/ErrorResponse"
  8638. parameters:
  8639. - name: "name"
  8640. in: "path"
  8641. description: "Image name or id"
  8642. type: "string"
  8643. required: true
  8644. tags: ["Distribution"]