v1.33.yaml 337 KB

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