v1.42.yaml 402 KB

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