From 09c5e033235a4e39bfd374b1cc7adcbd602d98d8 Mon Sep 17 00:00:00 2001 From: rajashree Date: Mon, 7 Nov 2016 09:51:19 -0800 Subject: [PATCH 1/2] Updates vendor folder --- vendor/github.com/docker/docker/.dockerignore | 1 + vendor/github.com/docker/docker/.gitignore | 2 + vendor/github.com/docker/docker/.mailmap | 33 +- vendor/github.com/docker/docker/AUTHORS | 146 +- vendor/github.com/docker/docker/CHANGELOG.md | 420 +- .../github.com/docker/docker/CONTRIBUTING.md | 11 +- vendor/github.com/docker/docker/Dockerfile | 99 +- .../docker/docker/Dockerfile.aarch64 | 80 +- .../github.com/docker/docker/Dockerfile.armhf | 83 +- .../github.com/docker/docker/Dockerfile.gccgo | 104 - .../docker/docker/Dockerfile.ppc64le | 111 +- .../github.com/docker/docker/Dockerfile.s390x | 106 +- .../docker/docker/Dockerfile.simple | 37 +- .../docker/docker/Dockerfile.windows | 220 +- vendor/github.com/docker/docker/MAINTAINERS | 116 +- vendor/github.com/docker/docker/Makefile | 81 +- vendor/github.com/docker/docker/README.md | 8 +- vendor/github.com/docker/docker/ROADMAP.md | 30 +- vendor/github.com/docker/docker/VENDORING.md | 4 +- vendor/github.com/docker/docker/VERSION | 2 +- vendor/github.com/docker/docker/api/README.md | 5 + .../docker/docker/api/swagger-gen.yaml | 12 + .../github.com/docker/docker/api/swagger.yaml | 6828 +++++++++++++++++ .../api}/types/strslice/strslice.go | 0 vendor/github.com/docker/docker/vendor.conf | 132 + .../github.com/docker/engine-api/.travis.yml | 9 - .../github.com/docker/engine-api/CHANGELOG.md | 141 - .../docker/engine-api/CONTRIBUTING.md | 55 - vendor/github.com/docker/engine-api/LICENSE | 191 - .../github.com/docker/engine-api/MAINTAINERS | 160 - vendor/github.com/docker/engine-api/Makefile | 21 - vendor/github.com/docker/engine-api/README.md | 68 - .../github.com/docker/engine-api/appveyor.yml | 37 - .../github.com/docker/libcompose/Dockerfile | 8 +- vendor/github.com/docker/libcompose/Makefile | 18 +- vendor/github.com/docker/libcompose/README.md | 11 +- .../docker/libcompose/config/types.go | 235 +- .../docker/libcompose/yaml/command.go | 2 +- .../docker/libcompose/yaml/types_yaml.go | 2 +- .../rancher/rancher-compose/.drone.yml | 13 +- .../rancher/rancher-compose/Dockerfile.dapper | 2 +- .../rancher-compose/preprocess/project.go | 114 +- .../rancher/rancher-compose/trash.conf | 26 +- .../rancher/rancher-compose/utils/util.go | 104 + 44 files changed, 8424 insertions(+), 1464 deletions(-) delete mode 100644 vendor/github.com/docker/docker/Dockerfile.gccgo create mode 100644 vendor/github.com/docker/docker/api/README.md create mode 100644 vendor/github.com/docker/docker/api/swagger-gen.yaml create mode 100644 vendor/github.com/docker/docker/api/swagger.yaml rename vendor/github.com/docker/{engine-api => docker/api}/types/strslice/strslice.go (100%) create mode 100644 vendor/github.com/docker/docker/vendor.conf delete mode 100644 vendor/github.com/docker/engine-api/.travis.yml delete mode 100644 vendor/github.com/docker/engine-api/CHANGELOG.md delete mode 100644 vendor/github.com/docker/engine-api/CONTRIBUTING.md delete mode 100644 vendor/github.com/docker/engine-api/LICENSE delete mode 100644 vendor/github.com/docker/engine-api/MAINTAINERS delete mode 100644 vendor/github.com/docker/engine-api/Makefile delete mode 100644 vendor/github.com/docker/engine-api/README.md delete mode 100644 vendor/github.com/docker/engine-api/appveyor.yml create mode 100644 vendor/github.com/rancher/rancher-compose/utils/util.go diff --git a/vendor/github.com/docker/docker/.dockerignore b/vendor/github.com/docker/docker/.dockerignore index 9bd2c02..082cac9 100644 --- a/vendor/github.com/docker/docker/.dockerignore +++ b/vendor/github.com/docker/docker/.dockerignore @@ -1,3 +1,4 @@ bundles .gopath vendor/pkg +.go-pkg-cache diff --git a/vendor/github.com/docker/docker/.gitignore b/vendor/github.com/docker/docker/.gitignore index 43aa922..1e4d864 100644 --- a/vendor/github.com/docker/docker/.gitignore +++ b/vendor/github.com/docker/docker/.gitignore @@ -9,7 +9,9 @@ .DS_Store # a .bashrc may be added to customize the build environment .bashrc +.editorconfig .gopath/ +.go-pkg-cache/ autogen/ bundles/ cmd/dockerd/dockerd diff --git a/vendor/github.com/docker/docker/.mailmap b/vendor/github.com/docker/docker/.mailmap index 0527b6d..fe99e20 100644 --- a/vendor/github.com/docker/docker/.mailmap +++ b/vendor/github.com/docker/docker/.mailmap @@ -137,11 +137,13 @@ Hollie Teal -Jessica Frazelle -Jessica Frazelle -Jessica Frazelle -Jessica Frazelle -Jessica Frazelle +Jessica Frazelle +Jessica Frazelle +Jessica Frazelle +Jessica Frazelle +Jessica Frazelle +Jessica Frazelle +Jessica Frazelle @@ -251,4 +253,23 @@ Shengbo Song mYmNeo Shengbo Song Sylvain Bellemare - + + + +Arnaud Porterie + +David M. Karr + + + +Kenfe-Mickaël Laventure + + + + + +Runshen Zhu +Tom Barlow +Xianlu Bird +Dan Feldman +Harry Zhang diff --git a/vendor/github.com/docker/docker/AUTHORS b/vendor/github.com/docker/docker/AUTHORS index 11cd83d..246e2a3 100644 --- a/vendor/github.com/docker/docker/AUTHORS +++ b/vendor/github.com/docker/docker/AUTHORS @@ -12,11 +12,17 @@ Abhijeet Kasurde Abhinav Ajgaonkar Abhishek Chanda Abin Shahab +Adam Avilla +Adam Kunk Adam Miller +Adam Mills Adam Singer +Adam Walz Aditi Rajagopal Aditya +Adolfo Ochagavía Adria Casas +Adrian Moisey Adrian Mouat Adrian Oprea Adrien Folie @@ -41,9 +47,11 @@ Alena Prokharchyk Alessandro Boch Alessio Biancalana Alex Chan +Alex Coventry Alex Crawford Alex Ellis Alex Gaynor +Alex Olshansky Alex Samorukov Alex Warhawk Alexander Artemenko @@ -51,7 +59,7 @@ Alexander Boyd Alexander Larsson Alexander Morozov Alexander Shopov -Alexandre Beslic +Alexandre Beslic Alexandre González Alexandru Sfirlogea Alexey Guskov @@ -62,11 +70,13 @@ Ali Dehghani Allen Madsen Allen Sun almoehi +Alvaro Saurin Alvin Richards amangoel Amen Belayneh Amit Bakshi Amit Krishnan +Amit Shukla Amy Lindburg Anand Patil AnandkumarPatel @@ -80,6 +90,7 @@ Andrea Turli Andreas Köhler Andreas Savvides Andreas Tiefenthaler +Andrei Gherzan Andrew C. Bodine Andrew Clay Shafer Andrew Duckworth @@ -91,6 +102,7 @@ Andrew Macgregor Andrew Macpherson Andrew Martin Andrew Munsell +Andrew Po Andrew Weiss Andrew Williams Andrews Medina @@ -107,6 +119,7 @@ Andy Smith Andy Wilson Anes Hasicic Anil Belur +Anil Madhavapeddy Ankush Agarwal Anonmily Anthon van der Neut @@ -118,11 +131,13 @@ Anton Nikitin Anton Polonskiy Anton Tiurin Antonio Murdaca +Antonis Kalipetis Antony Messerli Anuj Bahuguna Anusha Ragunathan apocas ArikaChen +Arnaud Lefebvre Arnaud Porterie Arthur Barr Arthur Gautier @@ -132,6 +147,7 @@ Asbjørn Enge averagehuman Avi Das Avi Miller +Avi Vaid ayoshitake Azat Khuyiyakhmetov Bardia Keyoumarsi @@ -153,6 +169,7 @@ Bernerd Schaefer Bert Goethals Bharath Thiruveedula Bhiraj Butala +Bilal Amarni Bill W bin liu Blake Geno @@ -201,7 +218,9 @@ Cameron Boehmer Cameron Spear Campbell Allen Candid Dauth +Cao Weiwei Carl Henrik Lunde +Carl Loa Odin Carl X. Su Carlos Alexandro Becker Carlos Sanchez @@ -219,6 +238,7 @@ Charles Law Charles Lindsay Charles Merriam Charles Sarrazin +Charles Smith Charlie Lewis Chase Bolt ChaYoung You @@ -270,6 +290,7 @@ Colm Hally companycy Cory Forsyth cressie176 +CrimsonGlory Cristian Staretu cristiano balducci Cruceru Calin-Cristian @@ -278,12 +299,14 @@ Daan van Berkel Daehyeok Mun Dafydd Crosby dalanlan +Damian Smyth Damien Nadé Damien Nozay Damjan Georgievski Dan Anolik Dan Buch Dan Cotora +Dan Feldman Dan Griffin Dan Hirsch Dan Keder @@ -306,6 +329,7 @@ Daniel Nordberg Daniel Robinson Daniel S Daniel Von Fange +Daniel X Moore Daniel YC Lin Daniel Zhang Daniel, Dao Quang Minh @@ -314,8 +338,9 @@ Danny Yates Darren Coxall Darren Shepherd Darren Stahl +Davanum Srinivas Dave Barboza -Dave Henderson +Dave Henderson Dave MacDonald Dave Tucker David Anderson @@ -324,9 +349,12 @@ David Corking David Cramer David Currie David Davis +David Dooling David Gageot David Gebler David Lawrence +David Lechner +David M. Karr David Mackey David Mat David Mcanulty @@ -335,10 +363,12 @@ David R. Jenni David Röthlisberger David Sheets David Sissitka +David Trott David Xia David Young Davide Ceretti Dawn Chen +dbdd dcylabs decadent deed02392 @@ -357,8 +387,10 @@ devmeyster Devvyn Murphy Dharmit Shah Dieter Reuter +Dillon Dixon Dima Stopel Dimitri John Ledkov +Dimitris Rozakis Dimitry Andric Dinesh Subhraveti Diogo Monica @@ -366,8 +398,10 @@ DiuDiugirl Djibril Koné dkumor Dmitri Logvinenko +Dmitri Shuralyov Dmitry Demeshchuk Dmitry Gusev +Dmitry Smirnov Dmitry V. Krivenok Dmitry Vorobev Dolph Mathews @@ -379,17 +413,20 @@ Don Spaulding Donald Huang Dong Chen Donovan Jones +Doron Podoleanu Doug Davis Doug MacEachern Doug Tangren Dr Nic Williams dragon788 Dražen Lučanin +Drew Erny Dustin Sallings Ed Costello Edmund Wagner Eiichi Tsukata Eike Herzbach +Eivin Giske Skaaren Eivind Uggedal Elan Ruusamäe Elias Probst @@ -402,6 +439,7 @@ Emily Rose Emir Ozer Enguerran Eohyung Lee +Eric Barch Eric Hanchrow Eric Lee Eric Myhre @@ -430,12 +468,14 @@ Evan Hazlett Evan Krall Evan Phoenix Evan Wies +Everett Toews Evgeny Vereshchagin Ewa Czechowska Eystein Måløy Stenberg ezbercih Fabiano Rosas Fabio Falci +Fabio Rapposelli Fabio Rehm Fabrizio Regini Fabrizio Soppelsa @@ -448,10 +488,12 @@ Federico Gimenez Felix Geisendörfer Felix Hupfeld Felix Rabe +Felix Ruess Felix Schindler Ferenc Szabo Fernando Fero Volar +Ferran Rodenas Filipe Brandenburger Filipe Oliveira fl0yd @@ -462,7 +504,10 @@ Florian Klein Florian Maier Florian Weingarten Florin Asavoaie +fonglh +fortinux Francesc Campoy +Francis Chuang Francisco Carriedo Francisco Souza Frank Groeneveld @@ -474,6 +519,7 @@ Frederick F. Kautz IV Frederik Loeffert Frederik Nordahl Jul Sabroe Freek Kalter +frosforever fy2462 Félix Baylac-Jacqué Félix Cantournet @@ -529,7 +575,7 @@ Hao Zhang <21521210@zju.edu.cn> Harald Albers Harley Laue Harold Cooper -Harry Zhang +Harry Zhang He Simei heartlock <21521209@zju.edu.cn> Hector Castro @@ -601,6 +647,7 @@ Jan Toebes Jan-Gerd Tenberge Jan-Jaap Driessen Jana Radhakrishnan +Jannick Fahlbusch Januar Wayong Jared Biel Jared Hocutt @@ -633,6 +680,7 @@ Jeff Lindsay Jeff Mickey Jeff Minard Jeff Nickoloff +Jeff Silberman Jeff Welch Jeffrey Bolle Jeffrey Morgan @@ -645,10 +693,11 @@ Jeremy Unruh Jeroen Jacobs Jesse Dearing Jesse Dubay -Jessica Frazelle +Jessica Frazelle Jezeniel Zapanta jgeiger Jhon Honce +Ji.Zhilong Jian Zhang jianbosun Jilles Oldenbeuving @@ -662,6 +711,7 @@ Jiri Popelka Jiří Župka jjy jmzwcn +Joao Fernandes Joe Beda Joe Doliner Joe Ferguson @@ -677,6 +727,7 @@ Joey Gibson Joffrey F Johan Euphrosine Johan Rydberg +Johanan Lieberman Johannes 'fish' Ziemke John Costa John Feminella @@ -688,6 +739,7 @@ John Starks John Tims John Warwick John Willis +johnharris85 Jon Wedaman Jonas Pfenniger Jonathan A. Sternberg @@ -695,10 +747,12 @@ Jonathan Boulle Jonathan Camp Jonathan Dowland Jonathan Lebon +Jonathan Lomas Jonathan McCrohan Jonathan Mueller Jonathan Pares Jonathan Rudenberg +Jonathan Stoppani Joost Cassee Jordan Jordan Arentsen @@ -708,7 +762,10 @@ Joseph Anthony Pasquale Holsten Joseph Hager Joseph Kern Josh +Josh Bodah +Josh Chorlton Josh Hawn +Josh Horwitz Josh Poimboeuf Josiah Kiehl José Tomás Albornoz @@ -729,14 +786,16 @@ Justin Force Justin Plock Justin Simonelis Justin Terry +Justyn Temme Jyrki Puttonen Jérôme Petazzoni Jörg Thalheim Kai Blin -Kai Qiang Wu(Kennan) +Kai Qiang Wu(Kennan) Kamil Domański kamjar gerami Kanstantsin Shautsou +Kara Alexandra Karan Lyons Kareem Khazem kargakis @@ -748,17 +807,22 @@ Katrina Owen Kawsar Saiyeed kayrus Ke Xu +Keith Hudgins Keli Hu Ken Cochrane +Ken Herner Ken ICHIKAWA -Kenfe-Mickael Laventure +Kenfe-Mickaël Laventure Kenjiro Nakayama Kent Johnson Kevin "qwazerty" Houdebert +Kevin Burke Kevin Clark Kevin J. Lynagh +Kevin Jing Qiu Kevin Menard Kevin P. Kucharczyk +Kevin Richardson Kevin Shi Kevin Wallace Kevin Yap @@ -770,19 +834,23 @@ Kim Eik Kimbro Staken Kir Kolyshkin Kiran Gangadharan +Kirill Kolyshkin Kirill SIbirev knappe Kohei Tsuruta Koichi Shiraishi Konrad Kleine +Konstantin L Konstantin Pelykh Krasimir Georgiev +Kris-Mikael Krister Kristian Haugene Kristina Zabunova krrg Kun Zhang Kunal Kushwaha Kyle Conroy +Kyle Linden kyu Lachlan Coote Lai Jiangshan @@ -799,6 +867,7 @@ Laszlo Meszaros Laurent Erignoux Laurie Voss Leandro Siqueira +Lee Chao <932819864@qq.com> Lee, Meng-Han leeplay Lei Jitang @@ -809,6 +878,7 @@ Levi Blackstone Levi Gross Lewis Marshall Lewis Peckover +Liam Macgillavry Liana Lo Liang Mingqiang Liang-Chi Hsieh @@ -821,6 +891,7 @@ Liran Tal Liron Levin Liu Bo Liu Hua +lixiaobing10051267 LIZAO LI Lloyd Dewolf Lokesh Mandvekar @@ -832,6 +903,8 @@ Luca Marturana Luca Orlandi Luca-Bogdan Grigorescu Lucas Chan +Lucas Chi +Luciano Mores Luis Martínez de Bartolomé Izquierdo Lukas Waslowski lukaspustina @@ -850,6 +923,7 @@ Malte Janduda manchoz Manfred Touron Manfred Zabarauskas +Mansi Nahar mansinahar Manuel Meurer Manuel Woelker @@ -892,8 +966,10 @@ Matt Apperson Matt Bachmann Matt Bentley Matt Haggard +Matt Hoyle Matt McCormick Matt Moore +Matt Richardson Matt Robenolt Matthew Heon Matthew Mayer @@ -905,9 +981,10 @@ Matthias Rampke Matthieu Hauglustaine mattymo mattyw -Mauricio Garavaglia +Mauricio Garavaglia mauriyouth Max Shytikov +Maxim Fedchyshyn Maxim Ivanov Maxim Kulkin Maxim Treskin @@ -916,8 +993,10 @@ Meaglith Ma meejah Megan Kostick Mehul Kar +Mei ChunTao Mengdi Gao Mert Yazıcıoğlu +mgniu Micah Zoltu Michael A. Smith Michael Bridgen @@ -943,9 +1022,11 @@ Michal Fojtik Michal Gebauer Michal Jemala Michal Minar +Michal Wieczorek Michaël Pailloncy Michał Czeraszkiewicz Michiel@unhosted +Mickaël FORTUNATO Miguel Angel Fernández Miguel Morales Mihai Borobocea @@ -956,7 +1037,7 @@ Mike Danese Mike Dillon Mike Dougherty Mike Gaffney -Mike Goelzer +Mike Goelzer Mike Leone Mike MacCana Mike Naberezny @@ -966,6 +1047,7 @@ Mikhail Sobolev Miloslav Trmač mingqing Mingzhen Feng +Misty Stanley-Jones Mitch Capper mlarcher Mohammad Banikazemi @@ -1002,15 +1084,20 @@ Nathan LeClaire Nathan McCauley Nathan Williams Neal McBurnett +Neil Peterson Nelson Chen +Neyazul Haque Nghia Tran Niall O'Higgins Nicholas E. Rabenau +nick +Nick DeCoursin Nick Irvine Nick Parker Nick Payne Nick Stenning Nick Stinemates +Nicola Kabar Nicolas Borboën Nicolas De loof Nicolas Dudebout @@ -1035,11 +1122,14 @@ odk- Oguz Bilgic Oh Jinkyun Ohad Schneider +ohmystack Ole Reifschneider Oliver Neal Olivier Gambier Olle Jonsson Oriol Francès +orkaa +Oskar Niburski Otto Kekäläinen oyld ozlerhakan @@ -1049,6 +1139,7 @@ panticz Paolo G. Giarrusso Pascal Borreli Pascal Hartig +Patrick Böänziger Patrick Devine Patrick Hemmer Patrick Stapleton @@ -1058,6 +1149,7 @@ paul Paul Annesley Paul Bellamy Paul Bowsher +Paul Furtado Paul Hammond Paul Jimenez Paul Lietar @@ -1065,16 +1157,19 @@ Paul Liljenberg Paul Morie Paul Nasrat Paul Weaver +Paulo Ribeiro Pavel Lobashov Pavel Pospisil Pavel Sutyrin Pavel Tikhomirov Pavlos Ratis +Pavol Vargovcik Peeyush Gupta Peggy Li Pei Su Penghan Wang perhapszzy@sina.com +pestophagous Peter Bourgon Peter Braden Peter Choi @@ -1086,6 +1181,7 @@ Peter Malmgren Peter Salvatore Peter Volpe Peter Waller +Petr Švihlík Phil Phil Estes Phil Spitler @@ -1097,6 +1193,7 @@ pidster Piergiuliano Bossi Pierre Pierre Carrier +Pierre Dal-Pra Pierre Wacrenier Pierre-Alain RIVIERE Piotr Bogdan @@ -1122,9 +1219,11 @@ Raghavendra K T Raghuram Devarakonda Rajat Pandit Rajdeep Dua +Ralf Sippl Ralle Ralph Bean Ramkumar Ramachandra +Ramon Brooker Ramon van Alteren Ray Tsang ReadmeCritic @@ -1135,10 +1234,12 @@ Renato Riccieri Santos Zannon resouer rgstephens Rhys Hiltner +Rich Moyse Rich Seymour Richard Richard Burnison Richard Harvey +Richard Mathie Richard Metzler Richard Scothern Richo Healey @@ -1155,6 +1256,7 @@ Robert Bachmann Robert Bittle Robert Obryk Robert Stern +Robert Terhaar Robert Wallis Roberto G. Hashioka Robin Naundorf @@ -1173,8 +1275,10 @@ Roland Moriz Roma Sokolov Roman Strashkin Ron Smits +Ron Williams root root +root root root Rory Hunter @@ -1185,6 +1289,7 @@ Rozhnov Alexandr rsmoorthy Rudolph Gottesheim Rui Lopes +Runshen Zhu Ryan Anderson Ryan Aslett Ryan Belgrave @@ -1204,6 +1309,7 @@ Sabin Basyal Sachin Joshi Sagar Hani Sainath Grandhi +sakeven Sally O'Malley Sam Abed Sam Alba @@ -1225,6 +1331,7 @@ sapphiredev Satnam Singh satoru Satoshi Amemiya +Satoshi Tagomori scaleoutsean Scott Bessler Scott Collier @@ -1245,19 +1352,25 @@ Seongyeol Lim Serge Hallyn Sergey Alekseev Sergey Evstifeev +Serhat Gülçiçek Sevki Hasirci Shane Canon Shane da Silva shaunol Shawn Landden Shawn Siefkas +shawnhe Shekhar Gulati Sheng Yang Shengbo Song +Shev Yan Shih-Yuan Lee Shijiang Wei Shishir Mahajan +Shoubhik Bose +Shourya Sarcar shuai-z +Shukui Yang Shuwei Hao Sian Lerk Lau sidharthamani @@ -1268,6 +1381,7 @@ Simon Leinen Simon Taranto Sindhu S Sjoerd Langkemper +skaasten Solganik Alexander Solomon Hykes Song Gao @@ -1288,11 +1402,13 @@ Stefan Staudenmeyer Stefan Weil Stephen Crosby Stephen Day +Stephen Drake Stephen Rust Steve Durrheimer Steve Francia Steve Koch Steven Burgess +Steven Erenst Steven Iveson Steven Merrill Steven Richards @@ -1307,6 +1423,7 @@ Sylvain Bellemare Sébastien Sébastien Luttringer Sébastien Stormacq +Tadej Janež TAGOMORI Satoshi tang0th Tangi COLIN @@ -1339,7 +1456,9 @@ Thomas Swift Thomas Tanaka Thomas Texier Tianon Gravi +Tianyi Wang Tibor Vass +Tiffany Jernigan Tiffany Low Tim Bosse Tim Dettrick @@ -1351,6 +1470,7 @@ Tim Terhorst Tim Wang Tim Waugh Tim Wraight +timfeirg Timothy Hobbs tjwebb123 tobe @@ -1358,6 +1478,7 @@ Tobias Bieniek Tobias Bradtke Tobias Gesellchen Tobias Klauser +Tobias Munk Tobias Schmidt Tobias Schwab Todd Crane @@ -1402,6 +1523,7 @@ vagrant Vaidas Jablonskis Veres Lajos vgeta +Victor Algaze Victor Coisne Victor Costan Victor I. Wood @@ -1430,6 +1552,7 @@ Vivek Dasgupta Vivek Goyal Vladimir Bulyga Vladimir Kirillov +Vladimir Pouzanov Vladimir Rutsky Vladimir Varankin VladimirAus @@ -1447,6 +1570,7 @@ weiyan Weiyang Zhu Wen Cheng Ma Wendel Fleming +Wenkai Yin Wenxuan Zhao Wenyu You <21551128@zju.edu.cn> Wes Morgan @@ -1463,7 +1587,9 @@ WiseTrem wlan0 Wolfgang Powisch wonderflow +Wonjun Kim xamyzhao +Xianlu Bird XiaoBing Jiang Xiaoxu Chen xiekeyang @@ -1476,6 +1602,7 @@ YAMADA Tsuyoshi Yan Feng Yang Bai yangshukui +Yanqiang Miao Yasunori Mahata Yestin Sun Yi EungJun @@ -1490,6 +1617,8 @@ Youcef YEKHLEF Yuan Sun yuchangchun yuchengxia +yuexiao-wang +YuPengZTE Yurii Rashkovskii yuzou Zac Dover @@ -1504,6 +1633,7 @@ Zhang Kun Zhang Wei Zhang Wentao Zhenan Ye <21551168@zju.edu.cn> +zhouhao Zhu Guihua Zhuoyun Wei Zilin Du diff --git a/vendor/github.com/docker/docker/CHANGELOG.md b/vendor/github.com/docker/docker/CHANGELOG.md index 5670418..106979b 100644 --- a/vendor/github.com/docker/docker/CHANGELOG.md +++ b/vendor/github.com/docker/docker/CHANGELOG.md @@ -5,6 +5,422 @@ information on the list of deprecated flags and APIs please have a look at https://docs.docker.com/engine/deprecated/ where target removal dates can also be found. +## 1.12.3 (2016-10-26) + +**IMPORTANT**: Docker 1.12 ships with an updated systemd unit file for rpm +based installs (which includes RHEL, Fedora, CentOS, and Oracle Linux 7). When +upgrading from an older version of docker, the upgrade process may not +automatically install the updated version of the unit file, or fail to start +the docker service if; + +- the systemd unit file (`/usr/lib/systemd/system/docker.service`) contains local changes, or +- a systemd drop-in file is present, and contains `-H fd://` in the `ExecStart` directive + +Starting the docker service will produce an error: + + Failed to start docker.service: Unit docker.socket failed to load: No such file or directory. + +or + + no sockets found via socket activation: make sure the service was started by systemd. + +To resolve this: + +- Backup the current version of the unit file, and replace the file with the + [version that ships with docker 1.12](https://raw.githubusercontent.com/docker/docker/v1.12.0/contrib/init/systemd/docker.service.rpm) +- Remove the `Requires=docker.socket` directive from the `/usr/lib/systemd/system/docker.service` file if present +- Remove `-H fd://` from the `ExecStart` directive (both in the main unit file, and in any drop-in files present). + +After making those changes, run `sudo systemctl daemon-reload`, and `sudo +systemctl restart docker` to reload changes and (re)start the docker daemon. + + +### Runtime + +- Fix ambient capability usage in containers (CVE-2016-8867) [#27610](https://github.com/docker/docker/pull/27610) +- Prevent a deadlock in libcontainerd for Windows [#27136](https://github.com/docker/docker/pull/27136) +- Fix error reporting in CopyFileWithTar [#27075](https://github.com/docker/docker/pull/27075) +* Reset health status to starting when a container is restarted [#27387](https://github.com/docker/docker/pull/27387) +* Properly handle shared mount propagation in storage directory [#27609](https://github.com/docker/docker/pull/27609) +- Fix docker exec [#27610](https://github.com/docker/docker/pull/27610) +- Fix backward compatibility with containerd’s events log [#27693](https://github.com/docker/docker/pull/27693) + +### Swarm Mode + +- Fix conversion of restart-policy [#27062](https://github.com/docker/docker/pull/27062) +* Update Swarmkit [#27554](https://github.com/docker/docker/pull/27554) + * Avoid restarting a task that has already been restarted [docker/swarmkit#1305](https://github.com/docker/swarmkit/pull/1305) + * Allow duplicate published ports when they use different protocols [docker/swarmkit#1632](https://github.com/docker/swarmkit/pull/1632) + * Allow multiple randomly assigned published ports on service [docker/swarmkit#1657](https://github.com/docker/swarmkit/pull/1657) + - Fix panic when allocations happen at init time [docker/swarmkit#1651](https://github.com/docker/swarmkit/pull/1651) + +### Networking + +* Update libnetwork [#27559](https://github.com/docker/docker/pull/27559) + - Fix race in serializing sandbox to string [docker/libnetwork#1495](https://github.com/docker/libnetwork/pull/1495) + - Fix race during deletion [docker/libnetwork#1503](https://github.com/docker/libnetwork/pull/1503) + * Reset endpoint port info on connectivity revoke in bridge driver [docker/libnetwork#1504](https://github.com/docker/libnetwork/pull/1504) + - Fix a deadlock in networking code [docker/libnetwork#1507](https://github.com/docker/libnetwork/pull/1507) + - Fix a race in load balancer state [docker/libnetwork#1512](https://github.com/docker/libnetwork/pull/1512) + +### Logging + +* Update fluent-logger-golang to v1.2.1 [#27474](https://github.com/docker/docker/pull/27474) + +### Contrib + +* Update buildtags for armhf ubuntu-trusty [#27327](https://github.com/docker/docker/pull/27327) +* Add AppArmor to runc buildtags for armhf [#27421](https://github.com/docker/docker/pull/27421) + +## 1.12.2 (2016-10-11) + +**IMPORTANT**: Docker 1.12 ships with an updated systemd unit file for rpm +based installs (which includes RHEL, Fedora, CentOS, and Oracle Linux 7). When +upgrading from an older version of docker, the upgrade process may not +automatically install the updated version of the unit file, or fail to start +the docker service if; + +- the systemd unit file (`/usr/lib/systemd/system/docker.service`) contains local changes, or +- a systemd drop-in file is present, and contains `-H fd://` in the `ExecStart` directive + +Starting the docker service will produce an error: + + Failed to start docker.service: Unit docker.socket failed to load: No such file or directory. + +or + + no sockets found via socket activation: make sure the service was started by systemd. + +To resolve this: + +- Backup the current version of the unit file, and replace the file with the + [version that ships with docker 1.12](https://raw.githubusercontent.com/docker/docker/v1.12.0/contrib/init/systemd/docker.service.rpm) +- Remove the `Requires=docker.socket` directive from the `/usr/lib/systemd/system/docker.service` file if present +- Remove `-H fd://` from the `ExecStart` directive (both in the main unit file, and in any drop-in files present). + +After making those changes, run `sudo systemctl daemon-reload`, and `sudo +systemctl restart docker` to reload changes and (re)start the docker daemon. + + +### Runtime + +- Fix a panic due to a race condition filtering `docker ps` [#26049](https://github.com/docker/docker/pull/26049) +* Implement retry logic to prevent "Unable to remove filesystem" errors when using the aufs storage driver [#26536](https://github.com/docker/docker/pull/26536) +* Prevent devicemapper from removing device symlinks if `dm.use_deferred_removal` is enabled [#24740](https://github.com/docker/docker/pull/24740) +- Fix an issue where the CLI did not return correct exit codes if a command was run with invalid options [#26777](https://github.com/docker/docker/pull/26777) +- Fix a panic due to a bug in stdout / stderr processing in health checks [#26507](https://github.com/docker/docker/pull/26507) +- Fix exec's children handling [#26874](https://github.com/docker/docker/pull/26874) +- Fix exec form of HEALTHCHECK CMD [#26208](https://github.com/docker/docker/pull/26208) + +### Networking + +- Fix a daemon start panic on armv5 [#24315](https://github.com/docker/docker/issues/24315) +* Vendor libnetwork [#26879](https://github.com/docker/docker/pull/26879) [#26953](https://github.com/docker/docker/pull/26953) + * Avoid returning early on agent join failures [docker/libnetwork#1473](https://github.com/docker/libnetwork/pull/1473) + - Fix service published port cleanup issues [docker/libetwork#1432](https://github.com/docker/libnetwork/pull/1432) [docker/libnetwork#1433](https://github.com/docker/libnetwork/pull/1433) + * Recover properly from transient gossip failures [docker/libnetwork#1446](https://github.com/docker/libnetwork/pull/1446) + * Disambiguate node names known to gossip cluster to avoid node name collision [docker/libnetwork#1451](https://github.com/docker/libnetwork/pull/1451) + * Honor user provided listen address for gossip [docker/libnetwork#1460](https://github.com/docker/libnetwork/pull/1460) + * Allow reachability via published port across services on the same host [docker/libnetwork#1398](https://github.com/docker/libnetwork/pull/1398) + * Change the ingress sandbox name from random id to just `ingress_sbox` [docker/libnetwork#1449](https://github.com/docker/libnetwork/pull/1449) + - Disable service discovery in ingress network [docker/libnetwork#1489](https://github.com/docker/libnetwork/pull/1489) + +### Swarm Mode + +* Fix remote detection of a node's address when it joins the cluster [#26211](https://github.com/docker/docker/pull/26211) +* Vendor SwarmKit [#26765](https://github.com/docker/docker/pull/26765) + * Bounce session after failed status update [docker/swarmkit#1539](https://github.com/docker/swarmkit/pull/1539) + - Fix possible raft deadlocks [docker/swarmkit#1537](https://github.com/docker/swarmkit/pull/1537) + - Fix panic and endpoint leak when a service is updated with no endpoints [docker/swarmkit#1481](https://github.com/docker/swarmkit/pull/1481) + * Produce an error if the same port is published twice on `service create` or `service update` [docker/swarmkit#1495](https://github.com/docker/swarmkit/pull/1495) + - Fix an issue where changes to a service were not detected, resulting in the service not being updated [docker/swarmkit#1497](https://github.com/docker/swarmkit/pull/1497) + - Do not allow service creation on ingress network [docker/swarmkit#1600](https://github.com/docker/swarmkit/pull/1600) + +### Contrib + +* Update the debian sysv-init script to use `dockerd` instead of `docker daemon` [#25869](https://github.com/docker/docker/pull/25869) +* Improve stability when running the docker client on MacOS Sierra [#26875](https://github.com/docker/docker/pull/26875) +- Fix installation on debian stretch [#27184](https://github.com/docker/docker/pull/27184) + +### Windows + +- Fix an issue where arrow-navigation did not work when running the docker client in ConEmu [#25578](https://github.com/docker/docker/pull/25578) + +## 1.12.1 (2016-08-18) + +**IMPORTANT**: Docker 1.12 ships with an updated systemd unit file for rpm +based installs (which includes RHEL, Fedora, CentOS, and Oracle Linux 7). When +upgrading from an older version of docker, the upgrade process may not +automatically install the updated version of the unit file, or fail to start +the docker service if; + +- the systemd unit file (`/usr/lib/systemd/system/docker.service`) contains local changes, or +- a systemd drop-in file is present, and contains `-H fd://` in the `ExecStart` directive + +Starting the docker service will produce an error: + + Failed to start docker.service: Unit docker.socket failed to load: No such file or directory. + +or + + no sockets found via socket activation: make sure the service was started by systemd. + +To resolve this: + +- Backup the current version of the unit file, and replace the file with the + [version that ships with docker 1.12](https://raw.githubusercontent.com/docker/docker/v1.12.0/contrib/init/systemd/docker.service.rpm) +- Remove the `Requires=docker.socket` directive from the `/usr/lib/systemd/system/docker.service` file if present +- Remove `-H fd://` from the `ExecStart` directive (both in the main unit file, and in any drop-in files present). + +After making those changes, run `sudo systemctl daemon-reload`, and `sudo +systemctl restart docker` to reload changes and (re)start the docker daemon. + + +### Client + +* Add `Joined at` information in `node inspect --pretty` [#25512](https://github.com/docker/docker/pull/25512) +- Fix a crash on `service inspect` [#25454](https://github.com/docker/docker/pull/25454) +- Fix issue preventing `service update --env-add` to work as intended [#25427](https://github.com/docker/docker/pull/25427) +- Fix issue preventing `service update --publish-add` to work as intended [#25428](https://github.com/docker/docker/pull/25428) +- Remove `service update --network-add` and `service update --network-rm` flags + because this feature is not yet implemented in 1.12, but was inadvertently added + to the client in 1.12.0 [#25646](https://github.com/docker/docker/pull/25646) + +### Contrib + ++ Official ARM installation for Debian Jessie, Ubuntu Trusty, and Raspbian Jessie [#24815](https://github.com/docker/docker/pull/24815) [#25591](https://github.com/docker/docker/pull/25637) +- Add selinux policy per distro/version, fixing issue preventing successful installation on Fedora 24, and Oracle Linux [#25334](https://github.com/docker/docker/pull/25334) [#25593](https://github.com/docker/docker/pull/25593) + +### Networking + +- Fix issue that prevented containers to be accessed by hostname with Docker overlay driver in Swarm Mode [#25603](https://github.com/docker/docker/pull/25603) [#25648](https://github.com/docker/docker/pull/25648) +- Fix random network issues on service with published port [#25603](https://github.com/docker/docker/pull/25603) +- Fix unreliable inter-service communication after scaling down and up [#25603](https://github.com/docker/docker/pull/25603) +- Fix issue where removing all tasks on a node and adding them back breaks connectivity with other services [#25603](https://github.com/docker/docker/pull/25603) +- Fix issue where a task that fails to start results in a race, causing a `network xxx not found` error that masks the actual error [#25550](https://github.com/docker/docker/pull/25550) +- Relax validation of SRV records for external services that use SRV records not formatted according to RFC 2782 [#25739](https://github.com/docker/docker/pull/25739) + +### Plugins (experimental) + +* Make daemon events listen for plugin lifecycle events [#24760](https://github.com/docker/docker/pull/24760) +* Check for plugin state before enabling plugin [#25033](https://github.com/docker/docker/pull/25033) +- Remove plugin root from filesystem on `plugin rm` [#25187](https://github.com/docker/docker/pull/25187) +- Prevent deadlock when more than one plugin is installed [#25384](https://github.com/docker/docker/pull/25384) + +### Runtime + +* Mask join tokens in daemon logs [#25346](https://github.com/docker/docker/pull/25346) +- Fix `docker ps --filter` causing the results to no longer be sorted by creation time [#25387](https://github.com/docker/docker/pull/25387) +- Fix various crashes [#25053](https://github.com/docker/docker/pull/25053) + +### Security + +* Add `/proc/timer_list` to the masked paths list to prevent information leak from the host [#25630](https://github.com/docker/docker/pull/25630) +* Allow systemd to run with only `--cap-add SYS_ADMIN` rather than having to also add `--cap-add DAC_READ_SEARCH` or disabling seccomp filtering [#25567](https://github.com/docker/docker/pull/25567) + +### Swarm + +- Fix an issue where the swarm can get stuck electing a new leader after quorum is lost [#25055](https://github.com/docker/docker/issues/25055) +- Fix unwanted rescheduling of containers after a leader failover [#25017](https://github.com/docker/docker/issues/25017) +- Change swarm root CA key to P256 curve [swarmkit#1376](https://github.com/docker/swarmkit/pull/1376) +- Allow forced removal of a node from a swarm [#25159](https://github.com/docker/docker/pull/25159) +- Fix connection leak when a node leaves a swarm [swarmkit/#1277](https://github.com/docker/swarmkit/pull/1277) +- Backdate swarm certificates by one hour to tolerate more clock skew [swarmkit/#1243](https://github.com/docker/swarmkit/pull/1243) +- Avoid high CPU use with many unschedulable tasks [swarmkit/#1287](https://github.com/docker/swarmkit/pull/1287) +- Fix issue with global tasks not starting up [swarmkit/#1295](https://github.com/docker/swarmkit/pull/1295) +- Garbage collect raft logs [swarmkit/#1327](https://github.com/docker/swarmkit/pull/1327) + +### Volume + +- Persist local volume options after a daemon restart [#25316](https://github.com/docker/docker/pull/25316) +- Fix an issue where the mount ID was not returned on volume unmount [#25333](https://github.com/docker/docker/pull/25333) +- Fix an issue where a volume mount could inadvertently create a bind mount [#25309](https://github.com/docker/docker/pull/25309) +- `docker service create --mount type=bind,...` now correctly validates if the source path exists, instead of creating it [#25494](https://github.com/docker/docker/pull/25494) + +## 1.12.0 (2016-07-28) + + +**IMPORTANT**: Docker 1.12.0 ships with an updated systemd unit file for rpm +based installs (which includes RHEL, Fedora, CentOS, and Oracle Linux 7). When +upgrading from an older version of docker, the upgrade process may not +automatically install the updated version of the unit file, or fail to start +the docker service if; + +- the systemd unit file (`/usr/lib/systemd/system/docker.service`) contains local changes, or +- a systemd drop-in file is present, and contains `-H fd://` in the `ExecStart` directive + +Starting the docker service will produce an error: + + Failed to start docker.service: Unit docker.socket failed to load: No such file or directory. + +or + + no sockets found via socket activation: make sure the service was started by systemd. + +To resolve this: + +- Backup the current version of the unit file, and replace the file with the + [version that ships with docker 1.12](https://raw.githubusercontent.com/docker/docker/v1.12.0/contrib/init/systemd/docker.service.rpm) +- Remove the `Requires=docker.socket` directive from the `/usr/lib/systemd/system/docker.service` file if present +- Remove `-H fd://` from the `ExecStart` directive (both in the main unit file, and in any drop-in files present). + +After making those changes, run `sudo systemctl daemon-reload`, and `sudo +systemctl restart docker` to reload changes and (re)start the docker daemon. + +**IMPORTANT**: With Docker 1.12, a Linux docker installation now has two +additional binaries; `dockerd`, and `docker-proxy`. If you have scripts for +installing docker, please make sure to update them accordingly. + +### Builder + ++ New `HEALTHCHECK` Dockerfile instruction to support user-defined healthchecks [#23218](https://github.com/docker/docker/pull/23218) ++ New `SHELL` Dockerfile instruction to specify the default shell when using the shell form for commands in a Dockerfile [#22489](https://github.com/docker/docker/pull/22489) ++ Add `#escape=` Dockerfile directive to support platform-specific parsing of file paths in Dockerfile [#22268](https://github.com/docker/docker/pull/22268) ++ Add support for comments in `.dockerignore` [#23111](https://github.com/docker/docker/pull/23111) +* Support for UTF-8 in Dockerfiles [#23372](https://github.com/docker/docker/pull/23372) +* Skip UTF-8 BOM bytes from `Dockerfile` and `.dockerignore` if exist [#23234](https://github.com/docker/docker/pull/23234) +* Windows: support for `ARG` to match Linux [#22508](https://github.com/docker/docker/pull/22508) +- Fix error message when building using a daemon with the bridge network disabled [#22932](https://github.com/docker/docker/pull/22932) + +### Contrib + +* Enable seccomp for Centos 7 and Oracle Linux 7 [#22344](https://github.com/docker/docker/pull/22344) +- Remove MountFlags in systemd unit to allow shared mount propagation [#22806](https://github.com/docker/docker/pull/22806) + +### Distribution + ++ Add `--max-concurrent-downloads` and `--max-concurrent-uploads` daemon flags useful for situations where network connections don't support multiple downloads/uploads [#22445](https://github.com/docker/docker/pull/22445) +* Registry operations now honor the `ALL_PROXY` environment variable [#22316](https://github.com/docker/docker/pull/22316) +* Provide more information to the user on `docker load` [#23377](https://github.com/docker/docker/pull/23377) +* Always save registry digest metadata about images pushed and pulled [#23996](https://github.com/docker/docker/pull/23996) + +### Logging + ++ Syslog logging driver now supports DGRAM sockets [#21613](https://github.com/docker/docker/pull/21613) ++ Add `--details` option to `docker logs` to also display log tags [#21889](https://github.com/docker/docker/pull/21889) ++ Enable syslog logger to have access to env and labels [#21724](https://github.com/docker/docker/pull/21724) ++ An additional syslog-format option `rfc5424micro` to allow microsecond resolution in syslog timestamp [#21844](https://github.com/docker/docker/pull/21844) +* Inherit the daemon log options when creating containers [#21153](https://github.com/docker/docker/pull/21153) +* Remove `docker/` prefix from log messages tag and replace it with `{{.DaemonName}}` so that users have the option of changing the prefix [#22384](https://github.com/docker/docker/pull/22384) + +### Networking + ++ Built-in Virtual-IP based internal and ingress load-balancing using IPVS [#23361](https://github.com/docker/docker/pull/23361) ++ Routing Mesh using ingress overlay network [#23361](https://github.com/docker/docker/pull/23361) ++ Secured multi-host overlay networking using encrypted control-plane and Data-plane [#23361](https://github.com/docker/docker/pull/23361) ++ MacVlan driver is out of experimental [#23524](https://github.com/docker/docker/pull/23524) ++ Add `driver` filter to `network ls` [#22319](https://github.com/docker/docker/pull/22319) ++ Adding `network` filter to `docker ps --filter` [#23300](https://github.com/docker/docker/pull/23300) ++ Add `--link-local-ip` flag to `create`, `run` and `network connect` to specify a container's link-local address [#23415](https://github.com/docker/docker/pull/23415) ++ Add network label filter support [#21495](https://github.com/docker/docker/pull/21495) +* Removed dependency on external KV-Store for Overlay networking in Swarm-Mode [#23361](https://github.com/docker/docker/pull/23361) +* Add container's short-id as default network alias [#21901](https://github.com/docker/docker/pull/21901) +* `run` options `--dns` and `--net=host` are no longer mutually exclusive [#22408](https://github.com/docker/docker/pull/22408) +- Fix DNS issue when renaming containers with generated names [#22716](https://github.com/docker/docker/pull/22716) +- Allow both `network inspect -f {{.Id}}` and `network inspect -f {{.ID}}` to address inconsistency with inspect output [#23226](https://github.com/docker/docker/pull/23226) + +### Plugins (experimental) + ++ New `plugin` command to manager plugins with `install`, `enable`, `disable`, `rm`, `inspect`, `set` subcommands [#23446](https://github.com/docker/docker/pull/23446) + +### Remote API (v1.24) & Client + ++ Split the binary into two: `docker` (client) and `dockerd` (daemon) [#20639](https://github.com/docker/docker/pull/20639) ++ Add `before` and `since` filters to `docker images --filter` [#22908](https://github.com/docker/docker/pull/22908) ++ Add `--limit` option to `docker search` [#23107](https://github.com/docker/docker/pull/23107) ++ Add `--filter` option to `docker search` [#22369](https://github.com/docker/docker/pull/22369) ++ Add security options to `docker info` output [#21172](https://github.com/docker/docker/pull/21172) [#23520](https://github.com/docker/docker/pull/23520) ++ Add insecure registries to `docker info` output [#20410](https://github.com/docker/docker/pull/20410) ++ Extend Docker authorization with TLS user information [#21556](https://github.com/docker/docker/pull/21556) ++ devicemapper: expose Mininum Thin Pool Free Space through `docker info` [#21945](https://github.com/docker/docker/pull/21945) +* API now returns a JSON object when an error occurs making it more consistent [#22880](https://github.com/docker/docker/pull/22880) +- Prevent `docker run -i --restart` from hanging on exit [#22777](https://github.com/docker/docker/pull/22777) +- Fix API/CLI discrepancy on hostname validation [#21641](https://github.com/docker/docker/pull/21641) +- Fix discrepancy in the format of sizes in `stats` from HumanSize to BytesSize [#21773](https://github.com/docker/docker/pull/21773) +- authz: when request is denied return forbbiden exit code (403) [#22448](https://github.com/docker/docker/pull/22448) +- Windows: fix tty-related displaying issues [#23878](https://github.com/docker/docker/pull/23878) + +### Runtime + ++ Split the userland proxy to a separate binary (`docker-proxy`) [#23312](https://github.com/docker/docker/pull/23312) ++ Add `--live-restore` daemon flag to keep containers running when daemon shuts down, and regain control on startup [#23213](https://github.com/docker/docker/pull/23213) ++ Ability to add OCI-compatible runtimes (via `--add-runtime` daemon flag) and select one with `--runtime` on `create` and `run` [#22983](https://github.com/docker/docker/pull/22983) ++ New `overlay2` graphdriver for Linux 4.0+ with multiple lower directory support [#22126](https://github.com/docker/docker/pull/22126) ++ New load/save image events [#22137](https://github.com/docker/docker/pull/22137) ++ Add support for reloading daemon configuration through systemd [#22446](https://github.com/docker/docker/pull/22446) ++ Add disk quota support for btrfs [#19651](https://github.com/docker/docker/pull/19651) ++ Add disk quota support for zfs [#21946](https://github.com/docker/docker/pull/21946) ++ Add support for `docker run --pid=container:` [#22481](https://github.com/docker/docker/pull/22481) ++ Align default seccomp profile with selected capabilities [#22554](https://github.com/docker/docker/pull/22554) ++ Add a `daemon reload` event when the daemon reloads its configuration [#22590](https://github.com/docker/docker/pull/22590) ++ Add `trace` capability in the pprof profiler to show execution traces in binary form [#22715](https://github.com/docker/docker/pull/22715) ++ Add a `detach` event [#22898](https://github.com/docker/docker/pull/22898) ++ Add support for setting sysctls with `--sysctl` [#19265](https://github.com/docker/docker/pull/19265) ++ Add `--storage-opt` flag to `create` and `run` allowing to set `size` on devicemapper [#19367](https://github.com/docker/docker/pull/19367) ++ Add `--oom-score-adjust` daemon flag with a default value of `-500` making the daemon less likely to be killed before containers [#24516](https://github.com/docker/docker/pull/24516) +* Undeprecate the `-c` short alias of `--cpu-shares` on `run`, `build`, `create`, `update` [#22621](https://github.com/docker/docker/pull/22621) +* Prevent from using aufs and overlay graphdrivers on an eCryptfs mount [#23121](https://github.com/docker/docker/pull/23121) +- Fix issues with tmpfs mount ordering [#22329](https://github.com/docker/docker/pull/22329) +- Created containers are no longer listed on `docker ps -a -f exited=0` [#21947](https://github.com/docker/docker/pull/21947) +- Fix an issue where containers are stuck in a "Removal In Progress" state [#22423](https://github.com/docker/docker/pull/22423) +- Fix bug that was returning an HTTP 500 instead of a 400 when not specifying a command on run/create [#22762](https://github.com/docker/docker/pull/22762) +- Fix bug with `--detach-keys` whereby input matching a prefix of the detach key was not preserved [#22943](https://github.com/docker/docker/pull/22943) +- SELinux labeling is now disabled when using `--privileged` mode [#22993](https://github.com/docker/docker/pull/22993) +- If volume-mounted into a container, `/etc/hosts`, `/etc/resolv.conf`, `/etc/hostname` are no longer SELinux-relabeled [#22993](https://github.com/docker/docker/pull/22993) +- Fix inconsistency in `--tmpfs` behavior regarding mount options [#22438](https://github.com/docker/docker/pull/22438) +- Fix an issue where daemon hangs at startup [#23148](https://github.com/docker/docker/pull/23148) +- Ignore SIGPIPE events to prevent journald restarts to crash docker in some cases [#22460](https://github.com/docker/docker/pull/22460) +- Containers are not removed from stats list on error [#20835](https://github.com/docker/docker/pull/20835) +- Fix `on-failure` restart policy when daemon restarts [#20853](https://github.com/docker/docker/pull/20853) +- Fix an issue with `stats` when a container is using another container's network [#21904](https://github.com/docker/docker/pull/21904) + +### Swarm Mode + ++ New `swarm` command to manage swarms with `init`, `join`, `join-token`, `leave`, `update` subcommands [#23361](https://github.com/docker/docker/pull/23361) [#24823](https://github.com/docker/docker/pull/24823) ++ New `service` command to manage swarm-wide services with `create`, `inspect`, `update`, `rm`, `ps` subcommands [#23361](https://github.com/docker/docker/pull/23361) [#25140](https://github.com/docker/docker/pull/25140) ++ New `node` command to manage nodes with `accept`, `promote`, `demote`, `inspect`, `update`, `ps`, `ls` and `rm` subcommands [#23361](https://github.com/docker/docker/pull/23361) [#25140](https://github.com/docker/docker/pull/25140) ++ (experimental) New `stack` and `deploy` commands to manage and deploy multi-service applications [#23522](https://github.com/docker/docker/pull/23522) [#25140](https://github.com/docker/docker/pull/25140) + +### Volume + ++ Add support for local and global volume scopes (analogous to network scopes) [#22077](https://github.com/docker/docker/pull/22077) ++ Allow volume drivers to provide a `Status` field [#21006](https://github.com/docker/docker/pull/21006) ++ Add name/driver filter support for volume [#21361](https://github.com/docker/docker/pull/21361) +* Mount/Unmount operations now receives an opaque ID to allow volume drivers to differentiate between two callers [#21015](https://github.com/docker/docker/pull/21015) +- Fix issue preventing to remove a volume in a corner case [#22103](https://github.com/docker/docker/pull/22103) +- Windows: Enable auto-creation of host-path to match Linux [#22094](https://github.com/docker/docker/pull/22094) + + +### DEPRECATION +* Environment variables `DOCKER_CONTENT_TRUST_OFFLINE_PASSPHRASE` and `DOCKER_CONTENT_TRUST_TAGGING_PASSPHRASE` have been renamed + to `DOCKER_CONTENT_TRUST_ROOT_PASSPHRASE` and `DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE` respectively [#22574](https://github.com/docker/docker/pull/22574) +* Remove deprecated `syslog-tag`, `gelf-tag`, `fluentd-tag` log option in favor of the more generic `tag` one [#22620](https://github.com/docker/docker/pull/22620) +* Remove deprecated feature of passing HostConfig at API container start [#22570](https://github.com/docker/docker/pull/22570) +* Remove deprecated `-f`/`--force` flag on docker tag [#23090](https://github.com/docker/docker/pull/23090) +* Remove deprecated `/containers//copy` endpoint [#22149](https://github.com/docker/docker/pull/22149) +* Remove deprecated `docker ps` flags `--since` and `--before` [#22138](https://github.com/docker/docker/pull/22138) +* Deprecate the old 3-args form of `docker import` [#23273](https://github.com/docker/docker/pull/23273) + +## 1.11.2 (2016-05-31) + +### Networking + +- Fix a stale endpoint issue on overlay networks during ungraceful restart ([#23015](https://github.com/docker/docker/pull/23015)) +- Fix an issue where the wrong port could be reported by `docker inspect/ps/port` ([#22997](https://github.com/docker/docker/pull/22997)) + +### Runtime + +- Fix a potential panic when running `docker build` ([#23032](https://github.com/docker/docker/pull/23032)) +- Fix interpretation of `--user` parameter ([#22998](https://github.com/docker/docker/pull/22998)) +- Fix a bug preventing container statistics to be correctly reported ([#22955](https://github.com/docker/docker/pull/22955)) +- Fix an issue preventing container to be restarted after daemon restart ([#22947](https://github.com/docker/docker/pull/22947)) +- Fix issues when running 32 bit binaries on Ubuntu 16.04 ([#22922](https://github.com/docker/docker/pull/22922)) +- Fix a possible deadlock on image deletion and container attach ([#22918](https://github.com/docker/docker/pull/22918)) +- Fix an issue where containers fail to start after a daemon restart if they depend on a containerized cluster store ([#22561](https://github.com/docker/docker/pull/22561)) +- Fix an issue causing `docker ps` to hang on CentOS when using devicemapper ([#22168](https://github.com/docker/docker/pull/22168), [#23067](https://github.com/docker/docker/pull/23067)) +- Fix a bug preventing to `docker exec` into a container when using devicemapper ([#22168](https://github.com/docker/docker/pull/22168), [#23067](https://github.com/docker/docker/pull/23067)) + + ## 1.11.1 (2016-04-26) ### Distribution @@ -96,7 +512,7 @@ be found. ### Misc -+ When saving linked images together with `docker save` a subsequent `docker load` will correctly restore their parent/child relationship ([#21385](https://github.com/docker/docker/pull/c)) ++ When saving linked images together with `docker save` a subsequent `docker load` will correctly restore their parent/child relationship ([#21385](https://github.com/docker/docker/pull/21385)) + Support for building the Docker cli for OpenBSD was added ([#21325](https://github.com/docker/docker/pull/21325)) + Labels can now be applied at network, volume and image creation ([#21270](https://github.com/docker/docker/pull/21270)) * The `dockremap` is now created as a system user ([#21266](https://github.com/docker/docker/pull/21266)) @@ -1297,7 +1713,7 @@ by another client (#15489) * Update issue filing instructions * Warn against the use of symlinks for Docker's storage folder * Replace the Firefox example with an IceWeasel example -* Rewrite the PostgresSQL example using a Dockerfile and add more details to it +* Rewrite the PostgreSQL example using a Dockerfile and add more details to it * Improve the OS X documentation #### Remote API diff --git a/vendor/github.com/docker/docker/CONTRIBUTING.md b/vendor/github.com/docker/docker/CONTRIBUTING.md index 5d20383..eb5f8ab 100644 --- a/vendor/github.com/docker/docker/CONTRIBUTING.md +++ b/vendor/github.com/docker/docker/CONTRIBUTING.md @@ -123,7 +123,7 @@ However, there might be a way to implement that feature *on top of* Docker. group is for contributors and other people contributing to the Docker project. You can join them without a google account by sending an email to docker-dev+subscribe@googlegroups.com. - After receiving the join-request message, you can simply reply to that to confirm the subscribtion. + After receiving the join-request message, you can simply reply to that to confirm the subscription. @@ -234,8 +234,9 @@ Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. -660 York Street, Suite 102, -San Francisco, CA 94110 USA +1 Letterman Drive +Suite D4700 +San Francisco, CA, 94129 Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -378,7 +379,7 @@ The rules: 5. Document _all_ declarations and methods, even private ones. Declare expectations, caveats and anything else that may be important. If a type gets exported, having the comments already there will ensure it's ready. -6. Variable name length should be proportional to it's context and no longer. +6. Variable name length should be proportional to its context and no longer. `noCommaALongVariableNameLikeThisIsNotMoreClearWhenASimpleCommentWouldDo`. In practice, short methods will have short variable names and globals will have longer names. @@ -386,7 +387,7 @@ The rules: and re-examine why you need a compound name. If you still think you need a compound name, lose the underscore. 8. No utils or helpers packages. If a function is not general enough to - warrant it's own package, it has not been written generally enough to be a + warrant its own package, it has not been written generally enough to be a part of a util package. Just leave it unexported and well-documented. 9. All tests should run with `go test` and outside tooling should not be required. No, we don't need another unit testing framework. Assertion diff --git a/vendor/github.com/docker/docker/Dockerfile b/vendor/github.com/docker/docker/Dockerfile index 9972de9..5b6bbc3 100644 --- a/vendor/github.com/docker/docker/Dockerfile +++ b/vendor/github.com/docker/docker/Dockerfile @@ -9,7 +9,7 @@ # docker run -v `pwd`:/go/src/github.com/docker/docker --privileged -i -t docker bash # # # Run the test suite: -# docker run --privileged docker hack/make.sh test +# docker run --privileged docker hack/make.sh test-unit test-integration-cli test-docker-py # # # Publish a release: # docker run --privileged \ @@ -25,13 +25,13 @@ FROM debian:jessie -# add zfs ppa +# Add zfs ppa RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys E871F18B51E0147C77796AC81196BA81F6B0FC61 \ || apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys E871F18B51E0147C77796AC81196BA81F6B0FC61 RUN echo deb http://ppa.launchpad.net/zfs-native/stable/ubuntu trusty main > /etc/apt/sources.list.d/zfs.list -# allow replacing httpredir mirror +# Allow replacing httpredir mirror ARG APT_MIRROR=httpredir.debian.org RUN sed -i s/httpredir.debian.org/$APT_MIRROR/g /etc/apt/sources.list @@ -57,12 +57,17 @@ RUN apt-get update && apt-get install -y \ libapparmor-dev \ libcap-dev \ libltdl-dev \ + libnl-3-dev \ + libprotobuf-c0-dev \ + libprotobuf-dev \ libsqlite3-dev \ libsystemd-journal-dev \ libtool \ mercurial \ net-tools \ pkg-config \ + protobuf-compiler \ + protobuf-c-compiler \ python-dev \ python-mock \ python-pip \ @@ -79,7 +84,7 @@ ENV LVM2_VERSION 2.02.103 RUN mkdir -p /usr/local/lvm2 \ && curl -fsSL "https://mirrors.kernel.org/sourceware/lvm2/LVM2.${LVM2_VERSION}.tgz" \ | tar -xzC /usr/local/lvm2 --strip-components=1 -# see https://git.fedorahosted.org/cgit/lvm2.git/refs/tags for release tags +# See https://git.fedorahosted.org/cgit/lvm2.git/refs/tags for release tags # Compile and install lvm2 RUN cd /usr/local/lvm2 \ @@ -88,11 +93,11 @@ RUN cd /usr/local/lvm2 \ --enable-static_link \ && make device-mapper \ && make install_device-mapper -# see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL +# See https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL # Configure the container for OSX cross compilation ENV OSX_SDK MacOSX10.11.sdk -ENV OSX_CROSS_COMMIT 8aa9b71a394905e6c5f4b59e2b97b87a004658a4 +ENV OSX_CROSS_COMMIT a9317c18a3a457ca0a657f08cc4d0d43c6cf8953 RUN set -x \ && export OSXCROSS_PATH="/osxcross" \ && git clone https://github.com/tpoechtrager/osxcross.git $OSXCROSS_PATH \ @@ -101,7 +106,7 @@ RUN set -x \ && UNATTENDED=yes OSX_VERSION_MIN=10.6 ${OSXCROSS_PATH}/build.sh ENV PATH /osxcross/target/bin:$PATH -# install seccomp: the version shipped in trusty is too old +# Install seccomp: the version shipped in trusty is too old ENV SECCOMP_VERSION 2.3.1 RUN set -x \ && export SECCOMP_PATH="$(mktemp -d)" \ @@ -120,12 +125,12 @@ RUN set -x \ # IMPORTANT: If the version of Go is updated, the Windows to Linux CI machines # will need updating, to avoid errors. Ping #docker-maintainers on IRC # with a heads-up. -ENV GO_VERSION 1.6.2 -RUN curl -fsSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" \ +ENV GO_VERSION 1.7.3 +RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" \ | tar -xzC /usr/local ENV PATH /go/bin:/usr/local/go/bin:$PATH -ENV GOPATH /go:/go/src/github.com/docker/docker/vendor +ENV GOPATH /go # Compile Go for cross compilation ENV DOCKER_CROSSPLATFORMS \ @@ -134,24 +139,25 @@ ENV DOCKER_CROSSPLATFORMS \ freebsd/amd64 freebsd/386 freebsd/arm \ windows/amd64 windows/386 -# This has been commented out and kept as reference because we don't support compiling with older Go anymore. -# ENV GOFMT_VERSION 1.3.3 -# RUN curl -sSL https://storage.googleapis.com/golang/go${GOFMT_VERSION}.$(go env GOOS)-$(go env GOARCH).tar.gz | tar -C /go/bin -xz --strip-components=2 go/bin/gofmt - +# Dependency for golint ENV GO_TOOLS_COMMIT 823804e1ae08dbb14eb807afc7db9993bc9e3cc3 -# Grab Go's cover tool for dead-simple code coverage testing -# Grab Go's vet tool for examining go code to find suspicious constructs -# and help prevent errors that the compiler might not catch RUN git clone https://github.com/golang/tools.git /go/src/golang.org/x/tools \ - && (cd /go/src/golang.org/x/tools && git checkout -q $GO_TOOLS_COMMIT) \ - && go install -v golang.org/x/tools/cmd/cover \ - && go install -v golang.org/x/tools/cmd/vet + && (cd /go/src/golang.org/x/tools && git checkout -q $GO_TOOLS_COMMIT) + # Grab Go's lint tool ENV GO_LINT_COMMIT 32a87160691b3c96046c0c678fe57c5bef761456 RUN git clone https://github.com/golang/lint.git /go/src/github.com/golang/lint \ && (cd /go/src/github.com/golang/lint && git checkout -q $GO_LINT_COMMIT) \ && go install -v github.com/golang/lint/golint +# Install CRIU for checkpoint/restore support +ENV CRIU_VERSION 2.2 +RUN mkdir -p /usr/src/criu \ + && curl -sSL https://github.com/xemul/criu/archive/v${CRIU_VERSION}.tar.gz | tar -v -C /usr/src/criu/ -xz --strip-components=1 \ + && cd /usr/src/criu \ + && make \ + && make install-criu + # Install two versions of the registry. The first is an older version that # only supports schema1 manifests. The second is a newer version that supports # both. This allows integration-cli tests to cover push/pull with both schema1 @@ -170,7 +176,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Install notary and notary-server -ENV NOTARY_VERSION v0.3.0 +ENV NOTARY_VERSION v0.4.2 RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/docker/notary.git "$GOPATH/src/github.com/docker/notary" \ @@ -182,7 +188,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Get the "docker-py" source so we can run their integration tests -ENV DOCKER_PY_COMMIT 7befe694bd21e3c54bb1d7825270ea4bd6864c13 +ENV DOCKER_PY_COMMIT e2655f658408f9ad1f62abdef3eb6ed43c0cf324 RUN git clone https://github.com/docker/docker-py.git /docker-py \ && cd /docker-py \ && git checkout -q $DOCKER_PY_COMMIT \ @@ -201,6 +207,8 @@ ENV DOCKER_BUILDTAGS apparmor pkcs11 seccomp selinux # Let us use a .bashrc file RUN ln -sfv $PWD/.bashrc ~/.bashrc +# Add integration helps to bashrc +RUN echo "source $PWD/hack/make/.integration-test-helpers" >> /etc/bash.bashrc # Register Docker's bash completion. RUN ln -sv $PWD/contrib/completion/bash/docker /etc/bash_completion.d/docker @@ -212,49 +220,12 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ busybox:latest@sha256:e4f93f6ed15a0cdd342f5aae387886fba0ab98af0a102da6276eaf24d6e6ade0 \ debian:jessie@sha256:f968f10b4b523737e253a97eac59b0d1420b5c19b69928d35801a6373ffe330e \ hello-world:latest@sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7 -# see also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) - -# Download man page generator -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone --depth 1 -b v1.0.4 https://github.com/cpuguy83/go-md2man.git "$GOPATH/src/github.com/cpuguy83/go-md2man" \ - && git clone --depth 1 -b v1.4 https://github.com/russross/blackfriday.git "$GOPATH/src/github.com/russross/blackfriday" \ - && go get -v -d github.com/cpuguy83/go-md2man \ - && go build -v -o /usr/local/bin/go-md2man github.com/cpuguy83/go-md2man \ - && rm -rf "$GOPATH" - -# Download toml validator -ENV TOMLV_COMMIT 9baf8a8a9f2ed20a8e54160840c492f937eeaf9a -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/BurntSushi/toml.git "$GOPATH/src/github.com/BurntSushi/toml" \ - && (cd "$GOPATH/src/github.com/BurntSushi/toml" && git checkout -q "$TOMLV_COMMIT") \ - && go build -v -o /usr/local/bin/tomlv github.com/BurntSushi/toml/cmd/tomlv \ - && rm -rf "$GOPATH" +# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) -# Install runc -ENV RUNC_COMMIT d49ece5a83da3dcb820121d6850e2b61bd0a5fbe -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ - && cd "$GOPATH/src/github.com/opencontainers/runc" \ - && git checkout -q "$RUNC_COMMIT" \ - && make static BUILDTAGS="seccomp apparmor selinux" \ - && cp runc /usr/local/bin/docker-runc \ - && rm -rf "$GOPATH" - -# Install containerd -ENV CONTAINERD_COMMIT 57b7c3da915ebe943bd304c00890959b191e5264 -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ - && cd "$GOPATH/src/github.com/docker/containerd" \ - && git checkout -q "$CONTAINERD_COMMIT" \ - && make static \ - && cp bin/containerd /usr/local/bin/docker-containerd \ - && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \ - && cp bin/ctr /usr/local/bin/docker-containerd-ctr \ - && rm -rf "$GOPATH" +# Install tomlv, vndr, runc, containerd, grimes, docker-proxy +# Please edit hack/dockerfile/install-binaries.sh to update them. +COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh +RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy # Wrap all commands in the "docker-in-docker" script to allow nested containers ENTRYPOINT ["hack/dind"] diff --git a/vendor/github.com/docker/docker/Dockerfile.aarch64 b/vendor/github.com/docker/docker/Dockerfile.aarch64 index 037508b..3099184 100644 --- a/vendor/github.com/docker/docker/Dockerfile.aarch64 +++ b/vendor/github.com/docker/docker/Dockerfile.aarch64 @@ -9,7 +9,7 @@ # docker run -v `pwd`:/go/src/github.com/docker/docker --privileged -i -t docker bash # # # Run the test suite: -# docker run --privileged docker hack/make.sh test +# docker run --privileged docker hack/make.sh test-unit test-integration-cli test-docker-py # # Note: AppArmor used to mess with privileged mode, but this is no longer # the case. Therefore, you don't have to disable it anymore. @@ -36,6 +36,7 @@ RUN apt-get update && apt-get install -y \ libapparmor-dev \ libc6-dev \ libcap-dev \ + libltdl-dev \ libsqlite3-dev \ libsystemd-dev \ mercurial \ @@ -47,21 +48,18 @@ RUN apt-get update && apt-get install -y \ python-pip \ python-websocket \ gccgo \ + iproute2 \ + iputils-ping \ --no-install-recommends -# Install armhf loader to use armv6 binaries on armv8 -RUN dpkg --add-architecture armhf \ - && apt-get update \ - && apt-get install -y libc6:armhf - # Get lvm2 source for compiling statically ENV LVM2_VERSION 2.02.103 RUN mkdir -p /usr/local/lvm2 \ && curl -fsSL "https://mirrors.kernel.org/sourceware/lvm2/LVM2.${LVM2_VERSION}.tgz" \ | tar -xzC /usr/local/lvm2 --strip-components=1 -# see https://git.fedorahosted.org/cgit/lvm2.git/refs/tags for release tags +# See https://git.fedorahosted.org/cgit/lvm2.git/refs/tags for release tags -# fix platform enablement in lvm2 to support aarch64 properly +# Fix platform enablement in lvm2 to support aarch64 properly RUN set -e \ && for f in config.guess config.sub; do \ curl -fsSL -o "/usr/local/lvm2/autoconf/$f" "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=$f;hb=HEAD"; \ @@ -75,9 +73,9 @@ RUN cd /usr/local/lvm2 \ --enable-static_link \ && make device-mapper \ && make install_device-mapper -# see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL +# See https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL -# install seccomp: the version shipped in trusty is too old +# Install seccomp: the version shipped in trusty is too old ENV SECCOMP_VERSION 2.3.1 RUN set -x \ && export SECCOMP_PATH="$(mktemp -d)" \ @@ -94,15 +92,16 @@ RUN set -x \ # Install Go # We don't have official binary tarballs for ARM64, eigher for Go or bootstrap, -# so we use the official armv6 released binaries as a GOROOT_BOOTSTRAP, and -# build Go from source code. -ENV GO_VERSION 1.6.2 -RUN mkdir /usr/src/go && curl -fsSL https://storage.googleapis.com/golang/go${GO_VERSION}.src.tar.gz | tar -v -C /usr/src/go -xz --strip-components=1 \ +# so we use gccgo as bootstrap to build Go from source code. +# We don't use the official ARMv6 released binaries as a GOROOT_BOOTSTRAP, because +# not all ARM64 platforms support 32-bit mode. 32-bit mode is optional for ARMv8. +ENV GO_VERSION 1.7.3 +RUN mkdir /usr/src/go && curl -fsSL https://golang.org/dl/go${GO_VERSION}.src.tar.gz | tar -v -C /usr/src/go -xz --strip-components=1 \ && cd /usr/src/go/src \ && GOOS=linux GOARCH=arm64 GOROOT_BOOTSTRAP="$(go env GOROOT)" ./make.bash ENV PATH /usr/src/go/bin:$PATH -ENV GOPATH /go:/go/src/github.com/docker/docker/vendor +ENV GOPATH /go # Only install one version of the registry, because old version which support # schema1 manifests is not working on ARM64, we should skip integration-cli @@ -117,7 +116,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Install notary and notary-server -ENV NOTARY_VERSION v0.3.0 +ENV NOTARY_VERSION v0.4.2 RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/docker/notary.git "$GOPATH/src/github.com/docker/notary" \ @@ -129,7 +128,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Get the "docker-py" source so we can run their integration tests -ENV DOCKER_PY_COMMIT 7befe694bd21e3c54bb1d7825270ea4bd6864c13 +ENV DOCKER_PY_COMMIT e2655f658408f9ad1f62abdef3eb6ed43c0cf324 RUN git clone https://github.com/docker/docker-py.git /docker-py \ && cd /docker-py \ && git checkout -q $DOCKER_PY_COMMIT \ @@ -159,49 +158,12 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ aarch64/busybox:latest@sha256:b23a6a37cf269dff6e46d2473b6e227afa42b037e6d23435f1d2bc40fc8c2828 \ aarch64/debian:jessie@sha256:4be74a41a7c70ebe887b634b11ffe516cf4fcd56864a54941e56bb49883c3170 \ aarch64/hello-world:latest@sha256:65a4a158587b307bb02db4de41b836addb0c35175bdc801367b1ac1ddeb9afda -# see also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) - -# Download man page generator -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone --depth 1 -b v1.0.4 https://github.com/cpuguy83/go-md2man.git "$GOPATH/src/github.com/cpuguy83/go-md2man" \ - && git clone --depth 1 -b v1.4 https://github.com/russross/blackfriday.git "$GOPATH/src/github.com/russross/blackfriday" \ - && go get -v -d github.com/cpuguy83/go-md2man \ - && go build -v -o /usr/local/bin/go-md2man github.com/cpuguy83/go-md2man \ - && rm -rf "$GOPATH" - -# Download toml validator -ENV TOMLV_COMMIT 9baf8a8a9f2ed20a8e54160840c492f937eeaf9a -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/BurntSushi/toml.git "$GOPATH/src/github.com/BurntSushi/toml" \ - && (cd "$GOPATH/src/github.com/BurntSushi/toml" && git checkout -q "$TOMLV_COMMIT") \ - && go build -v -o /usr/local/bin/tomlv github.com/BurntSushi/toml/cmd/tomlv \ - && rm -rf "$GOPATH" - -# Install runc -ENV RUNC_COMMIT d49ece5a83da3dcb820121d6850e2b61bd0a5fbe -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ - && cd "$GOPATH/src/github.com/opencontainers/runc" \ - && git checkout -q "$RUNC_COMMIT" \ - && make static BUILDTAGS="seccomp apparmor selinux" \ - && cp runc /usr/local/bin/docker-runc \ - && rm -rf "$GOPATH" +# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) -# Install containerd -ENV CONTAINERD_COMMIT 57b7c3da915ebe943bd304c00890959b191e5264 -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ - && cd "$GOPATH/src/github.com/docker/containerd" \ - && git checkout -q "$CONTAINERD_COMMIT" \ - && make static \ - && cp bin/containerd /usr/local/bin/docker-containerd \ - && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \ - && cp bin/ctr /usr/local/bin/docker-containerd-ctr \ - && rm -rf "$GOPATH" +# Install tomlv, vndr, runc, containerd, grimes, docker-proxy +# Please edit hack/dockerfile/install-binaries.sh to update them. +COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh +RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy # Wrap all commands in the "docker-in-docker" script to allow nested containers ENTRYPOINT ["hack/dind"] diff --git a/vendor/github.com/docker/docker/Dockerfile.armhf b/vendor/github.com/docker/docker/Dockerfile.armhf index ac3b7f5..b00fb28 100644 --- a/vendor/github.com/docker/docker/Dockerfile.armhf +++ b/vendor/github.com/docker/docker/Dockerfile.armhf @@ -9,7 +9,7 @@ # docker run -v `pwd`:/go/src/github.com/docker/docker --privileged -i -t docker bash # # # Run the test suite: -# docker run --privileged docker hack/make.sh test +# docker run --privileged docker hack/make.sh test-unit test-integration-cli test-docker-py # # Note: AppArmor used to mess with privileged mode, but this is no longer # the case. Therefore, you don't have to disable it anymore. @@ -46,14 +46,15 @@ RUN apt-get update && apt-get install -y \ python-websocket \ xfsprogs \ tar \ - --no-install-recommends + --no-install-recommends \ + && pip install awscli==1.10.15 # Get lvm2 source for compiling statically ENV LVM2_VERSION 2.02.103 RUN mkdir -p /usr/local/lvm2 \ && curl -fsSL "https://mirrors.kernel.org/sourceware/lvm2/LVM2.${LVM2_VERSION}.tgz" \ | tar -xzC /usr/local/lvm2 --strip-components=1 -# see https://git.fedorahosted.org/cgit/lvm2.git/refs/tags for release tags +# See https://git.fedorahosted.org/cgit/lvm2.git/refs/tags for release tags # Compile and install lvm2 RUN cd /usr/local/lvm2 \ @@ -62,38 +63,31 @@ RUN cd /usr/local/lvm2 \ --enable-static_link \ && make device-mapper \ && make install_device-mapper -# see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL +# See https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL # Install Go -ENV GO_VERSION 1.6.2 -RUN curl -fsSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-armv6l.tar.gz" \ +ENV GO_VERSION 1.7.3 +RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" \ | tar -xzC /usr/local ENV PATH /go/bin:/usr/local/go/bin:$PATH -ENV GOPATH /go:/go/src/github.com/docker/docker/vendor +ENV GOPATH /go -# we're building for armhf, which is ARMv7, so let's be explicit about that +# We're building for armhf, which is ARMv7, so let's be explicit about that ENV GOARCH arm ENV GOARM 7 -# This has been commented out and kept as reference because we don't support compiling with older Go anymore. -# ENV GOFMT_VERSION 1.3.3 -# RUN curl -sSL https://storage.googleapis.com/golang/go${GOFMT_VERSION}.$(go env GOOS)-$(go env GOARCH).tar.gz | tar -C /go/bin -xz --strip-components=2 go/bin/gofmt - +# Dependency for golint ENV GO_TOOLS_COMMIT 823804e1ae08dbb14eb807afc7db9993bc9e3cc3 -# Grab Go's cover tool for dead-simple code coverage testing -# Grab Go's vet tool for examining go code to find suspicious constructs -# and help prevent errors that the compiler might not catch RUN git clone https://github.com/golang/tools.git /go/src/golang.org/x/tools \ - && (cd /go/src/golang.org/x/tools && git checkout -q $GO_TOOLS_COMMIT) \ - && go install -v golang.org/x/tools/cmd/cover \ - && go install -v golang.org/x/tools/cmd/vet + && (cd /go/src/golang.org/x/tools && git checkout -q $GO_TOOLS_COMMIT) + # Grab Go's lint tool ENV GO_LINT_COMMIT 32a87160691b3c96046c0c678fe57c5bef761456 RUN git clone https://github.com/golang/lint.git /go/src/github.com/golang/lint \ && (cd /go/src/github.com/golang/lint && git checkout -q $GO_LINT_COMMIT) \ && go install -v github.com/golang/lint/golint -# install seccomp: the version shipped in trusty is too old +# Install seccomp: the version shipped in trusty is too old ENV SECCOMP_VERSION 2.3.1 RUN set -x \ && export SECCOMP_PATH="$(mktemp -d)" \ @@ -126,7 +120,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Install notary and notary-server -ENV NOTARY_VERSION v0.3.0 +ENV NOTARY_VERSION v0.4.2 RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/docker/notary.git "$GOPATH/src/github.com/docker/notary" \ @@ -138,7 +132,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Get the "docker-py" source so we can run their integration tests -ENV DOCKER_PY_COMMIT 7befe694bd21e3c54bb1d7825270ea4bd6864c13 +ENV DOCKER_PY_COMMIT e2655f658408f9ad1f62abdef3eb6ed43c0cf324 RUN git clone https://github.com/docker/docker-py.git /docker-py \ && cd /docker-py \ && git checkout -q $DOCKER_PY_COMMIT \ @@ -168,49 +162,12 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ armhf/busybox:latest@sha256:d98a7343ac750ffe387e3d514f8521ba69846c216778919b01414b8617cfb3d4 \ armhf/debian:jessie@sha256:4a2187483f04a84f9830910fe3581d69b3c985cc045d9f01d8e2f3795b28107b \ armhf/hello-world:latest@sha256:161dcecea0225975b2ad5f768058212c1e0d39e8211098666ffa1ac74cfb7791 -# see also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) +# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) -# Download man page generator -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone --depth 1 -b v1.0.4 https://github.com/cpuguy83/go-md2man.git "$GOPATH/src/github.com/cpuguy83/go-md2man" \ - && git clone --depth 1 -b v1.4 https://github.com/russross/blackfriday.git "$GOPATH/src/github.com/russross/blackfriday" \ - && go get -v -d github.com/cpuguy83/go-md2man \ - && go build -v -o /usr/local/bin/go-md2man github.com/cpuguy83/go-md2man \ - && rm -rf "$GOPATH" - -# Download toml validator -ENV TOMLV_COMMIT 9baf8a8a9f2ed20a8e54160840c492f937eeaf9a -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/BurntSushi/toml.git "$GOPATH/src/github.com/BurntSushi/toml" \ - && (cd "$GOPATH/src/github.com/BurntSushi/toml" && git checkout -q "$TOMLV_COMMIT") \ - && go build -v -o /usr/local/bin/tomlv github.com/BurntSushi/toml/cmd/tomlv \ - && rm -rf "$GOPATH" - -# Install runc -ENV RUNC_COMMIT d49ece5a83da3dcb820121d6850e2b61bd0a5fbe -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ - && cd "$GOPATH/src/github.com/opencontainers/runc" \ - && git checkout -q "$RUNC_COMMIT" \ - && make static BUILDTAGS="seccomp apparmor selinux" \ - && cp runc /usr/local/bin/docker-runc \ - && rm -rf "$GOPATH" - -# Install containerd -ENV CONTAINERD_COMMIT 57b7c3da915ebe943bd304c00890959b191e5264 -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ - && cd "$GOPATH/src/github.com/docker/containerd" \ - && git checkout -q "$CONTAINERD_COMMIT" \ - && make static \ - && cp bin/containerd /usr/local/bin/docker-containerd \ - && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \ - && cp bin/ctr /usr/local/bin/docker-containerd-ctr \ - && rm -rf "$GOPATH" +# Install tomlv, vndr, runc, containerd, grimes, docker-proxy +# Please edit hack/dockerfile/install-binaries.sh to update them. +COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh +RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy ENTRYPOINT ["hack/dind"] diff --git a/vendor/github.com/docker/docker/Dockerfile.gccgo b/vendor/github.com/docker/docker/Dockerfile.gccgo deleted file mode 100644 index 458fd42..0000000 --- a/vendor/github.com/docker/docker/Dockerfile.gccgo +++ /dev/null @@ -1,104 +0,0 @@ -# This file describes the standard way to build Docker, using docker -# -# Usage: -# -# # Assemble the full dev environment. This is slow the first time. -# docker build -t docker -f Dockerfile.gccgo . -# - -FROM gcc:6.1 - -# Packaged dependencies -RUN apt-get update && apt-get install -y \ - apparmor \ - aufs-tools \ - btrfs-tools \ - build-essential \ - curl \ - git \ - iptables \ - jq \ - net-tools \ - libapparmor-dev \ - libcap-dev \ - libsqlite3-dev \ - mercurial \ - net-tools \ - parallel \ - python-dev \ - python-mock \ - python-pip \ - python-websocket \ - --no-install-recommends - -# Get lvm2 source for compiling statically -RUN git clone -b v2_02_103 https://git.fedorahosted.org/git/lvm2.git /usr/local/lvm2 -# see https://git.fedorahosted.org/cgit/lvm2.git/refs/tags for release tags - -# Compile and install lvm2 -RUN cd /usr/local/lvm2 \ - && ./configure --enable-static_link \ - && make device-mapper \ - && make install_device-mapper -# see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL - -# install seccomp: the version shipped in jessie is too old -ENV SECCOMP_VERSION v2.3.1 -RUN set -x \ - && export SECCOMP_PATH=$(mktemp -d) \ - && git clone https://github.com/seccomp/libseccomp.git "$SECCOMP_PATH" \ - && ( \ - cd "$SECCOMP_PATH" \ - && git checkout "$SECCOMP_VERSION" \ - && ./autogen.sh \ - && ./configure --prefix=/usr \ - && make \ - && make install \ - ) \ - && rm -rf "$SECCOMP_PATH" - -ENV GOPATH /go:/go/src/github.com/docker/docker/vendor - -# Get the "docker-py" source so we can run their integration tests -ENV DOCKER_PY_COMMIT 7befe694bd21e3c54bb1d7825270ea4bd6864c13 -RUN git clone https://github.com/docker/docker-py.git /docker-py \ - && cd /docker-py \ - && git checkout -q $DOCKER_PY_COMMIT - -# Add an unprivileged user to be used for tests which need it -RUN groupadd -r docker -RUN useradd --create-home --gid docker unprivilegeduser - -VOLUME /var/lib/docker -WORKDIR /go/src/github.com/docker/docker -ENV DOCKER_BUILDTAGS apparmor seccomp selinux - -# Install runc -ENV RUNC_COMMIT d49ece5a83da3dcb820121d6850e2b61bd0a5fbe -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ - && cd "$GOPATH/src/github.com/opencontainers/runc" \ - && git checkout -q "$RUNC_COMMIT" \ - && make static BUILDTAGS="seccomp apparmor selinux" \ - && cp runc /usr/local/bin/docker-runc \ - && rm -rf "$GOPATH" - -# Install containerd -ENV CONTAINERD_COMMIT 57b7c3da915ebe943bd304c00890959b191e5264 -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ - && cd "$GOPATH/src/github.com/docker/containerd" \ - && git checkout -q "$CONTAINERD_COMMIT" \ - && make static \ - && cp bin/containerd /usr/local/bin/docker-containerd \ - && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \ - && cp bin/ctr /usr/local/bin/docker-containerd-ctr \ - && rm -rf "$GOPATH" - -# Wrap all commands in the "docker-in-docker" script to allow nested containers -ENTRYPOINT ["hack/dind"] - -# Upload docker source -COPY . /go/src/github.com/docker/docker diff --git a/vendor/github.com/docker/docker/Dockerfile.ppc64le b/vendor/github.com/docker/docker/Dockerfile.ppc64le index 6240bb9..c59628a 100644 --- a/vendor/github.com/docker/docker/Dockerfile.ppc64le +++ b/vendor/github.com/docker/docker/Dockerfile.ppc64le @@ -9,13 +9,14 @@ # docker run -v `pwd`:/go/src/github.com/docker/docker --privileged -i -t docker bash # # # Run the test suite: -# docker run --privileged docker hack/make.sh test +# docker run --privileged docker hack/make.sh test-unit test-integration-cli test-docker-py # # Note: AppArmor used to mess with privileged mode, but this is no longer # the case. Therefore, you don't have to disable it anymore. # -FROM ppc64le/gcc:6.1 +# ppc64le/golang is a debian:jessie based image with golang installed +FROM ppc64le/golang:1.6.3 # Packaged dependencies RUN apt-get update && apt-get install -y \ @@ -53,9 +54,9 @@ ENV LVM2_VERSION 2.02.103 RUN mkdir -p /usr/local/lvm2 \ && curl -fsSL "https://mirrors.kernel.org/sourceware/lvm2/LVM2.${LVM2_VERSION}.tgz" \ | tar -xzC /usr/local/lvm2 --strip-components=1 -# see https://git.fedorahosted.org/cgit/lvm2.git/refs/tags for release tags +# See https://git.fedorahosted.org/cgit/lvm2.git/refs/tags for release tags -# fix platform enablement in lvm2 to support ppc64le properly +# Fix platform enablement in lvm2 to support ppc64le properly RUN set -e \ && for f in config.guess config.sub; do \ curl -fsSL -o "/usr/local/lvm2/autoconf/$f" "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=$f;hb=HEAD"; \ @@ -69,9 +70,9 @@ RUN cd /usr/local/lvm2 \ --enable-static_link \ && make device-mapper \ && make install_device-mapper -# see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL +# See https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL -# install seccomp: the version shipped in jessie is too old +# Install seccomp: the version shipped in jessie is too old ENV SECCOMP_VERSION 2.3.1 RUN set -x \ && export SECCOMP_PATH="$(mktemp -d)" \ @@ -87,36 +88,33 @@ RUN set -x \ && rm -rf "$SECCOMP_PATH" -## BUILD GOLANG 1.6 +# Install Go +# ppc64le doesn't have official go binaries, so use the version of go installed from the image +# to build go from source. # NOTE: ppc64le has compatibility issues with older versions of go, so make sure the version >= 1.6 -ENV GO_VERSION 1.6.2 +ENV GO_VERSION 1.7.3 ENV GO_DOWNLOAD_URL https://golang.org/dl/go${GO_VERSION}.src.tar.gz -ENV GO_DOWNLOAD_SHA256 787b0b750d037016a30c6ed05a8a70a91b2e9db4bd9b1a2453aa502a63f1bccc -ENV GOROOT_BOOTSTRAP /usr/local - -RUN curl -fsSL "$GO_DOWNLOAD_URL" -o golang.tar.gz \ - && echo "$GO_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \ - && tar -C /usr/src -xzf golang.tar.gz \ - && rm golang.tar.gz \ - && cd /usr/src/go/src && ./make.bash 2>&1 - -ENV GOROOT_BOOTSTRAP /usr/src/ - -ENV PATH /usr/src/go/bin/:/go/bin:$PATH -ENV GOPATH /go:/go/src/github.com/docker/docker/vendor - -# This has been commented out and kept as reference because we don't support compiling with older Go anymore. -# ENV GOFMT_VERSION 1.3.3 -# RUN curl -sSL https://storage.googleapis.com/golang/go${GOFMT_VERSION}.$(go env GOOS)-$(go env GOARCH).tar.gz | tar -C /go/bin -xz --strip-components=2 go/bin/gofmt +RUN set -x \ + && TEMPDIR="$(mktemp -d)" \ + && mv /usr/local/go $TEMPDIR \ + && GOROOT_BOOTSTRAP=$TEMPDIR/go \ + && cd /usr/local \ + && curl -fsSL "$GO_DOWNLOAD_URL" -o golang.tar.gz \ + && tar -C /usr/local -xzf golang.tar.gz \ + && rm golang.tar.gz \ + && cd go/src && ./make.bash 2>&1 \ + && rm -rf $TEMPDIR + +ENV GOROOT_BOOTSTRAP /usr/local/go +ENV PATH /usr/local/go/bin/:$PATH +ENV GOPATH /go + +# Dependency for golint ENV GO_TOOLS_COMMIT 823804e1ae08dbb14eb807afc7db9993bc9e3cc3 -# Grab Go's cover tool for dead-simple code coverage testing -# Grab Go's vet tool for examining go code to find suspicious constructs -# and help prevent errors that the compiler might not catch RUN git clone https://github.com/golang/tools.git /go/src/golang.org/x/tools \ - && (cd /go/src/golang.org/x/tools && git checkout -q $GO_TOOLS_COMMIT) \ - && go install -v golang.org/x/tools/cmd/cover \ - && go install -v golang.org/x/tools/cmd/vet + && (cd /go/src/golang.org/x/tools && git checkout -q $GO_TOOLS_COMMIT) + # Grab Go's lint tool ENV GO_LINT_COMMIT 32a87160691b3c96046c0c678fe57c5bef761456 RUN git clone https://github.com/golang/lint.git /go/src/github.com/golang/lint \ @@ -141,7 +139,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Install notary and notary-server -ENV NOTARY_VERSION v0.3.0 +ENV NOTARY_VERSION v0.4.2 RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/docker/notary.git "$GOPATH/src/github.com/docker/notary" \ @@ -153,7 +151,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Get the "docker-py" source so we can run their integration tests -ENV DOCKER_PY_COMMIT 7befe694bd21e3c54bb1d7825270ea4bd6864c13 +ENV DOCKER_PY_COMMIT e2655f658408f9ad1f62abdef3eb6ed43c0cf324 RUN git clone https://github.com/docker/docker-py.git /docker-py \ && cd /docker-py \ && git checkout -q $DOCKER_PY_COMMIT \ @@ -183,49 +181,12 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ ppc64le/busybox:latest@sha256:38bb82085248d5a3c24bd7a5dc146f2f2c191e189da0441f1c2ca560e3fc6f1b \ ppc64le/debian:jessie@sha256:412845f51b6ab662afba71bc7a716e20fdb9b84f185d180d4c7504f8a75c4f91 \ ppc64le/hello-world:latest@sha256:186a40a9a02ca26df0b6c8acdfb8ac2f3ae6678996a838f977e57fac9d963974 -# see also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) +# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) -# Download man page generator -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone --depth 1 -b v1.0.4 https://github.com/cpuguy83/go-md2man.git "$GOPATH/src/github.com/cpuguy83/go-md2man" \ - && git clone --depth 1 -b v1.4 https://github.com/russross/blackfriday.git "$GOPATH/src/github.com/russross/blackfriday" \ - && go get -v -d github.com/cpuguy83/go-md2man \ - && go build -v -o /usr/local/bin/go-md2man github.com/cpuguy83/go-md2man \ - && rm -rf "$GOPATH" - -# Download toml validator -ENV TOMLV_COMMIT 9baf8a8a9f2ed20a8e54160840c492f937eeaf9a -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/BurntSushi/toml.git "$GOPATH/src/github.com/BurntSushi/toml" \ - && (cd "$GOPATH/src/github.com/BurntSushi/toml" && git checkout -q "$TOMLV_COMMIT") \ - && go build -v -o /usr/local/bin/tomlv github.com/BurntSushi/toml/cmd/tomlv \ - && rm -rf "$GOPATH" - -# Install runc -ENV RUNC_COMMIT d49ece5a83da3dcb820121d6850e2b61bd0a5fbe -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ - && cd "$GOPATH/src/github.com/opencontainers/runc" \ - && git checkout -q "$RUNC_COMMIT" \ - && make static BUILDTAGS="apparmor seccomp selinux" \ - && cp runc /usr/local/bin/docker-runc \ - && rm -rf "$GOPATH" - -# Install containerd -ENV CONTAINERD_COMMIT 57b7c3da915ebe943bd304c00890959b191e5264 -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ - && cd "$GOPATH/src/github.com/docker/containerd" \ - && git checkout -q "$CONTAINERD_COMMIT" \ - && make static \ - && cp bin/containerd /usr/local/bin/docker-containerd \ - && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \ - && cp bin/ctr /usr/local/bin/docker-containerd-ctr \ - && rm -rf "$GOPATH" +# Install tomlv, vndr, runc, containerd, grimes, docker-proxy +# Please edit hack/dockerfile/install-binaries.sh to update them. +COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh +RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy # Wrap all commands in the "docker-in-docker" script to allow nested containers ENTRYPOINT ["hack/dind"] diff --git a/vendor/github.com/docker/docker/Dockerfile.s390x b/vendor/github.com/docker/docker/Dockerfile.s390x index 8784292..1b17daf 100644 --- a/vendor/github.com/docker/docker/Dockerfile.s390x +++ b/vendor/github.com/docker/docker/Dockerfile.s390x @@ -9,7 +9,7 @@ # docker run -v `pwd`:/go/src/github.com/docker/docker --privileged -i -t docker bash # # # Run the test suite: -# docker run --privileged docker hack/make.sh test +# docker run --privileged docker hack/make.sh test-unit test-integration-cli test-docker-py # # Note: AppArmor used to mess with privileged mode, but this is no longer # the case. Therefore, you don't have to disable it anymore. @@ -48,7 +48,16 @@ RUN apt-get update && apt-get install -y \ tar \ --no-install-recommends -# install seccomp: the version shipped in jessie is too old +# glibc in Debian has a bug specific to s390x that won't be fixed until Debian 8.6 is released +# - https://github.com/docker/docker/issues/24748 +# - https://sourceware.org/git/?p=glibc.git;a=commit;h=890b7a4b33d482b5c768ab47d70758b80227e9bc +# - https://sourceware.org/git/?p=glibc.git;a=commit;h=2e807f29595eb5b1e5d0decc6e356a3562ecc58e +RUN echo 'deb http://httpredir.debian.org/debian jessie-proposed-updates main' >> /etc/apt/sources.list.d/pu.list \ + && apt-get update \ + && apt-get install -y libc6 \ + && rm -rf /var/lib/apt/lists/* + +# Install seccomp: the version shipped in jessie is too old ENV SECCOMP_VERSION 2.3.1 RUN set -x \ && export SECCOMP_PATH="$(mktemp -d)" \ @@ -68,9 +77,9 @@ ENV LVM2_VERSION 2.02.103 RUN mkdir -p /usr/local/lvm2 \ && curl -fsSL "https://mirrors.kernel.org/sourceware/lvm2/LVM2.${LVM2_VERSION}.tgz" \ | tar -xzC /usr/local/lvm2 --strip-components=1 -# see https://git.fedorahosted.org/cgit/lvm2.git/refs/tags for release tags +# See https://git.fedorahosted.org/cgit/lvm2.git/refs/tags for release tags -# fix platform enablement in lvm2 to support s390x properly +# Fix platform enablement in lvm2 to support s390x properly RUN set -e \ && for f in config.guess config.sub; do \ curl -fsSL -o "/usr/local/lvm2/autoconf/$f" "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=$f;hb=HEAD"; \ @@ -84,34 +93,26 @@ RUN cd /usr/local/lvm2 \ --enable-static_link \ && make device-mapper \ && make install_device-mapper -# see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL - -# Note: Go comes from the base image (gccgo, specifically) -# We can't compile Go proper because s390x isn't an officially supported architecture yet. +# See https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL -ENV PATH /go/bin:$PATH -ENV GOPATH /go:/go/src/github.com/docker/docker/vendor +ENV GO_VERSION 1.7.3 +RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-s390x.tar.gz" \ + | tar -xzC /usr/local -# This has been commented out and kept as reference because we don't support compiling with older Go anymore. -# ENV GOFMT_VERSION 1.3.3 -# RUN curl -sSL https://storage.googleapis.com/golang/go${GOFMT_VERSION}.$(go env GOOS)-$(go env GOARCH).tar.gz | tar -C /go/bin -xz --strip-components=2 go/bin/gofmt +ENV PATH /go/bin:/usr/local/go/bin:$PATH +ENV GOPATH /go -# TODO update this sha when we upgrade to Go 1.5+ -ENV GO_TOOLS_COMMIT 069d2f3bcb68257b627205f0486d6cc69a231ff9 -# Grab Go's cover tool for dead-simple code coverage testing -# Grab Go's vet tool for examining go code to find suspicious constructs -# and help prevent errors that the compiler might not catch +# Dependency for golint +ENV GO_TOOLS_COMMIT 823804e1ae08dbb14eb807afc7db9993bc9e3cc3 RUN git clone https://github.com/golang/tools.git /go/src/golang.org/x/tools \ - && (cd /go/src/golang.org/x/tools && git checkout -q $GO_TOOLS_COMMIT) \ - && go install -v golang.org/x/tools/cmd/cover \ - && go install -v golang.org/x/tools/cmd/vet + && (cd /go/src/golang.org/x/tools && git checkout -q $GO_TOOLS_COMMIT) + # Grab Go's lint tool -ENV GO_LINT_COMMIT f42f5c1c440621302702cb0741e9d2ca547ae80f +ENV GO_LINT_COMMIT 32a87160691b3c96046c0c678fe57c5bef761456 RUN git clone https://github.com/golang/lint.git /go/src/github.com/golang/lint \ && (cd /go/src/github.com/golang/lint && git checkout -q $GO_LINT_COMMIT) \ && go install -v github.com/golang/lint/golint - # Install two versions of the registry. The first is an older version that # only supports schema1 manifests. The second is a newer version that supports # both. This allows integration-cli tests to cover push/pull with both schema1 @@ -130,15 +131,11 @@ RUN set -x \ && rm -rf "$GOPATH" # Install notary and notary-server -# -# Note: We have to explicitly set GO15VENDOREXPERIMENT=0 because gccgo does not -# support vendoring: https://github.com/golang/go/issues/15628 -ENV NOTARY_VERSION v0.3.0 +ENV NOTARY_VERSION v0.4.2 RUN set -x \ - && export GO15VENDOREXPERIMENT=0 \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/docker/notary.git "$GOPATH/src/github.com/docker/notary" \ - && (cd "$GOPATH/src/github.com/docker/notary" && git checkout -q "$NOTARY_VERSION" && ln -s . vendor/src) \ + && (cd "$GOPATH/src/github.com/docker/notary" && git checkout -q "$NOTARY_VERSION") \ && GOPATH="$GOPATH/src/github.com/docker/notary/vendor:$GOPATH" \ go build -o /usr/local/bin/notary-server github.com/docker/notary/cmd/notary-server \ && GOPATH="$GOPATH/src/github.com/docker/notary/vendor:$GOPATH" \ @@ -146,7 +143,7 @@ RUN set -x \ && rm -rf "$GOPATH" # Get the "docker-py" source so we can run their integration tests -ENV DOCKER_PY_COMMIT 7befe694bd21e3c54bb1d7825270ea4bd6864c13 +ENV DOCKER_PY_COMMIT e2655f658408f9ad1f62abdef3eb6ed43c0cf324 RUN git clone https://github.com/docker/docker-py.git /docker-py \ && cd /docker-py \ && git checkout -q $DOCKER_PY_COMMIT \ @@ -161,7 +158,7 @@ RUN useradd --create-home --gid docker unprivilegeduser VOLUME /var/lib/docker WORKDIR /go/src/github.com/docker/docker -ENV DOCKER_BUILDTAGS apparmor selinux +ENV DOCKER_BUILDTAGS apparmor selinux seccomp # Let us use a .bashrc file RUN ln -sfv $PWD/.bashrc ~/.bashrc @@ -176,49 +173,12 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ s390x/busybox:latest@sha256:dd61522c983884a66ed72d60301925889028c6d2d5e0220a8fe1d9b4c6a4f01b \ s390x/debian:jessie@sha256:b74c863400909eff3c5e196cac9bfd1f6333ce47aae6a38398d87d5875da170a \ s390x/hello-world:latest@sha256:780d80b3a7677c3788c0d5cd9168281320c8d4a6d9183892d8ee5cdd610f5699 -# see also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) - -# Download man page generator -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone --depth 1 -b v1.0.4 https://github.com/cpuguy83/go-md2man.git "$GOPATH/src/github.com/cpuguy83/go-md2man" \ - && git clone --depth 1 -b v1.4 https://github.com/russross/blackfriday.git "$GOPATH/src/github.com/russross/blackfriday" \ - && go get -v -d github.com/cpuguy83/go-md2man \ - && go build -v -o /usr/local/bin/go-md2man github.com/cpuguy83/go-md2man \ - && rm -rf "$GOPATH" - -# Download toml validator -ENV TOMLV_COMMIT 9baf8a8a9f2ed20a8e54160840c492f937eeaf9a -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/BurntSushi/toml.git "$GOPATH/src/github.com/BurntSushi/toml" \ - && (cd "$GOPATH/src/github.com/BurntSushi/toml" && git checkout -q "$TOMLV_COMMIT") \ - && go build -v -o /usr/local/bin/tomlv github.com/BurntSushi/toml/cmd/tomlv \ - && rm -rf "$GOPATH" - -# Install runc -ENV RUNC_COMMIT d49ece5a83da3dcb820121d6850e2b61bd0a5fbe -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ - && cd "$GOPATH/src/github.com/opencontainers/runc" \ - && git checkout -q "$RUNC_COMMIT" \ - && make static BUILDTAGS="seccomp apparmor selinux" \ - && cp runc /usr/local/bin/docker-runc \ - && rm -rf "$GOPATH" +# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) -# Install containerd -ENV CONTAINERD_COMMIT 57b7c3da915ebe943bd304c00890959b191e5264 -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ - && cd "$GOPATH/src/github.com/docker/containerd" \ - && git checkout -q "$CONTAINERD_COMMIT" \ - && make static \ - && cp bin/containerd /usr/local/bin/docker-containerd \ - && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \ - && cp bin/ctr /usr/local/bin/docker-containerd-ctr \ - && rm -rf "$GOPATH" +# Install tomlv, vndr, runc, containerd, grimes, docker-proxy +# Please edit hack/dockerfile/install-binaries.sh to update them. +COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh +RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy # Wrap all commands in the "docker-in-docker" script to allow nested containers ENTRYPOINT ["hack/dind"] diff --git a/vendor/github.com/docker/docker/Dockerfile.simple b/vendor/github.com/docker/docker/Dockerfile.simple index 61f6a1b..ed3042c 100644 --- a/vendor/github.com/docker/docker/Dockerfile.simple +++ b/vendor/github.com/docker/docker/Dockerfile.simple @@ -7,7 +7,7 @@ FROM debian:jessie -# compile and runtime deps +# Compile and runtime deps # https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies # https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -30,7 +30,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ aufs-tools \ && rm -rf /var/lib/apt/lists/* -# install seccomp: the version shipped in trusty is too old +# Install seccomp: the version shipped in trusty is too old ENV SECCOMP_VERSION 2.3.1 RUN set -x \ && export SECCOMP_PATH="$(mktemp -d)" \ @@ -49,36 +49,17 @@ RUN set -x \ # IMPORTANT: If the version of Go is updated, the Windows to Linux CI machines # will need updating, to avoid errors. Ping #docker-maintainers on IRC # with a heads-up. -ENV GO_VERSION 1.6.2 -RUN curl -fsSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" \ +ENV GO_VERSION 1.7.3 +RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" \ | tar -xzC /usr/local ENV PATH /go/bin:/usr/local/go/bin:$PATH -ENV GOPATH /go:/go/src/github.com/docker/docker/vendor +ENV GOPATH /go ENV CGO_LDFLAGS -L/lib -# Install runc -ENV RUNC_COMMIT d49ece5a83da3dcb820121d6850e2b61bd0a5fbe -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ - && cd "$GOPATH/src/github.com/opencontainers/runc" \ - && git checkout -q "$RUNC_COMMIT" \ - && make static BUILDTAGS="seccomp apparmor selinux" \ - && cp runc /usr/local/bin/docker-runc \ - && rm -rf "$GOPATH" - -# Install containerd -ENV CONTAINERD_COMMIT 57b7c3da915ebe943bd304c00890959b191e5264 -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ - && cd "$GOPATH/src/github.com/docker/containerd" \ - && git checkout -q "$CONTAINERD_COMMIT" \ - && make static \ - && cp bin/containerd /usr/local/bin/docker-containerd \ - && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \ - && cp bin/ctr /usr/local/bin/docker-containerd-ctr \ - && rm -rf "$GOPATH" +# Install runc, containerd, grimes and docker-proxy +# Please edit hack/dockerfile/install-binaries.sh to update them. +COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh +RUN /tmp/install-binaries.sh runc containerd grimes proxy ENV AUTO_GOPATH 1 WORKDIR /usr/src/docker diff --git a/vendor/github.com/docker/docker/Dockerfile.windows b/vendor/github.com/docker/docker/Dockerfile.windows index 196f902..c4f3c9b 100644 --- a/vendor/github.com/docker/docker/Dockerfile.windows +++ b/vendor/github.com/docker/docker/Dockerfile.windows @@ -1,89 +1,179 @@ -# This file describes the standard way to build Docker, using a docker container on Windows -# Server 2016 +# escape=` + +# ----------------------------------------------------------------------------------------- +# This file describes the standard way to build Docker in a container on Windows +# Server 2016 or Windows 10. +# +# Maintainer: @jhowardmsft +# ----------------------------------------------------------------------------------------- + + +# Prerequisites: +# -------------- +# +# 1. Windows 10 or Windows Server 2016 with all Windows updates applied. Pre-release +# versions of Windows are not supported (eg Windows Server 2016 TP5). The build +# number must be at least 14393. This can be confirmed, for example, by running +# the following from an elevated PowerShell prompt - this sample output is from a +# fully up to date machine as at late October 2016: # +# >> PS C:\> $(gin).WindowsBuildLabEx +# >> 14393.321.amd64fre.rs1_release_inmarket.161004-2338 +# +# 2. Git for Windows (or another git client) must be installed. https://git-scm.com/download/win. +# +# 3. The machine must be configured to run containers. For example, by following +# the quick start guidance at https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start or +# https://github.com/docker/labs/blob/master/windows/windows-containers/Setup.md + + +# ----------------------------------------------------------------------------------------- + + # Usage: +# ----- +# +# The following steps should be run from an (elevated*) Windows PowerShell prompt. +# +# (*In a default installation of containers on Windows following the quick-start guidance at +# https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start, +# the docker.exe client must run elevated to be able to connect to the daemon). +# +# 1. Clone the sources from github.com: +# +# >> git clone https://github.com/docker/docker.git C:\go\src\github.com\docker\docker +# >> Cloning into 'C:\go\src\github.com\docker\docker'... +# >> remote: Counting objects: 186216, done. +# >> remote: Compressing objects: 100% (21/21), done. +# >> remote: Total 186216 (delta 5), reused 0 (delta 0), pack-reused 186195 +# >> Receiving objects: 100% (186216/186216), 104.32 MiB | 8.18 MiB/s, done. +# >> Resolving deltas: 100% (123139/123139), done. +# >> Checking connectivity... done. +# >> Checking out files: 100% (3912/3912), done. +# >> PS C:\> +# +# +# 2. Change directory to the cloned docker sources: +# +# >> cd C:\go\src\github.com\docker\docker # -# # Assemble the full dev environment. This is slow the first time. Run this from -# # a directory containing the sources you are validating. For example from -# # c:\go\src\github.com\docker\docker # -# docker build -t docker -f Dockerfile.windows . +# 3. Build a docker image with the components required to build the docker binaries from source: # +# >> docker build -t nativebuildimage -f Dockerfile.windows . # -# # Build docker in a container. Run the following from a Windows cmd command prommpt, -# # replacing c:\built with the directory you want the binaries to be placed on the -# # host system. # -# docker run --rm -v "c:\built:c:\target" docker sh -c 'cd /c/go/src/github.com/docker/docker; hack/make.sh binary; ec=$?; if [ $ec -eq 0 ]; then robocopy /c/go/src/github.com/docker/docker/bundles/$(cat VERSION)/binary /c/target/binary; fi; exit $ec' +# 4. Build the docker executable binaries in a container: # +# >> docker run --name binaries nativebuildimage sh -c 'cd /c/go/src/github.com/docker/docker; hack/make.sh binary' +# +# +# 5. Copy the binaries out of the above container, replacing HostPath with an appropriate destination +# folder on the host system where you want the binaries to be located. +# +# >> $v=$(Get-Content ".\VERSION" -raw).ToString().Replace("`n","").Trim() +# >> docker cp binaries:C:\go\src\github.com\docker\docker\bundles\$v\binary-client\docker-$v.exe C:\HostPath\docker.exe +# >> docker cp binaries:C:\go\src\github.com\docker\docker\bundles\$v\binary-daemon\dockerd.exe C:\HostPath\dockerd.exe +# >> docker cp binaries:C:\go\src\github.com\docker\docker\bundles\$v\binary-daemon\docker-proxy-$v.exe C:\HostPath\docker-proxy.exe +# +# +# 6. (Optional) Remove the interim container holding the built executable binaries: +# +# >> docker rm binaries +# +# +# 7. (Optional) Remove the image used for the container in which the executable +# binaries are build. Tip - it may be useful to keep this image around if you need to +# build multiple times. Then you can take advantage of the builder cache to have an +# image which has all the components required to build the binaries already installed. +# +# >> docker rmi nativebuildimage + + +# ----------------------------------------------------------------------------------------- + + # Important notes: # --------------- # -# The posix utilities from GIT aren't usable interactively as at January 2016. This +# The posix utilities from git aren't usable interactively as at October 2016. This # is because they require a console window which isn't present in a container in Windows. -# See the example at the top of this file. Do NOT use -it in that docker run!!! +# See the example at the top of this file. Do NOT use -it in that docker run. It will not work. +# +# Don't attempt to use a volume for passing the source through to the container. The posix utilities will +# balk at reparse points. # -# Don't try to use a volume for passing the source through. The posix utilities will -# balk at reparse points. Again, see the example at the top of this file on how use a volume -# to get the built binary out of the container. +# The downloaded files are not cleared from the image. go.zip is used by the Windows +# CI servers to ensure the host and image are running consistent versions of go. # -# The steps are minimised dramatically to improve performance +# The GIT installer isn't very good at unattended install. We use techniques described +# at the links below to force it to set the path and other options accordingly. +# >> http://superuser.com/questions/944576/git-for-windows-silent-install-silent-arguments +# and follow through to installer at +# >> https://github.com/ferventcoder/chocolatey-packages/blob/master/automatic/git.install/tools/chocolateyInstall.ps1 -FROM windowsservercore + +# ----------------------------------------------------------------------------------------- + +# The number of build steps below are explicitly minimised to improve performance. +FROM microsoft/windowsservercore + +# Use PowerShell as the default shell +SHELL ["powershell", "-command"] # Environment variable notes: -# - GO_VERSION must consistent with 'Dockerfile' used by Linux'. +# - GO_VERSION must be consistent with 'Dockerfile' used by Linux. # - FROM_DOCKERFILE is used for detection of building within a container. -ENV GO_VERSION=1.6.2 \ - GIT_LOCATION=https://github.com/git-for-windows/git/releases/download/v2.7.2.windows.1/Git-2.7.2-64-bit.exe \ - GOPATH=C:/go;C:/go/src/github.com/docker/docker/vendor \ +ENV GO_VERSION=1.7.3 ` + GIT_LOCATION=https://github.com/git-for-windows/git/releases/download/v2.10.1.windows.1/Git-2.10.1-64-bit.exe ` + GOPATH=C:\go ` FROM_DOCKERFILE=1 -WORKDIR c:/ - -# Everything downloaded/installed in one go (better performance, esp on TP4) -RUN \ - setx /M Path "c:\git\cmd;c:\git\bin;c:\git\usr\bin;%Path%;c:\gcc\bin;c:\go\bin" && \ - setx GOROOT "c:\go" && \ - powershell -command \ - $ErrorActionPreference = 'Stop'; \ - Function Download-File([string] $source, [string] $target) { \ - $wc = New-Object net.webclient; $wc.Downloadfile($source, $target) \ - } \ - \ - Write-Host INFO: Downloading git...; \ - Download-File %GIT_LOCATION% gitsetup.exe; \ - \ - Write-Host INFO: Downloading go...; \ - Download-File https://storage.googleapis.com/golang/go%GO_VERSION%.windows-amd64.msi go.msi; \ - \ - Write-Host INFO: Downloading compiler 1 of 3...; \ - Download-File https://raw.githubusercontent.com/jhowardmsft/docker-tdmgcc/master/gcc.zip gcc.zip; \ - \ - Write-Host INFO: Downloading compiler 2 of 3...; \ - Download-File https://raw.githubusercontent.com/jhowardmsft/docker-tdmgcc/master/runtime.zip runtime.zip; \ - \ - Write-Host INFO: Downloading compiler 3 of 3...; \ - Download-File https://raw.githubusercontent.com/jhowardmsft/docker-tdmgcc/master/binutils.zip binutils.zip; \ - \ - Write-Host INFO: Installing git...; \ - Start-Process gitsetup.exe -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /CLOSEAPPLICATIONS /DIR=c:\git\' -Wait; \ - \ - Write-Host INFO: Installing go..."; \ - Start-Process msiexec -ArgumentList '-i go.msi -quiet' -Wait; \ - \ - Write-Host INFO: Unzipping compiler...; \ - c:\git\usr\bin\unzip.exe -q -o gcc.zip -d /c/gcc; \ - c:\git\usr\bin\unzip.exe -q -o runtime.zip -d /c/gcc; \ - c:\git\usr\bin\unzip.exe -q -o binutils.zip -d /c/gcc"; \ - \ - Write-Host INFO: Removing interim files; \ - Remove-Item *.zip; \ - Remove-Item go.msi; \ - Remove-Item gitsetup.exe; \ - \ +WORKDIR C:\ + +RUN ` + setx /M Path $($Env:PATH+';C:\gcc\bin;C:\go\bin'); ` + ` + $ErrorActionPreference = 'Stop'; ` + Function Download-File([string] $source, [string] $target) { ` + $wc = New-Object net.webclient; $wc.Downloadfile($source, $target) ` + } ` + ` + Write-Host INFO: Downloading git...; ` + Download-File $Env:GIT_LOCATION gitsetup.exe; ` + ` + Write-Host INFO: Downloading go...; ` + Download-File $('https://golang.org/dl/go'+$Env:GO_VERSION+'.windows-amd64.zip') go.zip; ` + ` + Write-Host INFO: Downloading compiler 1 of 3...; ` + Download-File https://raw.githubusercontent.com/jhowardmsft/docker-tdmgcc/master/gcc.zip gcc.zip; ` + ` + Write-Host INFO: Downloading compiler 2 of 3...; ` + Download-File https://raw.githubusercontent.com/jhowardmsft/docker-tdmgcc/master/runtime.zip runtime.zip; ` + ` + Write-Host INFO: Downloading compiler 3 of 3...; ` + Download-File https://raw.githubusercontent.com/jhowardmsft/docker-tdmgcc/master/binutils.zip binutils.zip; ` + ` + Write-Host INFO: Installing git...; ` + $installPath = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall'; ` + $installItem = 'Git_is1'; ` + New-Item -Path $installPath -Name $installItem -Force; ` + $installKey = $installPath+'\'+$installItem; ` + New-ItemProperty $installKey -Name 'Inno Setup CodeFile: Path Option' -Value 'CmdTools' -PropertyType 'String' -Force; ` + New-ItemProperty $installKey -Name 'Inno Setup CodeFile: Bash Terminal Option' -Value 'ConHost' -PropertyType 'String' -Force; ` + New-ItemProperty $installKey -Name 'Inno Setup CodeFile: CRLF Option' -Value 'CRLFCommitAsIs' -PropertyType 'String' -Force; ` + Start-Process gitsetup.exe -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /CLOSEAPPLICATIONS /DIR=C:\git\' -Wait; ` + ` + Write-Host INFO: Expanding go...; ` + Expand-Archive C:\go.zip -DestinationPath C:\; ` + ` + Write-Host INFO: Expanding compiler...; ` + Expand-Archive C:\gcc.zip -DestinationPath C:\gcc -Force; ` + Expand-Archive C:\runtime.zip -DestinationPath C:\gcc -Force; ` + Expand-Archive C:\binutils.zip -DestinationPath C:\gcc -Force; ` + ` Write-Host INFO: Completed # Prepare for building -COPY . /go/src/github.com/docker/docker +COPY . C:\go\src\github.com\docker\docker diff --git a/vendor/github.com/docker/docker/MAINTAINERS b/vendor/github.com/docker/docker/MAINTAINERS index d3fcbfe..39bb8c1 100644 --- a/vendor/github.com/docker/docker/MAINTAINERS +++ b/vendor/github.com/docker/docker/MAINTAINERS @@ -27,10 +27,13 @@ people = [ "aaronlehmann", - "calavera", + "akihirosuda", + "aluzzardi", + "anusha", "coolljt0725", "cpuguy83", "crosbymichael", + "dnephin", "duglin", "estesp", "icecrime", @@ -39,12 +42,16 @@ "lk4d4", "mavenugo", "mhbauer", + "mlaventure", + "mrjana", "runcom", + "stevvooe", "tianon", "tibor", "tonistiigi", "unclejack", - "vdemeester" + "vdemeester", + "vieux" ] [Org."Docs maintainers"] @@ -53,7 +60,7 @@ people = [ "jamtur01", - "moxiegirl", + "misty", "sven", "thajeztah" ] @@ -71,6 +78,10 @@ # - close an issue or pull request when it's inappropriate or off-topic people = [ + "aboch", + "andrewhsu", + "ehazlett", + "mgoelzer", "programmerq", "thajeztah" ] @@ -82,6 +93,15 @@ # Thank you! people = [ + # David Calavera contributed many features to Docker, such as an improved + # event system, dynamic configuration reloading, volume plugins, fancy + # new templating options, and an external client credential store. As a + # maintainer, David was release captain for Docker 1.8, and competing + # with Jess Frazelle to be "top dream killer". + # David is now doing amazing stuff as CTO for https://www.netlify.com, + # and tweets as @calavera. + "calavera", + # As a maintainer, Erik was responsible for the "builder", and # started the first designs for the new networking model in # Docker. Erik is now working on all kinds of plugins for Docker @@ -96,7 +116,7 @@ # expressions (coz, YOLO!) on July 10, 2014 # https://github.com/docker/docker/pull/6950/commits/f3a68ffa390fb851115c77783fa4031f1d3b2995. # Jess was Release Captain for Docker 1.4, 1.6 and 1.7, and contributed - # many features and improvement, among which "seccomp profiles" (making + # many features and improvement, among which "seccomp profiles" (making # containers a lot more secure). Besides being a maintainer, she # set up the CI infrastructure for the project, giving everyone # something to shout at if a PR failed ("noooo Janky!"). @@ -104,11 +124,20 @@ # and contributing to various open source projects. # Be sure you don't miss her talks at a conference near you (a must-see), # read her blog at https://blog.jessfraz.com (a must-read), and - # check out her open source projects on GitHub https://github.com/jfrazelle (a must-try). - "jfrazelle", + # check out her open source projects on GitHub https://github.com/jessfraz (a must-try). + "jessfraz", + + # As a docs maintainer, Mary Anthony contributed greatly to the Docker + # docs. She wrote the Docker Contributor Guide and Getting Started + # Guides. She helped create a doc build system independent of + # docker/docker project, and implemented a new docs.docker.com theme and + # nav for 2015 Dockercon. Fun fact: the most inherited layer in DockerHub + # public repositories was originally referenced in + # maryatdocker/docker-whale back in May 2015. + "moxiegirl", # Vincent "vbatts!" Batts made his first contribution to the project - # in November 2013, to become a maintainer a few months later, on + # in November 2013, to become a maintainer a few months later, on # May 10, 2014 (https://github.com/docker/docker/commit/d6e666a87a01a5634c250358a94c814bf26cb778). # As a maintainer, Vincent made important contributions to core elements # of Docker, such as "distribution" (tarsum) and graphdrivers (btrfs, devicemapper). @@ -121,15 +150,6 @@ # for a chat, as he's always a lot of fun. "vbatts", - # Victor is one of the earliest contributors to Docker, having worked on the - # project when it was still "dotCloud" in April 2013. He's been responsible - # for multiple releases (https://github.com/docker/docker/pulls?q=is%3Apr+bump+in%3Atitle+author%3Avieux), - # and up until today (2015), our number 2 contributor. Although he's no longer - # a maintainer for the Docker "Engine", he's still actively involved in other - # Docker projects, and most likely can be found in the Docker Swarm repository, - # for which he's a core maintainer. - "vieux", - # Vishnu became a maintainer to help out on the daemon codebase and # libcontainer integration. He's currently involved in the # Open Containers Initiative, working on the specifications, @@ -150,6 +170,31 @@ Email = "aaron.lehmann@docker.com" GitHub = "aaronlehmann" + [people.aboch] + Name = "Alessandro Boch" + Email = "aboch@docker.com" + GitHub = "aboch" + + [people.akihirosuda] + Name = "Akihiro Suda" + Email = "suda.akihiro@lab.ntt.co.jp" + GitHub = "AkihiroSuda" + + [people.aluzzardi] + Name = "Andrea Luzzardi" + Email = "al@docker.com" + GitHub = "aluzzardi" + + [people.andrewhsu] + Name = "Andrew Hsu" + Email = "andrewhsu@docker.com" + GitHub = "andrewhsu" + + [people.anusha] + Name = "Anusha Ragunathan" + Email = "anusha@docker.com" + GitHub = "anusha-ragunathan" + [people.calavera] Name = "David Calavera" Email = "david.calavera@gmail.com" @@ -170,11 +215,21 @@ Email = "crosbymichael@gmail.com" GitHub = "crosbymichael" + [people.dnephin] + Name = "Daniel Nephin" + Email = "dnephin@gmail.com" + GitHub = "dnephin" + [people.duglin] Name = "Doug Davis" Email = "dug@us.ibm.com" GitHub = "duglin" + [people.ehazlett] + Name = "Evan Hazlett" + Email = "ejhazlett@gmail.com" + GitHub = "ehazlett" + [people.erikh] Name = "Erik Hollensbe" Email = "erik@docker.com" @@ -200,10 +255,10 @@ Email = "jhoward@microsoft.com" GitHub = "jhowardmsft" - [people.jfrazelle] + [people.jessfraz] Name = "Jessie Frazelle" Email = "jess@linux.com" - GitHub = "jfrazelle" + GitHub = "jessfraz" [people.justincormack] Name = "Justin Cormack" @@ -220,16 +275,36 @@ Email = "madhu@docker.com" GitHub = "mavenugo" + [people.mgoelzer] + Name = "Mike Goelzer" + Email = "mike.goelzer@docker.com" + GitHub = "mgoelzer" + [people.mhbauer] Name = "Morgan Bauer" Email = "mbauer@us.ibm.com" GitHub = "mhbauer" + [people.misty] + Name = "Misty Stanley-Jones" + Email = "misty@docker.com" + GitHub = "mstanleyjones" + + [people.mlaventure] + Name = "Kenfe-Mickaël Laventure" + Email = "mickael.laventure@docker.com" + GitHub = "mlaventure" + [people.moxiegirl] Name = "Mary Anthony" Email = "mary.anthony@docker.com" GitHub = "moxiegirl" + [people.mrjana] + Name = "Jana Radhakrishnan" + Email = "mrjana@docker.com" + GitHub = "mrjana" + [people.programmerq] Name = "Jeff Anderson" Email = "jeff@docker.com" @@ -245,6 +320,11 @@ Email = "solomon@docker.com" GitHub = "shykes" + [people.stevvooe] + Name = "Stephen Day" + Email = "stephen.day@docker.com" + GitHub = "stevvooe" + [people.sven] Name = "Sven Dowideit" Email = "SvenDowideit@home.org.au" diff --git a/vendor/github.com/docker/docker/Makefile b/vendor/github.com/docker/docker/Makefile index 343c065..31d1fa4 100644 --- a/vendor/github.com/docker/docker/Makefile +++ b/vendor/github.com/docker/docker/Makefile @@ -1,4 +1,4 @@ -.PHONY: all binary build build-gccgo cross default docs docs-build docs-shell shell gccgo test test-docker-py test-integration-cli test-unit validate help +.PHONY: all binary build cross deb help init-go-pkg-cache install manpages rpm run shell test test-docker-py test-integration-cli test-unit tgz validate win # set the graph driver as the current graphdriver if not set DOCKER_GRAPHDRIVER := $(if $(DOCKER_GRAPHDRIVER),$(DOCKER_GRAPHDRIVER),$(shell docker info 2>&1 | grep "Storage Driver" | sed 's/.*: //')) @@ -9,10 +9,12 @@ DOCKERFILE := $(shell bash -c 'source hack/make/.detect-daemon-osarch && echo $$ # env vars passed through directly to Docker's build scripts # to allow things like `make KEEPBUNDLE=1 binary` easily -# `docs/sources/contributing/devenvironment.md ` and `project/PACKAGERS.md` have some limited documentation of some of these +# `project/PACKAGERS.md` have some limited documentation of some of these DOCKER_ENVS := \ + -e BUILD_APT_MIRROR \ -e BUILDFLAGS \ -e KEEPBUNDLE \ + -e DOCKER_BUILD_ARGS \ -e DOCKER_BUILD_GOGC \ -e DOCKER_BUILD_PKGS \ -e DOCKER_DEBUG \ @@ -20,12 +22,19 @@ DOCKER_ENVS := \ -e DOCKER_GITCOMMIT \ -e DOCKER_GRAPHDRIVER=$(DOCKER_GRAPHDRIVER) \ -e DOCKER_INCREMENTAL_BINARY \ + -e DOCKER_PORT \ -e DOCKER_REMAP_ROOT \ -e DOCKER_STORAGE_OPTS \ -e DOCKER_USERLANDPROXY \ -e TESTDIRS \ -e TESTFLAGS \ - -e TIMEOUT + -e TIMEOUT \ + -e HTTP_PROXY \ + -e HTTPS_PROXY \ + -e NO_PROXY \ + -e http_proxy \ + -e https_proxy \ + -e no_proxy # note: we _cannot_ add "-e DOCKER_BUILDTAGS" here because even if it's unset in the shell, that would shadow the "ENV DOCKER_BUILDTAGS" set in our Dockerfile, which is very important for our official builds # to allow `make BIND_DIR=. shell` or `make BIND_DIR= test` @@ -37,14 +46,21 @@ DOCKER_MOUNT := $(if $(BIND_DIR),-v "$(CURDIR)/$(BIND_DIR):/go/src/github.com/do # This allows the test suite to be able to run without worrying about the underlying fs used by the container running the daemon (e.g. aufs-on-aufs), so long as the host running the container is running a supported fs. # The volume will be cleaned up when the container is removed due to `--rm`. # Note that `BIND_DIR` will already be set to `bundles` if `DOCKER_HOST` is not set (see above BIND_DIR line), in such case this will do nothing since `DOCKER_MOUNT` will already be set. -DOCKER_MOUNT := $(if $(DOCKER_MOUNT),$(DOCKER_MOUNT),-v "/go/src/github.com/docker/docker/bundles") +DOCKER_MOUNT := $(if $(DOCKER_MOUNT),$(DOCKER_MOUNT),-v /go/src/github.com/docker/docker/bundles) + +# enable .go-pkg-cache if DOCKER_INCREMENTAL_BINARY and DOCKER_MOUNT (i.e.DOCKER_HOST) are set +PKGCACHE_DIR := $(if $(PKGCACHE_DIR),$(PKGCACHE_DIR),.go-pkg-cache) +PKGCACHE_MAP := gopath:/go/pkg goroot-linux_amd64_netgo:/usr/local/go/pkg/linux_amd64_netgo +DOCKER_MOUNT := $(if $(DOCKER_INCREMENTAL_BINARY),$(DOCKER_MOUNT) $(shell echo $(PKGCACHE_MAP) | sed -E 's@([^ ]*)@-v "$(CURDIR)/$(PKGCACHE_DIR)/\1"@g'),$(DOCKER_MOUNT)) GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null) GIT_BRANCH_CLEAN := $(shell echo $(GIT_BRANCH) | sed -e "s/[^[:alnum:]]/-/g") DOCKER_IMAGE := docker-dev$(if $(GIT_BRANCH_CLEAN),:$(GIT_BRANCH_CLEAN)) -DOCKER_DOCS_IMAGE := docker-docs$(if $(GIT_BRANCH_CLEAN),:$(GIT_BRANCH_CLEAN)) +DOCKER_PORT_FORWARD := $(if $(DOCKER_PORT),-p "$(DOCKER_PORT)",) -DOCKER_FLAGS := docker run --rm -i --privileged $(DOCKER_ENVS) $(DOCKER_MOUNT) +DOCKER_FLAGS := docker run --rm -i --privileged $(DOCKER_ENVS) $(DOCKER_MOUNT) $(DOCKER_PORT_FORWARD) +BUILD_APT_MIRROR := $(if $(DOCKER_BUILD_APT_MIRROR),--build-arg APT_MIRROR=$(DOCKER_BUILD_APT_MIRROR)) +export BUILD_APT_MIRROR # if this session isn't interactive, then we don't want to allocate a # TTY, which would fail, but if it is interactive, we do want to attach @@ -59,16 +75,13 @@ DOCKER_RUN_DOCKER := $(DOCKER_FLAGS) "$(DOCKER_IMAGE)" default: binary all: build ## validate all checks, build linux binaries, run all tests\ncross build non-linux binaries and generate archives - $(DOCKER_RUN_DOCKER) hack/make.sh + $(DOCKER_RUN_DOCKER) bash -c 'hack/validate/default && hack/make.sh' binary: build ## build the linux binaries $(DOCKER_RUN_DOCKER) hack/make.sh binary -build: bundles - docker build ${DOCKER_BUILD_ARGS} -t "$(DOCKER_IMAGE)" -f "$(DOCKERFILE)" . - -build-gccgo: bundles - docker build ${DOCKER_BUILD_ARGS} -t "$(DOCKER_IMAGE)-gccgo" -f Dockerfile.gccgo . +build: bundles init-go-pkg-cache + docker build ${BUILD_APT_MIRROR} ${DOCKER_BUILD_ARGS} -t "$(DOCKER_IMAGE)" -f "$(DOCKERFILE)" . bundles: mkdir bundles @@ -76,27 +89,31 @@ bundles: cross: build ## cross build the binaries for darwin, freebsd and\nwindows $(DOCKER_RUN_DOCKER) hack/make.sh dynbinary binary cross -win: build ## cross build the binary for windows - $(DOCKER_RUN_DOCKER) hack/make.sh win - -tgz: build ## build the archives (.zip on windows and .tgz\notherwise) containing the binaries - $(DOCKER_RUN_DOCKER) hack/make.sh dynbinary binary cross tgz - deb: build ## build the deb packages $(DOCKER_RUN_DOCKER) hack/make.sh dynbinary build-deb -docs: ## build the docs - $(MAKE) -C docs docs -gccgo: build-gccgo ## build the gcc-go linux binaries - $(DOCKER_FLAGS) "$(DOCKER_IMAGE)-gccgo" hack/make.sh gccgo +help: ## this help + @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) + +init-go-pkg-cache: + mkdir -p $(shell echo $(PKGCACHE_MAP) | sed -E 's@([^: ]*):[^ ]*@$(PKGCACHE_DIR)/\1@g') install: ## install the linux binaries KEEPBUNDLE=1 hack/make.sh install-binary +manpages: ## Generate man pages from go source and markdown + docker build -t docker-manpage-dev -f "man/$(DOCKERFILE)" ./man + docker run --rm \ + -v $(PWD):/go/src/github.com/docker/docker/ \ + docker-manpage-dev + rpm: build ## build the rpm packages $(DOCKER_RUN_DOCKER) hack/make.sh dynbinary build-rpm +run: build ## run the docker daemon in a container + $(DOCKER_RUN_DOCKER) sh -c "KEEPBUNDLE=1 hack/make.sh install-binary run" + shell: build ## start a shell inside the build env $(DOCKER_RUN_DOCKER) bash @@ -107,14 +124,24 @@ test-docker-py: build ## run the docker-py tests $(DOCKER_RUN_DOCKER) hack/make.sh dynbinary test-docker-py test-integration-cli: build ## run the integration tests - $(DOCKER_RUN_DOCKER) hack/make.sh dynbinary test-integration-cli + $(DOCKER_RUN_DOCKER) hack/make.sh build-integration-test-binary dynbinary test-integration-cli test-unit: build ## run the unit tests $(DOCKER_RUN_DOCKER) hack/make.sh test-unit -validate: build ## validate DCO, Seccomp profile generation, gofmt,\n./pkg/ isolation, golint, tests, tomls, go vet and vendor - $(DOCKER_RUN_DOCKER) hack/make.sh validate-dco validate-default-seccomp validate-gofmt validate-pkg validate-lint validate-test validate-toml validate-vet validate-vendor +tgz: build ## build the archives (.zip on windows and .tgz\notherwise) containing the binaries + $(DOCKER_RUN_DOCKER) hack/make.sh dynbinary binary cross tgz + +validate: build ## validate DCO, Seccomp profile generation, gofmt,\n./pkg/ isolation, golint, tests, tomls, go vet and vendor + $(DOCKER_RUN_DOCKER) hack/validate/all -help: ## this help - @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) +win: build ## cross build the binary for windows + $(DOCKER_RUN_DOCKER) hack/make.sh win +.PHONY: swagger-gen +swagger-gen: + docker run --rm -v $(PWD):/go/src/github.com/docker/docker \ + -w /go/src/github.com/docker/docker \ + --entrypoint hack/generate-swagger-api.sh \ + -e GOPATH=/go \ + quay.io/goswagger/swagger diff --git a/vendor/github.com/docker/docker/README.md b/vendor/github.com/docker/docker/README.md index c453044..0b33bdc 100644 --- a/vendor/github.com/docker/docker/README.md +++ b/vendor/github.com/docker/docker/README.md @@ -24,7 +24,7 @@ of thousands of applications and databases. Security is very important to us. If you have any issue regarding security, please disclose the information responsibly by sending an email to -security@docker.com and not by creating a github issue. +security@docker.com and not by creating a GitHub issue. ## Better than VMs @@ -175,7 +175,7 @@ Under the hood, Docker is built on the following components: Contributing to Docker [![GoDoc](https://godoc.org/github.com/docker/docker?status.svg)](https://godoc.org/github.com/docker/docker) ====================== -| **Master** (Linux) | **Experimental** (linux) | **Windows** | **FreeBSD** | +| **Master** (Linux) | **Experimental** (Linux) | **Windows** | **FreeBSD** | |------------------|----------------------|---------|---------| | [![Jenkins Build Status](https://jenkins.dockerproject.org/view/Docker/job/Docker%20Master/badge/icon)](https://jenkins.dockerproject.org/view/Docker/job/Docker%20Master/) | [![Jenkins Build Status](https://jenkins.dockerproject.org/view/Docker/job/Docker%20Master%20%28experimental%29/badge/icon)](https://jenkins.dockerproject.org/view/Docker/job/Docker%20Master%20%28experimental%29/) | [![Build Status](http://jenkins.dockerproject.org/job/Docker%20Master%20(windows)/badge/icon)](http://jenkins.dockerproject.org/job/Docker%20Master%20(windows)/) | [![Build Status](http://jenkins.dockerproject.org/job/Docker%20Master%20(freebsd)/badge/icon)](http://jenkins.dockerproject.org/job/Docker%20Master%20(freebsd)/) | @@ -219,7 +219,7 @@ We are always open to suggestions on process improvements, and are always lookin IRC is a rich chat protocol but it can overwhelm new users. You can search our chat archives.

- Read our IRC quickstart guide for an easy way to get started. + Read our IRC quickstart guide for an easy way to get started. @@ -238,7 +238,7 @@ We are always open to suggestions on process improvements, and are always lookin Google account by sending an email to docker-dev+subscribe@googlegroups.com. You'll receive a join-request message; simply reply to the message to - confirm your subscribtion. + confirm your subscription. diff --git a/vendor/github.com/docker/docker/ROADMAP.md b/vendor/github.com/docker/docker/ROADMAP.md index 514fdb7..21fe06d 100644 --- a/vendor/github.com/docker/docker/ROADMAP.md +++ b/vendor/github.com/docker/docker/ROADMAP.md @@ -63,10 +63,9 @@ containers, and not as easily dismissed). ## 1.3 Internal decoupling A lot of work has been done in trying to decouple the Docker Engine's internals. In particular, the -API implementation has been refactored and ongoing work is happening to move the code to a separate -repository ([`docker/engine-api`](https://github.com/docker/engine-api)), and the Builder side of -the daemon is now [fully independent](https://github.com/docker/docker/tree/master/builder) while -still residing in the same repository. +API implementation has been refactored, and the Builder side of the daemon is now +[fully independent](https://github.com/docker/docker/tree/master/builder) while still residing in +the same repository. We are exploring ways to go further with that decoupling, capitalizing on the work introduced by the runtime renovation and plugins improvement efforts. Indeed, the combination of `containerd` support @@ -93,28 +92,7 @@ to another node in the cluster. This will be introduced in a backward compatible We won't accept patches expanding the surface of `docker exec`, which we intend to keep as a *debugging* feature, as well as being strongly dependent on the Runtime ingredient effort. -## 2.2 Dockerfile syntax - -The Dockerfile syntax as we know it is simple, and has proven successful in supporting all our -[official images](https://github.com/docker-library/official-images). Although this is *not* a -definitive move, we temporarily won't accept more patches to the Dockerfile syntax for several -reasons: - - - Long term impact of syntax changes is a sensitive matter that require an amount of attention the - volume of Engine codebase and activity today doesn't allow us to provide. - - Allowing the Builder to be implemented as a separate utility consuming the Engine's API will - open the door for many possibilities, such as offering alternate syntaxes or DSL for existing - languages without cluttering the Engine's codebase. - - A standalone Builder will also offer the opportunity for a better dedicated group of maintainers - to own the Dockerfile syntax and decide collectively on the direction to give it. - - Our experience with official images tend to show that no new instruction or syntax expansion is - *strictly* necessary for the majority of use cases, and although we are aware many things are - still lacking for many, we cannot make it a priority yet for the above reasons. - -Again, this is not about saying that the Dockerfile syntax is done, it's about making choices about -what we want to do first! - -## 2.3 Remote Registry Operations +## 2.2 Remote Registry Operations A large amount of work is ongoing in the area of image distribution and provenance. This includes moving to the V2 Registry API and heavily refactoring the code that powers these features. The diff --git a/vendor/github.com/docker/docker/VENDORING.md b/vendor/github.com/docker/docker/VENDORING.md index c6bb508..3086f9d 100644 --- a/vendor/github.com/docker/docker/VENDORING.md +++ b/vendor/github.com/docker/docker/VENDORING.md @@ -20,7 +20,7 @@ Each repo should: github releases file. The goal here is for consuming repos to be able to use the tag version and -changelog updates to determine whether the vendoring will cause any breaking or +changelog updates to determine whether the vendoring will cause any breaking or backward incompatible changes. This also means that repos can specify having dependency on a package of a specific version or greater up to the next major release, without encountering breaking changes. @@ -38,7 +38,7 @@ to the MAJOR.MINOR.PATCH format." ## Vendoring cadence In order to avoid huge vendoring changes, it is recommended to have a regular -cadence for vendoring updates. eg. monthly. +cadence for vendoring updates. e.g. monthly. ## Pre-merge vendoring tests All related repos will be vendored into docker/docker. diff --git a/vendor/github.com/docker/docker/VERSION b/vendor/github.com/docker/docker/VERSION index 381cf02..a4ab692 100644 --- a/vendor/github.com/docker/docker/VERSION +++ b/vendor/github.com/docker/docker/VERSION @@ -1 +1 @@ -1.12.0-dev +1.13.0-dev diff --git a/vendor/github.com/docker/docker/api/README.md b/vendor/github.com/docker/docker/api/README.md new file mode 100644 index 0000000..453f61a --- /dev/null +++ b/vendor/github.com/docker/docker/api/README.md @@ -0,0 +1,5 @@ +This directory contains code pertaining to the Docker API: + + - Used by the docker client when communicating with the docker daemon + + - Used by third party tools wishing to interface with the docker daemon diff --git a/vendor/github.com/docker/docker/api/swagger-gen.yaml b/vendor/github.com/docker/docker/api/swagger-gen.yaml new file mode 100644 index 0000000..f07a027 --- /dev/null +++ b/vendor/github.com/docker/docker/api/swagger-gen.yaml @@ -0,0 +1,12 @@ + +layout: + models: + - name: definition + source: asset:model + target: "{{ joinFilePath .Target .ModelPackage }}" + file_name: "{{ (snakize (pascalize .Name)) }}.go" + operations: + - name: handler + source: asset:serverOperation + target: "{{ joinFilePath .Target .APIPackage .Package }}" + file_name: "{{ (snakize (pascalize .Name)) }}.go" diff --git a/vendor/github.com/docker/docker/api/swagger.yaml b/vendor/github.com/docker/docker/api/swagger.yaml new file mode 100644 index 0000000..4c1d157 --- /dev/null +++ b/vendor/github.com/docker/docker/api/swagger.yaml @@ -0,0 +1,6828 @@ +swagger: "2.0" +schemes: + - "http" + - "https" +produces: + - "application/json" + - "text/plain" +consumes: + - "application/json" + - "text/plain" +basePath: "/v1.25" +info: + title: "Docker Remote API" + version: "1.25" + description: | + The Docker API is an HTTP REST API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. + + Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. [There is example of using `curl` to run a container in the SDK documentation.](#TODO) + + # Errors + + The Remote API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: + + ``` + { + "message": "page not found" + } + ``` + + # Versioning + + The API is usually changed in each release of Docker. If you want to write a client that doesn't break when connecting to newer Docker releases, you can lock to a specific API version. + + For Docker 1.13, the API version is 1.25. To lock to this version, you prefix the URL with `/v1.25`. For example, calling `/info` is the same as calling `/v1.25/info`. + + The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer Docker daemons. + + # Authentication + + Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a Base64 encoded (JSON) string with the following structure: + + ``` + { + "username": "string", + "password": "string", + "email": "string", + "serveraddress": "string" + } + ``` + + The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. + + If you have already got an identity token from the [`/auth` endpoint](#operation/checkAuthentication), you can just pass this instead of credentials: + + ``` + { + "identitytoken": "9cbaf023786cd7..." + } + ``` + +definitions: + Port: + type: "object" + description: "An open port on a container" + required: [PrivatePort, Type] + properties: + IP: + type: "string" + format: "ip-address" + PrivatePort: + type: "integer" + format: "uint16" + x-nullable: false + description: "Port on the container" + PublicPort: + type: "integer" + format: "uint16" + description: "Port exposed on the host" + Type: + type: "string" + x-nullable: false + enum: ["tcp", "udp"] + example: + PrivatePort: 8080 + PublicPort: 80 + Type: "tcp" + + MountPoint: + type: "object" + description: "A mount point inside a container" + properties: + Type: + type: "string" + Name: + type: "string" + Source: + type: "string" + Destination: + type: "string" + Driver: + type: "string" + Mode: + type: "string" + RW: + type: "boolean" + Propagation: + type: "string" + + DeviceMapping: + type: "object" + description: "A device mapping between the host and container" + properties: + PathOnHost: + type: "string" + PathInContainer: + type: "string" + CgroupPermissions: + type: "string" + example: + PathOnHost: "/dev/deviceName" + PathInContainer: "/dev/deviceName" + CgroupPermissions: "mrw" + + ThrottleDevice: + type: "object" + properties: + Path: + description: "Device path" + type: "string" + Rate: + description: "Rate" + type: "integer" + format: "int64" + minimum: 0 + + Mount: + type: "object" + properties: + Target: + description: "Container path." + type: "string" + Source: + description: "Mount source (e.g. a volume name, a host path)." + Type: + description: | + The mount type. Available types: + + - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. + - `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. + type: "string" + enum: + - "bind" + - "volume" + ReadOnly: + description: "Whether the mount should be read-only." + type: "boolean" + BindOptions: + description: "Optional configuration for the `bind` type." + type: "object" + properties: + Propagation: + description: "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`." + enum: + - "private" + - "rprivate" + - "shared" + - "rshared" + - "slave" + - "rslave" + VolumeOptions: + description: "Optional configuration for the `volume` type." + type: "object" + properties: + NoCopy: + description: "Populate volume with data from the target." + type: "boolean" + default: false + Labels: + description: "User-defined name and labels for the volume as key/value pairs." + type: "object" + additionalProperties: + type: "string" + DriverConfig: + description: "Map of driver specific options" + type: "object" + properties: + Name: + description: "Name of the driver to use to create the volume." + type: "string" + Options: + description: "key/value map of driver specific options." + type: "object" + additionalProperties: + type: "string" + + RestartPolicy: + description: | + The behavior to apply when the container exits. The default is not to restart. + + An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. + type: "object" + properties: + Name: + type: "string" + description: | + - `always` Always restart + - `unless-stopped` Restart always except when the user has manually stopped the container + - `on-failure` Restart only when the container exit code is non-zero + enum: + - "always" + - "unless-stopped" + - "on-failure" + MaximumRetryCount: + type: "integer" + description: "If `on-failure` is used, the number of times to retry before giving up" + default: {} + + Resources: + description: "A container's resources (cgroups config, ulimits, etc)" + type: "object" + properties: + # Applicable to all platforms + CpuShares: + description: "An integer value representing this container's relative CPU weight versus other containers." + type: "integer" + Memory: + description: "Memory limit in bytes." + type: "integer" + default: 0 + # Applicable to UNIX platforms + CgroupParent: + description: "Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist." + type: "string" + BlkioWeight: + description: "Block IO weight (relative weight)." + type: "integer" + minimum: 10 + maximum: 1000 + BlkioWeightDevice: + description: | + Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. + type: "array" + items: + type: "object" + properties: + Path: + type: "string" + Weight: + type: "integer" + minimum: 0 + BlkioDeviceReadBps: + description: | + Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + BlkioDeviceWriteBps: + description: | + Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + BlkioDeviceReadIOps: + description: | + Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + BlkioDeviceWriteIOps: + description: | + Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + CpuPeriod: + description: "The length of a CPU period in microseconds." + type: "integer" + CpuQuota: + description: "Microseconds of CPU time that the container can get in a CPU period." + type: "integer" + CpusetCpus: + description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)" + type: "string" + CpusetMems: + description: "Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems." + type: "string" + Devices: + description: "A list of devices to add to the container." + type: "array" + items: + $ref: "#/definitions/DeviceMapping" + DiskQuota: + description: "Disk limit (in bytes)." + type: "integer" + format: "int64" + KernelMemory: + description: "Kernel memory limit in bytes." + type: "integer" + format: "int64" + MemoryReservation: + description: "Memory soft limit in bytes." + type: "integer" + format: "int64" + MemorySwap: + description: "Total memory limit (memory + swap). Set as `-1` to enable unlimited swap." + type: "integer" + format: "int64" + MemorySwappiness: + description: "Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100." + type: "integer" + format: "int64" + minimum: 0 + maximum: 100 + OomKillDisable: + description: "Disable OOM Killer for the container." + type: "boolean" + PidsLimit: + description: "Tune a container's pids limit. Set -1 for unlimited." + type: "integer" + format: "int64" + Ulimits: + description: | + A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + type: "array" + items: + type: "object" + properties: + Name: + description: "Name of ulimit" + type: "string" + Soft: + description: "Soft limit" + type: "integer" + Hard: + description: "Hard limit" + type: "integer" + # Applicable to Windows + CpuCount: + description: "CPU count (Windows only)" + type: "integer" + format: "int64" + CpuPercent: + description: "CPU percent (Windows only)" + type: "integer" + format: "int64" + IOMaximumIOps: + description: "Maximum IOps for the container system drive (Windows only)" + type: "integer" + format: "int64" + IOMaximumBandwidth: + description: "Maximum IO in bytes per second for the container system drive (Windows only)" + type: "integer" + format: "int64" + + HostConfig: + description: "Container configuration that depends on the host we are running on" + allOf: + - $ref: "#/definitions/Resources" + - type: "object" + properties: + # Applicable to all platforms + Binds: + type: "array" + description: | + A list of volume bindings for this container. Each volume binding is a string in one of these forms: + + - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. + - `host-src:container-dest:ro` to make the bind-mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. + - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path. + - `volume-name:container-dest:ro` to mount the volume read-only inside the container. `container-dest` must be an _absolute_ path. + items: + type: "string" + ContainerIDFile: + type: "string" + description: "Path to a file where the container ID is written" + LogConfig: + type: "object" + description: "The logging configuration for this container" + properties: + Type: + type: "string" + enum: + - "json-file" + - "syslog" + - "journald" + - "gelf" + - "fluentd" + - "awslogs" + - "splunk" + - "etwlogs" + - "none" + Config: + type: "object" + additionalProperties: + type: "string" + NetworkMode: + type: "string" + description: "Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken + as a custom network's name to which this container should connect to." + PortBindings: + type: "object" + description: "A map of exposed container ports and the host port they should map to." + additionalProperties: + type: "object" + properties: + HostIp: + type: "string" + description: "The host IP address" + HostPort: + type: "string" + description: "The host port number, as a string" + RestartPolicy: + $ref: "#/definitions/RestartPolicy" + AutoRemove: + type: "boolean" + description: "Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set." + VolumeDriver: + type: "string" + description: "Driver that this container uses to mount volumes." + VolumesFrom: + type: "array" + description: "A list of volumes to inherit from another container, specified in the form `[:]`." + items: + type: "string" + Mounts: + description: "Specification for mounts to be added to the container." + type: "array" + items: + $ref: "#/definitions/Mount" + + # Applicable to UNIX platforms + CapAdd: + type: "array" + description: "A list of kernel capabilities to add to the container." + items: + type: "string" + CapDrop: + type: "array" + description: "A list of kernel capabilities to drop from the container." + items: + type: "string" + Dns: + type: "array" + description: "A list of DNS servers for the container to use." + items: + type: "string" + DnsOptions: + type: "array" + description: "A list of DNS options." + items: + type: "string" + DnsSearch: + type: "array" + description: "A list of DNS search domains." + items: + type: "string" + ExtraHosts: + type: "array" + description: | + A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`. + items: + type: "string" + GroupAdd: + type: "array" + description: "A list of additional groups that the container process will run as." + items: + type: "string" + IpcMode: + type: "string" + description: "IPC namespace to use for the container." + Cgroup: + type: "string" + description: "Cgroup to use for the container." + Links: + type: "array" + description: "A list of links for the container in the form `container_name:alias`." + items: + type: "string" + OomScoreAdj: + type: "integer" + description: "An integer value containing the score given to the container in order to tune OOM killer preferences." + PidMode: + type: "string" + description: | + Set the PID (Process) Namespace mode for the container. It can be either: + + - `"container:"`: joins another container's PID namespace + - `"host"`: use the host's PID namespace inside the container + Privileged: + type: "boolean" + description: "Gives the container full access to the host." + PublishAllPorts: + type: "boolean" + description: "Allocates a random host port for all of a container's exposed ports." + ReadonlyRootfs: + type: "boolean" + description: "Mount the container's root filesystem as read only." + SecurityOpt: + type: "array" + description: "A list of string values to customize labels for MLS + systems, such as SELinux." + items: + type: "string" + StorageOpt: + type: "object" + description: | + Storage driver options for this container, in the form `{"size": "120G"}`. + additionalProperties: + type: "string" + Tmpfs: + type: "object" + description: "List of tmpfs mounts for this container." + additionalProperties: + type: "string" + UTSMode: + type: "string" + description: "UTS namespace to use for the container." + UsernsMode: + type: "string" + description: "Sets the usernamespace mode for the container when usernamespace remapping option is enabled." + ShmSize: + type: "integer" + description: "Size of `/dev/shm` in bytes. If omitted, the system uses 64MB." + minimum: 0 + Sysctls: + type: "object" + description: | + A list of kernel parameters (sysctls) to set in the container. For example: `{ "net.ipv4.ip_forward": "1" }` + additionalProperties: + type: "string" + Runtime: + type: "string" + description: "Runtime to use with this container." + # Applicable to Windows + ConsoleSize: + type: "array" + description: "Initial console size, as an `[height, width]` array. (Windows only)" + minItems: 2 + maxItems: 2 + items: + type: "integer" + minimum: 0 + Isolation: + type: "string" + description: "Isolation technology of the container. (Windows only)" + enum: + - "default" + - "process" + - "hyperv" + + Config: + description: "Configuration for a container that is portable between hosts" + type: "object" + properties: + Hostname: + description: "The hostname to use for the container, as a valid RFC 1123 hostname." + type: "string" + Domainname: + description: "The domain name to use for the container." + type: "string" + User: + description: "The user that commands are run as inside the container." + type: "string" + AttachStdin: + description: "Whether to attach to stdin." + type: "boolean" + default: false + AttachStdout: + description: "Whether to attach to stdout." + type: "boolean" + default: true + AttachStderr: + description: "Whether to attach to stderr." + type: "boolean" + default: true + ExposedPorts: + description: | + An object mapping ports to an empty object in the form: + + `{"/": {}}` + type: "object" + additionalProperties: + type: "object" + enum: + - {} + default: {} + Tty: + description: "Attach standard streams to a TTY, including stdin if it is not closed." + type: "boolean" + default: false + OpenStdin: + description: "Open stdin" + type: "boolean" + default: false + StdinOnce: + description: "Close stdin after one attached client disconnects" + type: "boolean" + default: false + Env: + description: | + A list of environment variables to set inside the container in the form `["VAR=value"[,"VAR2=value2"]]` + type: "array" + items: + type: "string" + Cmd: + description: "Command to run specified as a string or an array of strings." + type: + - "array" + - "string" + items: + type: "string" + Healthcheck: + description: "A test to perform to check that the container is healthy." + type: "object" + properties: + Test: + description: | + The test to perform. Possible values are: + + - `{}` inherit healthcheck from image or parent image + - `{"NONE"}` disable healthcheck + - `{"CMD", args...}` exec arguments directly + - `{"CMD-SHELL", command}` run command with system's default shell + type: "array" + items: + type: "string" + Interval: + description: "The time to wait between checks in nanoseconds. 0 means inherit." + type: "integer" + Timeout: + description: "The time to wait before considering the check to have hung. 0 means inherit." + type: "integer" + Retries: + description: "The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit." + type: "integer" + ArgsEscaped: + description: "Command is already escaped (Windows only)" + type: "boolean" + Image: + description: "The name of the image to use when creating the container" + type: "string" + Volumes: + description: "An object mapping mount point paths inside the container to empty objects." + type: "object" + properties: + additionalProperties: + type: "object" + enum: + - {} + default: {} + WorkingDir: + description: "The working directory for commands to run in." + type: "string" + Entrypoint: + description: | + The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the Dockerfile). + type: + - "array" + - "string" + items: + type: "string" + NetworkDisabled: + description: "Disable networking for the container." + type: "boolean" + MacAddress: + description: "MAC address of the container." + type: "string" + OnBuild: + description: "`ONBUILD` metadata that were defined in the image's `Dockerfile`." + type: "array" + items: + type: "string" + Labels: + description: "User-defined key/value data attached to the container." + type: "object" + additionalProperties: + type: "string" + StopSignal: + description: "Signal to stop a container as a string or unsigned integer." + type: "string" + default: "SIGTERM" + Shell: + description: "Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell." + type: "array" + items: + type: "string" + + NetworkConfig: + description: "TODO: check is correct" + type: "object" + properties: + Bridge: + type: "string" + Gateway: + type: "string" + Address: + type: "string" + IPPrefixLen: + type: "integer" + MacAddress: + type: "string" + PortMapping: + type: "string" + Ports: + type: "array" + items: + $ref: "#/definitions/Port" + + GraphDriver: + description: "Information about this container's graph driver." + type: "object" + properties: + Name: + type: "string" + Data: + type: "object" + additionalProperties: + type: "string" + + Image: + type: "object" + properties: + Id: + type: "string" + RepoTags: + type: "array" + items: + type: "string" + RepoDigests: + type: "array" + items: + type: "string" + Parent: + type: "string" + Comment: + type: "string" + Created: + type: "string" + Container: + type: "string" + ContainerConfig: + $ref: "#/definitions/Config" + DockerVersion: + type: "string" + Author: + type: "string" + Config: + $ref: "#/definitions/Config" + Architecture: + type: "string" + Os: + type: "string" + Size: + type: "integer" + format: "int64" + VirtualSize: + type: "integer" + format: "int64" + GraphDriver: + $ref: "#/definitions/GraphDriver" + RootFS: + type: "object" + properties: + Type: + type: "string" + Layers: + type: "array" + items: + type: "string" + BaseLayer: + type: "string" + + ImageSummary: + type: "object" + required: + - Id + - ParentId + - RepoTags + - RepoDigests + - Created + - Size + - SharedSize + - VirtualSize + - Labels + - Containers + properties: + Id: + type: "string" + x-nullable: false + ParentId: + type: "string" + x-nullable: false + RepoTags: + type: "array" + x-nullable: false + items: + type: "string" + RepoDigests: + type: "array" + x-nullable: false + items: + type: "string" + Created: + type: "integer" + x-nullable: false + Size: + type: "integer" + x-nullable: false + SharedSize: + type: "integer" + x-nullable: false + VirtualSize: + type: "integer" + x-nullable: false + Labels: + type: "object" + x-nullable: false + additionalProperties: + type: "string" + Containers: + x-nullable: false + type: "integer" + + AuthConfig: + type: "object" + properties: + username: + type: "string" + password: + type: "string" + email: + type: "string" + serveraddress: + type: "string" + example: + username: "hannibal" + password: "xxxx" + serveraddress: "https://index.docker.io/v1/" + + ProcessConfig: + type: "object" + properties: + privileged: + type: "boolean" + user: + type: "string" + tty: + type: "boolean" + entrypoint: + type: "string" + arguments: + type: "array" + items: + type: "string" + + Volume: + type: "object" + required: [Name, Driver, Mountpoint, Labels, Scope, Options] + properties: + Name: + type: "string" + description: "Name of the volume." + x-nullable: false + Driver: + type: "string" + description: "Name of the volume driver used by the volume." + x-nullable: false + Mountpoint: + type: "string" + description: "Mount path of the volume on the host." + x-nullable: false + Status: + type: "object" + description: | + Low-level details about the volume, provided by the volume driver. + Details are returned as a map with key/value pairs: + `{"key":"value","key2":"value2"}`. + + The `Status` field is optional, and is omitted if the volume driver + does not support this feature. + additionalProperties: + type: "object" + Labels: + type: "object" + description: "A mapping of abitrary key/value data set on this volume." + x-nullable: false + additionalProperties: + type: "string" + Scope: + type: "string" + description: "The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level." + default: "local" + x-nullable: false + enum: ["local", "global"] + Options: + type: "object" + description: "The driver specific options used when creating the volume." + additionalProperties: + type: "string" + UsageData: + type: "object" + required: [Size, RefCount] + properties: + Size: + type: "integer" + description: "The disk space used by the volume (local driver only)" + default: -1 + x-nullable: false + RefCount: + type: "integer" + default: -1 + description: "The number of containers referencing this volume." + x-nullable: false + + example: + Name: "tardis" + Driver: "custom" + Mountpoint: "/var/lib/docker/volumes/tardis" + Status: + hello: "world" + Labels: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Scope: "local" + + Network: + type: "object" + properties: + Name: + type: "string" + Id: + type: "string" + Scope: + type: "string" + Driver: + type: "string" + EnableIPv6: + type: "boolean" + IPAM: + $ref: "#/definitions/IPAM" + Internal: + type: "boolean" + Containers: + type: "object" + additionalProperties: + $ref: "#/definitions/NetworkContainer" + Options: + type: "object" + additionalProperties: + type: "string" + Labels: + type: "object" + additionalProperties: + type: "string" + example: + Name: "net01" + Id: "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99" + Scope: "local" + Driver: "bridge" + EnableIPv6: false + IPAM: + Driver: "default" + Config: + - Subnet: "172.19.0.0/16" + Gateway: "172.19.0.1" + Options: + foo: "bar" + Internal: false + Containers: + 19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c: + Name: "test" + EndpointID: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a" + MacAddress: "02:42:ac:13:00:02" + IPv4Address: "172.19.0.2/16" + IPv6Address: "" + Options: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" + com.docker.network.bridge.name: "docker0" + com.docker.network.driver.mtu: "1500" + Labels: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + IPAM: + type: "object" + properties: + Config: + type: "array" + items: + type: "object" + additionalProperties: + type: "string" + + NetworkContainer: + type: "object" + properties: + EndpointID: + type: "string" + MacAddress: + type: "string" + IPv4Address: + type: "string" + IPv6Address: + type: "string" + + BuildInfo: + type: "object" + properties: + id: + type: "string" + stream: + type: "string" + error: + type: "string" + errorDetail: + $ref: "#/definitions/ErrorDetail" + status: + type: "string" + progress: + type: "string" + progressDetail: + $ref: "#/definitions/ProgressDetail" + + CreateImageInfo: + type: "object" + properties: + error: + type: "string" + status: + type: "string" + progress: + type: "string" + progressDetail: + $ref: "#/definitions/ProgressDetail" + + PushImageInfo: + type: "object" + properties: + error: + type: "string" + status: + type: "string" + progress: + type: "string" + progressDetail: + $ref: "#/definitions/ProgressDetail" + ErrorDetail: + type: "object" + properties: + code: + type: "integer" + message: + type: "string" + ProgressDetail: + type: "object" + properties: + code: + type: "integer" + message: + type: "integer" + + ErrorResponse: + description: "Represents an error." + type: "object" + required: ["message"] + properties: + message: + description: "The error message." + type: "string" + x-nullable: false + example: + message: "Something went wrong." + + IdResponse: + description: "Response to an API call that returns just an Id" + type: "object" + required: ["Id"] + properties: + Id: + description: "The id of the newly created object." + type: "string" + x-nullable: false + + EndpointSettings: + description: "Configuration for a network endpoint." + type: "object" + properties: + IPAMConfig: + description: "IPAM configurations for the endpoint" + type: "object" + properties: + IPv4Address: + type: "string" + IPv6Address: + type: "string" + LinkLocalIPs: + type: "array" + items: + type: "string" + Links: + type: "array" + items: + type: "string" + Aliases: + type: "array" + items: + type: "string" + NetworkID: + type: "string" + EndpointID: + type: "string" + Gateway: + type: "string" + IPAddress: + type: "string" + IPPrefixLen: + type: "integer" + IPv6Gateway: + type: "string" + GlobalIPv6Address: + type: "string" + GlobalIPv6PrefixLen: + type: "integer" + format: "int64" + MacAddress: + type: "string" + + PluginMount: + type: "object" + x-nullable: false + required: [Name, Description, Settable, Source, Destination, Type, Options] + properties: + Name: + type: "string" + x-nullable: false + Description: + type: "string" + x-nullable: false + Settable: + type: "array" + items: + type: "string" + Source: + type: "string" + Destination: + type: "string" + x-nullable: false + Type: + type: "string" + x-nullable: false + Options: + type: "array" + items: + type: "string" + + PluginDevice: + type: "object" + required: [Name, Description, Settable, Path] + x-nullable: false + properties: + Name: + type: "string" + x-nullable: false + Description: + type: "string" + x-nullable: false + Settable: + type: "array" + items: + type: "string" + Path: + type: "string" + + PluginEnv: + type: "object" + x-nullable: false + required: [Name, Description, Settable, Value] + properties: + Name: + x-nullable: false + type: "string" + Description: + x-nullable: false + type: "string" + Settable: + type: "array" + items: + type: "string" + Value: + type: "string" + + PluginInterfaceType: + type: "object" + x-nullable: false + required: [Prefix, Capability, Version] + properties: + Prefix: + type: "string" + x-nullable: false + Capability: + type: "string" + x-nullable: false + Version: + type: "string" + x-nullable: false + + Plugin: + description: "A plugin for the Remote API" + type: "object" + required: [Config, Enabled, Manifest, Name, Tag] + properties: + Id: + type: "string" + Name: + type: "string" + x-nullable: false + Tag: + type: "string" + x-nullable: false + Enabled: + description: "True when the plugin is running. False when the plugin is not running, only installed." + type: "boolean" + x-nullable: false + Config: + description: "Settings that can be modified by users." + type: "object" + x-nullable: false + required: [Args, Devices, Env, Mounts] + properties: + Mounts: + type: "array" + items: + $ref: "#/definitions/PluginMount" + Env: + type: "array" + items: + type: "string" + Args: + type: "array" + items: + type: "string" + Devices: + type: "array" + items: + $ref: "#/definitions/PluginDevice" + Manifest: + description: "The manifest of a plugin." + type: "object" + x-nullable: false + required: + - ManifestVersion + - Description + - Documentation + - Interface + - Entrypoint + - Workdir + - Network + - Capabilities + - Mounts + - Devices + - Env + - Args + properties: + ManifestVersion: + type: "string" + x-nullable: false + Description: + type: "string" + x-nullable: false + Documentation: + type: "string" + x-nullable: false + Interface: + description: "The interface between Docker and the plugin" + x-nullable: false + type: "object" + required: [Types, Socket] + properties: + Types: + type: "array" + items: + $ref: "#/definitions/PluginInterfaceType" + Socket: + type: "string" + x-nullable: false + Entrypoint: + type: "array" + items: + type: "string" + Workdir: + type: "string" + x-nullable: false + User: + type: "object" + x-nullable: false + properties: + UID: + type: "integer" + format: "uint32" + GID: + type: "integer" + format: "uint32" + Network: + type: "object" + x-nullable: false + required: [Type] + properties: + Type: + x-nullable: false + type: "string" + Capabilities: + type: "array" + items: + type: "string" + Mounts: + type: "array" + items: + $ref: "#/definitions/PluginMount" + Devices: + type: "array" + items: + $ref: "#/definitions/PluginDevice" + Env: + type: "array" + items: + $ref: "#/definitions/PluginEnv" + Args: + type: "object" + x-nullable: false + required: [Name, Description, Settable, Value] + properties: + Name: + x-nullable: false + type: "string" + Description: + x-nullable: false + type: "string" + Settable: + type: "array" + items: + type: "string" + Value: + type: "array" + items: + type: "string" + example: + Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" + Name: "tiborvass/no-remove" + Tag: "latest" + Active: true + Config: + Mounts: + - Name: "" + Description: "" + Settable: null + Source: "/data" + Destination: "/data" + Type: "bind" + Options: + - "shared" + - "rbind" + - Name: "" + Description: "" + Settable: null + Source: null + Destination: "/foobar" + Type: "tmpfs" + Options: null + Env: + - "DEBUG=1" + Args: null + Devices: null + Manifest: + ManifestVersion: "v0" + Description: "A test plugin for Docker" + Documentation: "https://docs.docker.com/engine/extend/plugins/" + Interface: + Types: + - "docker.volumedriver/1.0" + Socket: "plugins.sock" + Entrypoint: + - "plugin-no-remove" + - "/data" + Workdir: "" + User: {} + Network: + Type: "host" + Capabilities: null + Mounts: + - Name: "" + Description: "" + Settable: null + Source: "/data" + Destination: "/data" + Type: "bind" + Options: + - "shared" + - "rbind" + - Name: "" + Description: "" + Settable: null + Source: null + Destination: "/foobar" + Type: "tmpfs" + Options: null + Devices: + - Name: "device" + Description: "a host device to mount" + Settable: null + Path: "/dev/cpu_dma_latency" + Env: + - Name: "DEBUG" + Description: "If set, prints debug messages" + Settable: null + Value: "1" + Args: + Name: "args" + Description: "command line arguments" + Settable: null + Value: [] + + NodeSpec: + type: "object" + properties: + Name: + description: "Name for the node." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + Role: + description: "Role of the node." + type: "string" + enum: + - "worker" + - "manager" + Availability: + description: "Availability of the node." + type: "string" + enum: + - "active" + - "pause" + - "drain" + example: + Availability: "active" + Name: "node-name" + Role: "manager" + Labels: + foo: "bar" + Node: + type: "object" + properties: + ID: + type: "string" + Version: + type: "object" + properties: + Index: + type: "integer" + format: "int64" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Spec: + $ref: "#/definitions/NodeSpec" + Description: + type: "object" + properties: + Hostname: + type: "string" + Platform: + type: "object" + properties: + Architecture: + type: "string" + OS: + type: "string" + Resources: + type: "object" + properties: + NanoCPUs: + type: "integer" + format: "int64" + MemoryBytes: + type: "integer" + format: "int64" + Engine: + type: "object" + properties: + EngineVersion: + type: "string" + Labels: + type: "object" + additionalProperties: + type: "string" + Plugins: + type: "array" + items: + type: "object" + properties: + Type: + type: "string" + Name: + type: "string" + example: + ID: "24ifsmvkjbyhk" + Version: + Index: 8 + CreatedAt: "2016-06-07T20:31:11.853781916Z" + UpdatedAt: "2016-06-07T20:31:11.999868824Z" + Spec: + Name: "my-node" + Role: "manager" + Availability: "active" + Labels: + foo: "bar" + Description: + Hostname: "bf3067039e47" + Platform: + Architecture: "x86_64" + OS: "linux" + Resources: + NanoCPUs: 4000000000 + MemoryBytes: 8272408576 + Engine: + EngineVersion: "1.12.0-dev" + Labels: + foo: "bar" + Plugins: + - Type: "Volume" + Name: "local" + - Type: "Network" + Name: "bridge" + - Type: "Network" + Name: "null" + - Type: "Network" + Name: "overlay" + Status: + State: "ready" + ManagerStatus: + Leader: true + Reachability: "reachable" + Addr: "172.17.0.2:2377" + SwarmSpec: + description: "User modifiable swarm configuration." + type: "object" + properties: + Name: + description: "Name of the swarm." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + Orchestration: + description: "Orchestration configuration." + type: "object" + properties: + TaskHistoryRetentionLimit: + description: "The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks." + type: "integer" + format: "int64" + Raft: + description: "Raft configuration." + type: "object" + properties: + SnapshotInterval: + description: "The number of log entries between snapshots." + type: "integer" + format: "int64" + KeepOldSnapshots: + description: "The number of snapshots to keep beyond the current snapshot." + type: "integer" + format: "int64" + LogEntriesForSlowFollowers: + description: "The number of log entries to keep around to sync up slow followers after a snapshot is created." + type: "integer" + format: "int64" + ElectionTick: + description: | + The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`. + + A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + type: "integer" + HeartbeatTick: + description: | + The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers. + + A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + type: "integer" + Dispatcher: + description: "Dispatcher configuration." + type: "object" + properties: + HeartbeatPeriod: + description: "The delay for an agent to send a heartbeat to the dispatcher." + type: "integer" + format: "int64" + CAConfig: + description: "CA configuration." + type: "object" + properties: + NodeCertExpiry: + description: "The duration node certificates are issued for." + type: "integer" + format: "int64" + ExternalCAs: + description: "Configuration for forwarding signing requests to an external certificate authority." + type: "array" + items: + type: "object" + properties: + Protocol: + description: "Protocol for communication with the external CA + (currently only `cfssl` is supported)." + type: "string" + enum: + - "cfssl" + default: "cfssl" + URL: + description: "URL where certificate signing requests should be sent." + type: "string" + Options: + description: "An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver." + type: "object" + additionalProperties: + type: "string" + TaskDefaults: + description: "Defaults for creating tasks in this cluster." + type: "object" + properties: + LogDriver: + description: | + The log driver to use for tasks created in the orchestrator if unspecified by a service. + + Updating this value will only have an affect on new tasks. Old tasks will continue use their previously configured log driver until recreated. + type: "object" + properties: + Name: + type: "string" + Options: + type: "object" + additionalProperties: + type: "string" + example: + Name: "default" + Orchestration: + TaskHistoryRetentionLimit: 10 + Raft: + SnapshotInterval: 10000 + LogEntriesForSlowFollowers: 500 + HeartbeatTick: 1 + ElectionTick: 3 + Dispatcher: + HeartbeatPeriod: 5000000000 + CAConfig: + NodeCertExpiry: 7776000000000000 + JoinTokens: + Worker: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx" + Manager: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" + # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but + # without `JoinTokens`. + ClusterInfo: + type: "object" + properties: + ID: + description: "The ID of the swarm." + type: "string" + Version: + type: "object" + properties: + Index: + type: "integer" + format: "int64" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Spec: + $ref: "#/definitions/SwarmSpec" + TaskSpec: + description: "User modifiable task configuration." + properties: + ContainerSpec: + type: "object" + properties: + Image: + description: "The image name to use for the container." + type: "string" + Command: + description: "The command to be run in the image." + type: "array" + items: + type: "string" + Args: + description: "Arguments to the command." + type: "array" + items: + type: "string" + Env: + description: "A list of environment variables in the form `VAR=value`." + type: "array" + items: + type: "string" + Dir: + description: "The working directory for commands to run in." + type: "string" + User: + description: "The user inside the container." + type: "string" + Labels: + description: "A map of labels to associate with the service." + type: "object" + additionalProperties: + type: "string" + Mounts: + description: "Specification for mounts to be added to containers created as part of the service." + type: "array" + items: + $ref: "#/definitions/Mount" + StopGracePeriod: + description: "Amount of time to wait for the container to terminate before forcefully killing it." + type: "integer" + format: "int64" + Resources: + description: "Resource requirements which apply to each individual container created as part of the service." + type: "object" + properties: + Limits: + description: "Define resources limits." + type: "object" + properties: + NanoCPUs: + description: "CPU limit in units of 10-9 CPU shares." + type: "integer" + format: "int64" + MemoryBytes: + description: "Memory limit in Bytes." + type: "integer" + format: "int64" + Reservation: + description: "Define resources reservation." + properties: + NanoCPUs: + description: "CPU reservation in units of 10-9 CPU shares." + type: "integer" + format: "int64" + MemoryBytes: + description: "Memory reservation in Bytes." + type: "integer" + format: "int64" + RestartPolicy: + description: "Specification for the restart policy which applies to containers created as part of this service." + type: "object" + properties: + Condition: + description: "Condition for restart." + type: "string" + enum: + - "none" + - "on-failure" + - "any" + Delay: + description: "Delay between restart attempts." + type: "integer" + format: "int64" + MaxAttempts: + description: "Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)." + type: "integer" + format: "int64" + default: 0 + Window: + description: "Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded)." + type: "integer" + format: "int64" + default: 0 + Placement: + type: "object" + properties: + Constraints: + description: "An array of constraints." + type: "array" + items: + type: "string" + Networks: + type: "array" + items: + type: "object" + properties: + Target: + type: "string" + Aliases: + type: "array" + items: + type: "string" + LogDriver: + description: "Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified." + type: "object" + properties: + Name: + type: "string" + Options: + type: "object" + additionalProperties: + type: "string" + TaskState: + type: "string" + enum: + - "new" + - "allocated" + - "pending" + - "assigned" + - "accepted" + - "preparing" + - "ready" + - "starting" + - "running" + - "complete" + - "shutdown" + - "failed" + - "rejected" + Task: + type: "object" + properties: + ID: + description: "The ID of the task." + type: "string" + Version: + type: "object" + properties: + Index: + type: "integer" + format: "int64" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Name: + description: "Name of the task." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + Spec: + $ref: "#/definitions/TaskSpec" + ServiceID: + description: "The ID of the service this task is part of." + type: "string" + Slot: + type: "integer" + NodeID: + description: "The ID of the node that this task is on." + type: "string" + Status: + type: "object" + properties: + Timestamp: + type: "string" + format: "dateTime" + State: + $ref: "#/definitions/TaskState" + Message: + type: "string" + Err: + type: "string" + ContainerStatus: + type: "object" + properties: + ContainerID: + type: "string" + PID: + type: "integer" + ExitCode: + type: "integer" + DesiredState: + $ref: "#/definitions/TaskState" + example: + ID: "0kzzo1i0y4jz6027t0k7aezc7" + Version: + Index: 71 + CreatedAt: "2016-06-07T21:07:31.171892745Z" + UpdatedAt: "2016-06-07T21:07:31.376370513Z" + Spec: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Slot: 1 + NodeID: "60gvrl6tm78dmak4yl7srz94v" + Status: + Timestamp: "2016-06-07T21:07:31.290032978Z" + State: "running" + Message: "started" + ContainerStatus: + ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" + PID: 677 + DesiredState: "running" + NetworksAttachments: + - Network: + ID: "4qvuz4ko70xaltuqbt8956gd1" + Version: + Index: 18 + CreatedAt: "2016-06-07T20:31:11.912919752Z" + UpdatedAt: "2016-06-07T21:07:29.955277358Z" + Spec: + Name: "ingress" + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + DriverState: + Name: "overlay" + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: "default" + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + Addresses: + - "10.255.0.10/16" + ServiceSpec: + description: "User modifiable configuration for a service." + properties: + Name: + description: "Name of the service." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + TaskTemplate: + $ref: "#/definitions/TaskSpec" + Mode: + description: "Scheduling mode for the service." + type: "object" + properties: + Replicated: + type: "object" + properties: + Replicas: + type: "integer" + format: "int64" + Global: + type: "object" + UpdateConfig: + description: "Specification for the update strategy of the service." + type: "object" + properties: + Parallelism: + description: "Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism)." + type: "integer" + format: "int64" + Delay: + description: "Amount of time between updates." + type: "integer" + format: "int64" + FailureAction: + description: "Action to take if an updated task fails to run, or stops running during the update." + type: "string" + enum: + - "continue" + - "pause" + Networks: + description: "Array of network names or IDs to attach the service to." + type: "array" + items: + type: "object" + properties: + Target: + type: "string" + Aliases: + type: "array" + items: + type: "string" + EndpointSpec: + $ref: "#/definitions/EndpointSpec" + EndpointPortConfig: + type: "object" + properties: + Name: + type: "string" + Protocol: + type: "string" + enum: + - "tcp" + - "udp" + TargetPort: + description: "The port inside the container." + type: "integer" + PublishedPort: + description: "The port on the swarm hosts." + type: "integer" + EndpointSpec: + description: "Properties that can be configured to access and load balance a service." + type: "object" + properties: + Mode: + description: "The mode of resolution to use for internal load balancing + between tasks." + type: "string" + enum: + - "vip" + - "dnsrr" + default: "vip" + Ports: + description: "List of exposed ports that this service is accessible on from the outside. Ports can only be provided if `vip` resolution mode is used." + type: "array" + items: + $ref: "#/definitions/EndpointPortConfig" + Service: + type: "object" + properties: + ID: + type: "string" + Version: + type: "object" + properties: + Index: + type: "integer" + format: "int64" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Spec: + $ref: "#/definitions/ServiceSpec" + Endpoint: + type: "object" + properties: + Spec: + $ref: "#/definitions/EndpointSpec" + Ports: + type: "array" + items: + $ref: "#/definitions/EndpointPortConfig" + VirtualIPs: + type: "array" + items: + type: "object" + properties: + NetworkID: + type: "string" + Addr: + type: "string" + UpdateStatus: + description: "The status of a service update." + type: "object" + properties: + State: + type: "string" + enum: + - "updating" + - "paused" + - "completed" + StartedAt: + type: "string" + format: "dateTime" + CompletedAt: + type: "string" + format: "dateTime" + Message: + type: "string" + example: + ID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Version: + Index: 19 + CreatedAt: "2016-06-07T21:05:51.880065305Z" + UpdatedAt: "2016-06-07T21:07:29.962229872Z" + Spec: + Name: "hopeful_cori" + TaskTemplate: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + Mode: + Replicated: + Replicas: 1 + UpdateConfig: + Parallelism: 1 + FailureAction: "pause" + EndpointSpec: + Mode: "vip" + Ports: + - + Protocol: "tcp" + TargetPort: 6379 + PublishedPort: 30001 + Endpoint: + Spec: + Mode: "vip" + Ports: + - + Protocol: "tcp" + TargetPort: 6379 + PublishedPort: 30001 + Ports: + - + Protocol: "tcp" + TargetPort: 6379 + PublishedPort: 30001 + VirtualIPs: + - + NetworkID: "4qvuz4ko70xaltuqbt8956gd1" + Addr: "10.255.0.2/16" + - + NetworkID: "4qvuz4ko70xaltuqbt8956gd1" + Addr: "10.255.0.3/16" +paths: + /containers/json: + get: + summary: "List containers" + operationId: "GetContainerList" + produces: + - "application/json" + parameters: + - name: "all" + in: "query" + description: "Return all containers. By default, only running containers are shown" + type: "boolean" + default: false + - name: "limit" + in: "query" + description: "Return this number of most recently created containers, including non-running ones." + type: "integer" + - name: "size" + in: "query" + description: "Return the size of container as fields `SizeRw` and `SizeRootFs`." + type: "boolean" + default: false + - name: "filters" + in: "query" + description: | + Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{"status": ["paused"]}` will only return paused containers. + + Available filters: + - `exited=` containers with exit code of `` + - `status=`(`created`|`restarting`|`running`|`paused`|`exited`|`dead`) + - `label=key` or `label="key=value"` of a container label + - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) + - `ancestor`=(`[:]`, ``, or ``) + - `before`=(`` or ``) + - `since`=(`` or ``) + - `volume`=(`` or ``) + - `network`=(`` or ``) + type: "string" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + type: "object" + properties: + Id: + description: "The ID of this container" + type: "string" + x-go-name: "ID" + Names: + description: "The names that this container has been given" + type: "array" + items: + type: "string" + Image: + description: "The name of the image used when creating this container" + type: "string" + ImageID: + description: "The ID of the image that this container was created from" + type: "string" + Command: + description: "Command to run when starting the container" + type: "string" + Created: + description: "When the container was created" + type: "integer" + format: "int64" + Ports: + description: "The ports exposed by this container" + type: "array" + items: + $ref: "#/definitions/Port" + SizeRw: + description: "The size of files that have been created or changed by this container" + type: "integer" + format: "int64" + SizeRootFs: + description: "The total size of all the files in this container" + type: "integer" + format: "int64" + Labels: + description: "Labels that have been applied to this container" + type: "object" + additionalProperties: + type: "string" + State: + description: "The state of this container (e.g. `Exited`)" + type: "string" + Status: + description: "Additional human-readable status of this container (e.g. `Exit 0`)" + type: "string" + HostConfig: + type: "object" + properties: + NetworkMode: + type: "string" + NetworkSettings: + description: "A summary of the container's network settings" + type: "object" + properties: + Networks: + type: "object" + additionalProperties: + $ref: "#/definitions/EndpointSettings" + Mounts: + type: "array" + items: + $ref: "#/definitions/Mount" + examples: + application/json: + - Id: "8dfafdbc3a40" + Names: + - "/boring_feynman" + Image: "ubuntu:latest" + ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" + Command: "echo 1" + Created: 1367854155 + State: "Exited" + Status: "Exit 0" + Ports: + - PrivatePort: 2222 + PublicPort: 3333 + Type: "tcp" + Labels: + com.example.vendor: "Acme" + com.example.license: "GPL" + com.example.version: "1.0" + SizeRw: 12288 + SizeRootFs: 0 + HostConfig: + NetworkMode: "default" + NetworkSettings: + Networks: + bridge: + IPAMConfig: null + Links: null + Aliases: null + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.2" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:11:00:02" + Mounts: + - Name: "fac362...80535" + Source: "/data" + Destination: "/data" + Driver: "local" + Mode: "ro,Z" + RW: false + Propagation: "" + - Id: "9cd87474be90" + Names: + - "/coolName" + Image: "ubuntu:latest" + ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" + Command: "echo 222222" + Created: 1367854155 + State: "Exited" + Status: "Exit 0" + Ports: [] + Labels: {} + SizeRw: 12288 + SizeRootFs: 0 + HostConfig: + NetworkMode: "default" + NetworkSettings: + Networks: + bridge: + IPAMConfig: null + Links: null + Aliases: null + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.8" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:11:00:08" + Mounts: [] + - Id: "3176a2479c92" + Names: + - "/sleepy_dog" + Image: "ubuntu:latest" + ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" + Command: "echo 3333333333333333" + Created: 1367854154 + State: "Exited" + Status: "Exit 0" + Ports: [] + Labels: {} + SizeRw: 12288 + SizeRootFs: 0 + HostConfig: + NetworkMode: "default" + NetworkSettings: + Networks: + bridge: + IPAMConfig: null + Links: null + Aliases: null + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.6" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:11:00:06" + Mounts: [] + - Id: "4cb07b47f9fb" + Names: + - "/running_cat" + Image: "ubuntu:latest" + ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" + Command: "echo 444444444444444444444444444444444" + Created: 1367854152 + State: "Exited" + Status: "Exit 0" + Ports: [] + Labels: {} + SizeRw: 12288 + SizeRootFs: 0 + HostConfig: + NetworkMode: "default" + NetworkSettings: + Networks: + bridge: + IPAMConfig: null + Links: null + Aliases: null + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.5" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:11:00:05" + Mounts: [] + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: + - "Container" + /containers/create: + post: + summary: "Create a container" + operationId: "ContainerCreate" + consumes: + - "application/json" + - "application/octet-stream" + produces: + - "application/json" + parameters: + - name: "name" + in: "query" + description: "Assign the specified name to the container. Must match `/?[a-zA-Z0-9_-]+`." + type: "string" + pattern: "/?[a-zA-Z0-9_-]+" + - name: "body" + in: "body" + description: "Container to create" + schema: + allOf: + - $ref: "#/definitions/Config" + - type: "object" + properties: + HostConfig: + $ref: "#/definitions/HostConfig" + NetworkingConfig: + description: "This container's networking configuration." + type: "object" + properties: + EndpointsConfig: + description: "A mapping of network name to endpoint configuration for that network." + type: "object" + additionalProperties: + $ref: "#/definitions/EndpointSettings" + example: + Hostname: "" + Domainname: "" + User: "" + AttachStdin: false + AttachStdout: true + AttachStderr: true + Tty: false + OpenStdin: false + StdinOnce: false + Env: + - "FOO=bar" + - "BAZ=quux" + Cmd: + - "date" + Entrypoint: "" + Image: "ubuntu" + Labels: + com.example.vendor: "Acme" + com.example.license: "GPL" + com.example.version: "1.0" + Volumes: + /volumes/data: {} + WorkingDir: "" + NetworkDisabled: false + MacAddress: "12:34:56:78:9a:bc" + ExposedPorts: + 22/tcp: {} + StopSignal: "SIGTERM" + HostConfig: + Binds: + - "/tmp:/tmp" + Links: + - "redis3:redis" + Memory: 0 + MemorySwap: 0 + MemoryReservation: 0 + KernelMemory: 0 + CpuPercent: 80 + CpuShares: 512 + CpuPeriod: 100000 + CpuQuota: 50000 + CpusetCpus: "0,1" + CpusetMems: "0,1" + MaximumIOps: 0 + MaximumIOBps: 0 + BlkioWeight: 300 + BlkioWeightDevice: + - {} + BlkioDeviceReadBps: + - {} + BlkioDeviceReadIOps: + - {} + BlkioDeviceWriteBps: + - {} + BlkioDeviceWriteIOps: + - {} + MemorySwappiness: 60 + OomKillDisable: false + OomScoreAdj: 500 + PidMode: "" + PidsLimit: -1 + PortBindings: + 22/tcp: + - HostPort: "11022" + PublishAllPorts: false + Privileged: false + ReadonlyRootfs: false + Dns: + - "8.8.8.8" + DnsOptions: + - "" + DnsSearch: + - "" + VolumesFrom: + - "parent" + - "other:ro" + CapAdd: + - "NET_ADMIN" + CapDrop: + - "MKNOD" + GroupAdd: + - "newgroup" + RestartPolicy: + Name: "" + MaximumRetryCount: 0 + AutoRemove: true + NetworkMode: "bridge" + Devices: [] + Ulimits: + - {} + LogConfig: + Type: "json-file" + Config: {} + SecurityOpt: [] + StorageOpt: {} + CgroupParent: "" + VolumeDriver: "" + ShmSize: 67108864 + NetworkingConfig: + EndpointsConfig: + isolated_nw: + IPAMConfig: + IPv4Address: "172.20.30.33" + IPv6Address: "2001:db8:abcd::3033" + LinkLocalIPs: + - "169.254.34.68" + - "fe80::3468" + Links: + - "container_1" + - "container_2" + Aliases: + - "server_x" + - "server_y" + + required: true + responses: + 201: + description: "Container created successfully" + schema: + type: "object" + required: [Id, Warnings] + properties: + Id: + description: "The ID of the created container" + type: "string" + x-nullable: false + Warnings: + description: "Warnings encountered when creating the container" + type: "array" + x-nullable: false + items: + type: "string" + examples: + application/json: + Id: "e90e34656806" + Warnings: [] + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 406: + description: "impossible to attach" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "conflict" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: + - "Container" + /containers/{id}/json: + get: + summary: "Inspect a container" + description: "Return low-level information about a container." + operationId: "GetContainerInspect" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "object" + properties: + Id: + description: "The ID of the container" + type: "string" + Created: + description: "The time the container was created" + type: "string" + Path: + description: "The path to the command being run" + type: "string" + Args: + description: "The arguments to the command being run" + type: "array" + items: + type: "string" + State: + description: "The state of the container." + type: "object" + properties: + Status: + description: "The status of the container. For example, `running` or `exited`." + type: "string" + Running: + description: "Whether this container is running." + type: "boolean" + Paused: + description: "Whether this container is paused." + type: "boolean" + Restarting: + description: "Whether this container is restarting." + type: "boolean" + OOMKilled: + description: "Whether this container has been killed because it ran out of memory." + type: "boolean" + Dead: + type: "boolean" + Pid: + description: "The process ID of this container" + type: "integer" + ExitCode: + description: "The last exit code of this container" + type: "integer" + Error: + type: "string" + StartedAt: + description: "The time when this container was last started." + type: "string" + FinishedAt: + description: "The time when this container last exited." + type: "string" + Image: + description: "The container's image" + type: "string" + ResolvConfPath: + type: "string" + HostnamePath: + type: "string" + HostsPath: + type: "string" + LogPath: + type: "string" + Node: + description: "TODO" + type: "object" + Name: + type: "string" + RestartCount: + type: "integer" + Driver: + type: "string" + MountLabel: + type: "string" + ProcessLabel: + type: "string" + AppArmorProfile: + type: "string" + ExecIDs: + type: "string" + HostConfig: + $ref: "#/definitions/HostConfig" + GraphDriver: + $ref: "#/definitions/GraphDriver" + SizeRw: + description: "The size of files that have been created or changed by this container." + type: "integer" + format: "int64" + SizeRootFs: + description: "The total size of all the files in this container." + type: "integer" + format: "int64" + Mounts: + type: "array" + items: + $ref: "#/definitions/MountPoint" + Config: + $ref: "#/definitions/Config" + NetworkSettings: + $ref: "#/definitions/NetworkConfig" + examples: + application/json: + AppArmorProfile: "" + Args: + - "-c" + - "exit 9" + Config: + AttachStderr: true + AttachStdin: false + AttachStdout: true + Cmd: + - "/bin/sh" + - "-c" + - "exit 9" + Domainname: "" + Entrypoint: null + Env: + - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + ExposedPorts: null + Hostname: "ba033ac44011" + Image: "ubuntu" + Labels: + com.example.vendor: "Acme" + com.example.license: "GPL" + com.example.version: "1.0" + MacAddress: "" + NetworkDisabled: false + OnBuild: null + OpenStdin: false + StdinOnce: false + Tty: false + User: "" + Volumes: + /volumes/data: {} + WorkingDir: "" + StopSignal: "SIGTERM" + Created: "2015-01-06T15:47:31.485331387Z" + Driver: "devicemapper" + ExecIDs: null + HostConfig: + Binds: null + MaximumIOps: 0 + MaximumIOBps: 0 + BlkioWeight: 0 + BlkioWeightDevice: + - {} + BlkioDeviceReadBps: + - {} + BlkioDeviceWriteBps: + - {} + BlkioDeviceReadIOps: + - {} + BlkioDeviceWriteIOps: + - {} + CapAdd: null + CapDrop: null + ContainerIDFile: "" + CpusetCpus: "" + CpusetMems: "" + CpuPercent: 80 + CpuShares: 0 + CpuPeriod: 100000 + Devices: [] + Dns: null + DnsOptions: null + DnsSearch: null + ExtraHosts: null + IpcMode: "" + Links: null + LxcConf: [] + Memory: 0 + MemorySwap: 0 + MemoryReservation: 0 + KernelMemory: 0 + OomKillDisable: false + OomScoreAdj: 500 + NetworkMode: "bridge" + PidMode: "" + PortBindings: {} + Privileged: false + ReadonlyRootfs: false + PublishAllPorts: false + RestartPolicy: + MaximumRetryCount: 2 + Name: "on-failure" + LogConfig: + Config: null + Type: "json-file" + SecurityOpt: null + Sysctls: + net.ipv4.ip_forward: "1" + StorageOpt: null + VolumesFrom: null + Ulimits: + - {} + VolumeDriver: "" + ShmSize: 67108864 + HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname" + HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts" + LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log" + Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39" + Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2" + MountLabel: "" + Name: "/boring_euclid" + NetworkSettings: + Bridge: "" + SandboxID: "" + HairpinMode: false + LinkLocalIPv6Address: "" + LinkLocalIPv6PrefixLen: 0 + Ports: null + SandboxKey: "" + SecondaryIPAddresses: null + SecondaryIPv6Addresses: null + EndpointID: "" + Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + IPAddress: "" + IPPrefixLen: 0 + IPv6Gateway: "" + MacAddress: "" + Networks: + bridge: + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.2" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:12:00:02" + Path: "/bin/sh" + ProcessLabel: "" + ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf" + RestartCount: 1 + State: + Error: "" + ExitCode: 9 + FinishedAt: "2015-01-06T15:47:32.080254511Z" + OOMKilled: false + Dead: false + Paused: false + Pid: 0 + Restarting: false + Running: true + StartedAt: "2015-01-06T15:47:32.072697474Z" + Status: "running" + Mounts: + - Name: "fac362...80535" + Source: "/data" + Destination: "/data" + Driver: "local" + Mode: "ro,Z" + RW: false + Propagation: "" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "size" + in: "query" + type: "boolean" + default: false + description: "Return the size of container as fields `SizeRw` and `SizeRootFs`" + tags: + - "Container" + /containers/{id}/top: + get: + summary: "List processes running inside a container" + description: "On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows." + operationId: "GetContainerTop" + responses: + 200: + description: "no error" + schema: + type: "object" + properties: + Titles: + description: "The ps column titles" + type: "array" + items: + type: "string" + Processes: + description: "Each process running in the container, where each is process is an array of values corresponding to the titles" + type: "array" + items: + type: "array" + items: + type: "string" + examples: + application/json: + Titles: + - "UID" + - "PID" + - "PPID" + - "C" + - "STIME" + - "TTY" + - "TIME" + - "CMD" + Processes: + - + - "root" + - "13642" + - "882" + - "0" + - "17:03" + - "pts/0" + - "00:00:00" + - "/bin/bash" + - + - "root" + - "13735" + - "13642" + - "0" + - "17:06" + - "pts/0" + - "00:00:00" + - "sleep 10" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "ps_args" + in: "query" + description: "The arguments to pass to `ps`. For example, `aux`" + type: "string" + default: "-ef" + tags: + - "Container" + /containers/{id}/logs: + get: + summary: "Get container logs" + description: | + Get stdout and stderr logs from a container. + + Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. + operationId: "GetContainerLogs" + responses: + 101: + description: "logs returned as a stream" + schema: + type: "string" + format: "binary" + 200: + description: "logs returned as a string in response body" + schema: + type: "string" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "follow" + in: "query" + description: | + Return the logs as a stream. + + This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/PostContainerAttach). + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Return logs from stdout" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Return logs from stderr" + type: "boolean" + default: false + - name: "since" + in: "query" + description: "Only return logs since this time, as a UNIX timestamp" + type: "integer" + default: 0 + - name: "timestamps" + in: "query" + description: "Add timestamps to every log line" + type: "boolean" + default: false + - name: "tail" + in: "query" + description: "Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines." + type: "string" + default: "all" + tags: + - "Container" + /containers/{id}/changes: + get: + summary: "Get changes on a container’s filesystem" + description: | + Returns which files in a container's filesystem have been added, deleted, or modified. The `Kind` of modification can be one of: + + - `0`: Modified + - `1`: Added + - `2`: Deleted + operationId: "GetContainerChanges" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + type: "object" + properties: + Path: + description: "Path to file that has changed" + type: "string" + Kind: + description: "Kind of change" + type: "integer" + enum: + - 0 + - 1 + - 2 + examples: + application/json: + - Path: "/dev" + Kind: 0 + - Path: "/dev/kmsg" + Kind: 1 + - Path: "/test" + Kind: 1 + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: + - "Container" + /containers/{id}/export: + get: + summary: "Export a container" + description: "Export the contents of a container as a tarball." + operationId: "GetContainerExport" + produces: + - "application/octet-stream" + responses: + 200: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: + - "Container" + /containers/{id}/stats: + get: + summary: "Get container stats based on resource usage" + description: | + This endpoint returns a live stream of a container’s resource usage statistics. + + The `precpu_stats` is the CPU statistic of last read, which is used for calculating the CPU usage percentage. It is not the same as the `cpu_stats` field. + operationId: "GetContainerStats" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "object" + examples: + application/json: + read: "2015-01-08T22:57:31.547920715Z" + pids_stats: + current: 3 + networks: + eth0: + rx_bytes: 5338 + rx_dropped: 0 + rx_errors: 0 + rx_packets: 36 + tx_bytes: 648 + tx_dropped: 0 + tx_errors: 0 + tx_packets: 8 + eth5: + rx_bytes: 4641 + rx_dropped: 0 + rx_errors: 0 + rx_packets: 26 + tx_bytes: 690 + tx_dropped: 0 + tx_errors: 0 + tx_packets: 9 + memory_stats: + stats: + total_pgmajfault: 0 + cache: 0 + mapped_file: 0 + total_inactive_file: 0 + pgpgout: 414 + rss: 6537216 + total_mapped_file: 0 + writeback: 0 + unevictable: 0 + pgpgin: 477 + total_unevictable: 0 + pgmajfault: 0 + total_rss: 6537216 + total_rss_huge: 6291456 + total_writeback: 0 + total_inactive_anon: 0 + rss_huge: 6291456 + hierarchical_memory_limit: 67108864 + total_pgfault: 964 + total_active_file: 0 + active_anon: 6537216 + total_active_anon: 6537216 + total_pgpgout: 414 + total_cache: 0 + inactive_anon: 0 + active_file: 0 + pgfault: 964 + inactive_file: 0 + total_pgpgin: 477 + max_usage: 6651904 + usage: 6537216 + failcnt: 0 + limit: 67108864 + blkio_stats: {} + cpu_stats: + cpu_usage: + percpu_usage: + - 8646879 + - 24472255 + - 36438778 + - 30657443 + usage_in_usermode: 50000000 + total_usage: 100215355 + usage_in_kernelmode: 30000000 + system_cpu_usage: 739306590000000 + throttling_data: + periods: 0 + throttled_periods: 0 + throttled_time: 0 + precpu_stats: + cpu_usage: + percpu_usage: + - 8646879 + - 24350896 + - 36438778 + - 30657443 + usage_in_usermode: 50000000 + total_usage: 100093996 + usage_in_kernelmode: 30000000 + system_cpu_usage: 9492140000000 + throttling_data: + periods: 0 + throttled_periods: 0 + throttled_time: 0 + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "stream" + in: "query" + description: "Stream the output. If false, the stats will be output once and then it will disconnect." + type: "boolean" + default: true + tags: + - "Container" + /containers/{id}/resize: + post: + summary: "Resize a container TTY" + description: "Resize the TTY for a container. You must restart the container for the resize to take effect." + operationId: "PostContainerResize" + consumes: + - "application/octet-stream" + produces: + - "text/plain" + responses: + 200: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "cannot resize container" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "h" + in: "query" + description: "Height of the tty session in characters" + type: "integer" + - name: "w" + in: "query" + description: "Width of the tty session in characters" + type: "integer" + tags: + - "Container" + /containers/{id}/start: + post: + summary: "Start a container" + operationId: "PostContainerStart" + responses: + 204: + description: "no error" + 304: + description: "container already started" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "detachKeys" + in: "query" + description: "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`." + type: "string" + tags: + - "Container" + /containers/{id}/stop: + post: + summary: "Stop a container" + operationId: "PostContainerStop" + responses: + 204: + description: "no error" + 304: + description: "container already stopped" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "t" + in: "query" + description: "Number of seconds to wait before killing the container" + type: "integer" + tags: + - "Container" + /containers/{id}/restart: + post: + summary: "Restart a container" + operationId: "PostContainerRestart" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "t" + in: "query" + description: "Number of seconds to wait before killing the container" + type: "integer" + tags: + - "Container" + /containers/{id}/kill: + post: + summary: "Kill a container" + description: "Send a POSIX signal to a container, defaulting to killing to the container." + operationId: "PostContainerKill" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "signal" + in: "query" + description: "Signal to send to the container as an integer or string (e.g. `SIGINT`)" + type: "string" + default: "SIGKILL" + tags: + - "Container" + /containers/{id}/update: + post: + summary: "Update a container" + description: "Change various configuration options of a container without having to recreate it." + operationId: "ContainerUpdate" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 200: + description: "The container has been updated." + schema: + type: "object" + properties: + Warnings: + type: "array" + items: + type: "string" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "update" + in: "body" + required: true + schema: + allOf: + - $ref: "#/definitions/Resources" + - type: "object" + properties: + RestartPolicy: + $ref: "#/definitions/RestartPolicy" + example: + BlkioWeight: 300 + CpuShares: 512 + CpuPeriod: 100000 + CpuQuota: 50000 + CpusetCpus: "0,1" + CpusetMems: "0" + Memory: 314572800 + MemorySwap: 514288000 + MemoryReservation: 209715200 + KernelMemory: 52428800 + RestartPolicy: + MaximumRetryCount: 4 + Name: "on-failure" + tags: + - "Container" + /containers/{id}/rename: + post: + summary: "Rename a container" + operationId: "PostContainerRename" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 409: + description: "name already in use" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "name" + in: "query" + required: true + description: "New name for the container" + type: "string" + tags: + - "Container" + /containers/{id}/pause: + post: + summary: "Pause a container" + description: | + Use the cgroups freezer to suspend all processes in a container. + + Traditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the cgroups freezer the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed. + operationId: "PostContainerPause" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: + - "Container" + /containers/{id}/unpause: + post: + summary: "Unpause a container" + description: "Resume a container which has been paused." + operationId: "PostContainerUnpause" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: + - "Container" + /containers/{id}/attach: + post: + summary: "Attach to a container" + description: | + Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached. + + Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything. + + See [the documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details. + + ### Hijacking + + This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket. + + This is the response from the daemon for an attach request: + + ``` + HTTP/1.1 200 OK + Content-Type: application/vnd.docker.raw-stream + + [STREAM] + ``` + + After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server. + + To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers. + + For example, the client sends this request to upgrade the connection: + + ``` + POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 + Upgrade: tcp + Connection: Upgrade + ``` + + The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream: + + ``` + HTTP/1.1 101 UPGRADED + Content-Type: application/vnd.docker.raw-stream + Connection: Upgrade + Upgrade: tcp + + [STREAM] + ``` + + ### Stream format + + When the TTY setting is disabled in [`POST /containers/create`](#operation/PostContainerCreate), the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload. + + The header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`). + + It is encoded on the first eight bytes like this: + + ```go + header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} + ``` + + `STREAM_TYPE` can be: + + - 0: `stdin` (is written on `stdout`) + - 1: `stdout` + - 2: `stderr` + + `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian. + + Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`. + + The simplest way to implement this protocol is the following: + + 1. Read 8 bytes. + 2. Choose `stdout` or `stderr` depending on the first byte. + 3. Extract the frame size from the last four bytes. + 4. Read the extracted size and output it on the correct output. + 5. Goto 1. + + ### Stream format when using a TTY + + When the TTY setting is enabled in [`POST /containers/create`](#operation/PostContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's `stdin`. + + operationId: "PostContainerAttach" + produces: + - "application/vnd.docker.raw-stream" + responses: + 101: + description: "no error, hints proxy about hijacking" + 200: + description: "no error, no upgrade header found" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "detachKeys" + in: "query" + description: "Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`." + type: "string" + - name: "logs" + in: "query" + description: | + Replay previous logs from the container. + + This is useful for attaching to a container that has started and you want to output everything since the container started. + + If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output. + type: "boolean" + default: false + - name: "stream" + in: "query" + description: "Stream attached streams from the the time the request was made onwards" + type: "boolean" + default: false + - name: "stdin" + in: "query" + description: "Attach to stdin" + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Attach to stdout" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Attach to stderr" + type: "boolean" + default: false + tags: + - "Container" + /containers/{id}/attach/ws: + get: + summary: "Attach to a container via a websocket" + operationId: "PostContainerAttachWebsocket" + responses: + 101: + description: "no error, hints proxy about hijacking" + 200: + description: "no error, no upgrade header found" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "detachKeys" + in: "query" + description: "Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`." + type: "string" + - name: "logs" + in: "query" + description: "Return logs" + type: "boolean" + default: false + - name: "stream" + in: "query" + description: "Return stream" + type: "boolean" + default: false + - name: "stdin" + in: "query" + description: "Attach to stdin" + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Attach to stdout" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Attach to stderr" + type: "boolean" + default: false + tags: + - "Container" + /containers/{id}/wait: + post: + summary: "Wait for a container" + description: "Block until a container stops, then returns the exit code." + operationId: "ContainerWait" + produces: ["application/json"] + responses: + 200: + description: "The container has exit." + schema: + type: "object" + required: [StatusCode] + properties: + StatusCode: + description: "Exit code of the container" + type: "integer" + x-nullable: false + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: + - "Container" + /containers/{id}: + delete: + summary: "Remove a container" + operationId: "DeleteContainer" + responses: + 204: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "v" + in: "query" + description: "Remove the volumes associated with the container." + type: "boolean" + default: false + - name: "force" + in: "query" + description: "If the container is running, kill it before removing it." + type: "boolean" + default: false + tags: + - "Container" + /containers/{id}/archive: + head: + summary: "Get information about files in a container" + description: "A response header `X-Docker-Container-Path-Stat` is return containing a base64 - encoded JSON object with some filesystem header information about the path." + operationId: "HeadContainerArchive" + responses: + 200: + description: "no error" + headers: + X-Docker-Container-Path-Stat: + type: "string" + description: "TODO" + 400: + description: "client error, bad parameter, details in JSON response body, one of: must specify path parameter (path cannot be empty) not a directory (path was asserted to be a directory but exists as a file)" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "client error, resource not found, one of: 1) no such container (container id does not exist) 2) no such file or directory (path resource does not exist)" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "path" + in: "query" + required: true + description: "Resource in the container’s filesystem to archive." + type: "string" + tags: + - "Container" + get: + summary: "Get an archive of a filesystem resource in a container" + description: "Get an tar archive of a resource in the filesystem of container id." + operationId: "GetContainerArchive" + produces: + - "application/x-tar" + responses: + 200: + description: "no error" + 400: + description: "client error, bad parameter, details in JSON response body, one of: must specify path parameter (path cannot be empty) not a directory (path was asserted to be a directory but exists as a file)" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "client error, resource not found, one of: 1) no such container (container id does not exist) 2) no such file or directory (path resource does not exist)" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "path" + in: "query" + required: true + description: "Resource in the container’s filesystem to archive." + type: "string" + tags: + - "Container" + put: + summary: "Extract an archive of files or folders to a directory in a container" + description: "Upload a tar archive to be extracted to a path in the filesystem of container id." + operationId: "PutContainerArchive" + consumes: + - "application/x-tar" + - "application/octet-stream" + responses: + 200: + description: "The content was extracted successfully" + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 403: + description: "Permission denied, the volume or container rootfs is marked as read-only." + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "No such container or path does not exist inside the container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "path" + in: "query" + required: true + description: "Path to a directory in the container to extract the archive’s contents into. " + type: "string" + - name: "noOverwriteDirNonDir" + in: "query" + description: "If “1”, “true”, or “True” then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa." + type: "string" + - name: "inputStream" + in: "body" + required: true + description: "The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." + schema: + type: "string" + tags: + - "Container" + /images/json: + get: + summary: "List Images" + 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." + operationId: "GetImageList" + produces: + - "application/json" + responses: + 200: + description: "Summary image data for the images matching the query" + schema: + type: "array" + items: + $ref: "#/definitions/ImageSummary" + examples: + application/json: + - RepoTags: + - "ubuntu:12.04" + - "ubuntu:precise" + - "ubuntu:latest" + Id: "8dbd9e392a964056420e5d58ca5cc376ef18e2de93b5cc90e868a1bbc8318c1c" + Created: 1365714795 + Size: 131506275 + VirtualSize: 131506275 + Labels: {} + - RepoTags: + - "ubuntu:12.10" + - "ubuntu:quantal" + ParentId: "27cf784147099545" + Id: "b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc" + Created: 1364102658 + Size: 24653 + VirtualSize: 180116135 + Labels: + com.example.version: "v1" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "all" + in: "query" + description: "Show all images. Only images from a final layer (no children) are shown by default." + type: "boolean" + default: false + - name: "filters" + in: "query" + description: "A JSON encoded value of the filters (a `map[string][]string`) to process on the containers list" + type: "string" + - name: "filter" + in: "query" + description: "Only return images with the specified name." + type: "string" + - name: "digests" + in: "query" + description: "Show digest information as a `RepoDigests` field on each image." + type: "boolean" + default: false + tags: + - "Image" + /build: + post: + summary: "Build an image" + description: | + Build an image from a tar archive with a Dockerfile in it. + + 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/). + + The build is canceled if the client drops the connection by quitting or being killed. + operationId: "PostImageBuild" + consumes: + - "application/octet-stream" + produces: + - "application/json" + parameters: + - name: "inputStream" + in: "body" + description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." + schema: + type: "string" + format: "binary" + - name: "dockerfile" + in: "query" + description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an individual filename." + type: "string" + default: "Dockerfile" + - name: "t" + in: "query" + 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." + type: "string" + - name: "remote" + in: "query" + 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." + type: "string" + - name: "q" + in: "query" + description: "Suppress verbose build output." + type: "boolean" + default: false + - name: "nocache" + in: "query" + description: "Do not use the cache when building the image." + type: "boolean" + default: false + - name: "pull" + in: "query" + description: "Attempt to pull the image even if an older image exists locally." + type: "string" + - name: "rm" + in: "query" + description: "Remove intermediate containers after a successful build." + type: "boolean" + default: true + - name: "forcerm" + in: "query" + description: "Always remove intermediate containers, even upon failure." + type: "boolean" + default: false + - name: "memory" + in: "query" + description: "Set memory limit for build." + type: "integer" + - name: "memswap" + in: "query" + description: "Total memory (memory + swap). Set as `-1` to disable swap." + type: "integer" + - name: "cpushares" + in: "query" + description: "CPU shares (relative weight)." + type: "integer" + - name: "cpusetcpus" + in: "query" + description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)." + type: "string" + - name: "cpuperiod" + in: "query" + description: "The length of a CPU period in microseconds." + type: "integer" + - name: "cpuquota" + in: "query" + description: "Microseconds of CPU time that the container can get in a CPU period." + type: "integer" + - name: "buildargs" + in: "query" + description: "JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the Dockerfile’s RUN instruction, or for variable expansion in other Dockerfile instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)" + type: "integer" + - name: "shmsize" + in: "query" + description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB." + type: "integer" + - name: "labels" + in: "query" + description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs." + type: "string" + - name: "Content-type" + in: "header" + type: "string" + enum: + - "application/tar" + default: "application/tar" + - name: "X-Registry-Config" + in: "header" + description: | + This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. + + The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: + + ``` + { + "docker.example.com": { + "username": "janedoe", + "password": "hunter2" + }, + "https://index.docker.io/v1/": { + "username": "mobydock", + "password": "conta1n3rize14" + } + } + ``` + + 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. + type: "string" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: + - "Image" + /images/create: + post: + summary: "Create an image" + description: "Create an image by either pulling it from a registry or importing it." + operationId: "PostImageCreate" + consumes: + - "text/plain" + - "application/octet-stream" + produces: + - "application/json" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "fromImage" + in: "query" + 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." + type: "string" + - name: "fromSrc" + in: "query" + 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." + type: "string" + - name: "repo" + in: "query" + 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." + type: "string" + - name: "tag" + in: "query" + description: "Tag or digest." + type: "string" + - name: "inputImage" + in: "body" + description: "Image content if the value `-` has been specified in fromSrc query parameter" + schema: + type: "string" + required: false + - name: "X-Registry-Auth" + in: "header" + description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)" + type: "string" + tags: + - "Image" + /images/{name}/json: + get: + summary: "Inspect an image" + description: "Return low-level information about an image." + operationId: "GetImageInspect" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/Image" + examples: + application/json: + Id: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c" + Container: "cb91e48a60d01f1e27028b4fc6819f4f290b3cf12496c8176ec714d0d390984a" + Comment: "" + Os: "linux" + Architecture: "amd64" + Parent: "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" + ContainerConfig: + Tty: false + Hostname: "e611e15f9c9d" + Volumes: null + Domainname: "" + AttachStdout: false + PublishService: "" + AttachStdin: false + OpenStdin: false + StdinOnce: false + NetworkDisabled: false + OnBuild: [] + Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" + User: "" + WorkingDir: "" + Entrypoint: null + MacAddress: "" + AttachStderr: false + Labels: + com.example.license: "GPL" + com.example.version: "1.0" + com.example.vendor: "Acme" + Env: + - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + ExposedPorts: null + Cmd: + - "/bin/sh" + - "-c" + - "#(nop) LABEL com.example.vendor=Acme com.example.license=GPL com.example.version=1.0" + DockerVersion: "1.9.0-dev" + VirtualSize: 188359297 + Size: 0 + Author: "" + Created: "2015-09-10T08:30:53.26995814Z" + GraphDriver: + Name: "aufs" + Data: null + RepoDigests: + - "localhost:5000/test/busybox/example@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf" + RepoTags: + - "example:1.0" + - "example:latest" + - "example:stable" + Config: + Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" + NetworkDisabled: false + OnBuild: [] + StdinOnce: false + PublishService: "" + AttachStdin: false + OpenStdin: false + Domainname: "" + AttachStdout: false + Tty: false + Hostname: "e611e15f9c9d" + Volumes: null + Cmd: + - "/bin/bash" + ExposedPorts: null + Env: + - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + Labels: + com.example.vendor: "Acme" + com.example.version: "1.0" + com.example.license: "GPL" + Entrypoint: null + MacAddress: "" + AttachStderr: false + WorkingDir: "" + User: "" + RootFS: + Type: "layers" + Layers: + - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6" + - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such image: someimage (tag: latest)" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or id" + type: "string" + required: true + tags: + - "Image" + /images/{name}/history: + get: + summary: "Get the history of an image" + description: "Return parent layers of an image." + operationId: "GetImageHistory" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "array" + items: + type: "object" + properties: + Id: + type: "string" + Created: + type: "integer" + format: "int64" + CreatedBy: + type: "string" + Tags: + type: "array" + items: + type: "string" + Size: + type: "integer" + format: "int64" + Comment: + type: "string" + examples: + application/json: + - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710" + Created: 1398108230 + CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /" + Tags: + - "ubuntu:lucid" + - "ubuntu:10.04" + Size: 182964289 + Comment: "" + - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8" + Created: 1398108222 + CreatedBy: "/bin/sh -c #(nop) MAINTAINER Tianon Gravi - mkimage-debootstrap.sh -i iproute,iputils-ping,ubuntu-minimal -t lucid.tar.xz lucid http://archive.ubuntu.com/ubuntu/" + Tags: null + Size: 0 + Comment: "" + - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158" + Created: 1371157430 + CreatedBy: "" + Tags: + - "scratch12:latest" + - "scratch:latest" + Size: 0 + Comment: "Imported from -" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID" + type: "string" + required: true + tags: + - "Image" + /images/{name}/push: + post: + summary: "Push an image" + description: | + Push an image to a registry. + + If you wish to push an image on to a private registry, that image must already have a tag which references the registry. For example, `registry.example.com/myimage:latest`. + + The push is cancelled if the HTTP connection is closed. + operationId: "PostImagePush" + consumes: + - "application/octet-stream" + responses: + 200: + description: "No error" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID." + type: "string" + required: true + - name: "tag" + in: "query" + description: "The tag to associate with the image on the registry." + type: "string" + - name: "X-Registry-Auth" + in: "header" + description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)" + type: "string" + required: true + tags: + - "Image" + /images/{name}/tag: + post: + summary: "Tag an image" + description: "Tag an image so that it becomes part of a repository." + operationId: "PostImageTag" + responses: + 201: + description: "No error" + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Conflict" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID to tag." + type: "string" + required: true + - name: "repo" + in: "query" + description: "The repository to tag in. For example, `someuser/someimage`." + type: "string" + - name: "tag" + in: "query" + description: "The name of the new tag." + type: "string" + tags: + - "Image" + /images/{name}: + delete: + summary: "Remove an image" + description: | + Remove an image, along with any untagged parent images that were referenced by that image. + + Images can't be removed if they have descendant images, are being used by a running container or are being used by a build. + operationId: "DeleteImage" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "array" + items: + type: "object" + properties: + Untagged: + description: "The image ID of an image that was untagged" + type: "string" + Deleted: + description: "The image ID of an image that was deleted" + type: "string" + examples: + application/json: + - Untagged: "3e2f21a89f" + - Deleted: "3e2f21a89f" + - Deleted: "53b4f83ac9" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Conflict" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID" + type: "string" + required: true + - name: "force" + in: "query" + description: "Remove the image even if it is being used by stopped containers or has other tags" + type: "boolean" + default: false + - name: "noprune" + in: "query" + description: "Do not delete untagged parent images" + type: "boolean" + default: false + tags: + - "Image" + /images/search: + get: + summary: "Search images" + description: "Search for an image on Docker Hub." + operationId: "GetImageSearch" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "array" + items: + type: "object" + properties: + description: + type: "string" + is_official: + type: "boolean" + is_automated: + type: "boolean" + name: + type: "string" + star_count: + type: "integer" + examples: + application/json: + - description: "" + is_official: false + is_automated: false + name: "wma55/u1210sshd" + star_count: 0 + - description: "" + is_official: false + is_automated: false + name: "jdswinbank/sshd" + star_count: 0 + - description: "" + is_official: false + is_automated: false + name: "vgauthier/sshd" + star_count: 0 + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "term" + in: "query" + description: "Term to search" + type: "string" + required: true + - name: "limit" + in: "query" + description: "Maximum number of results to return" + type: "integer" + - name: "filters" + in: "query" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: + + - `stars=` + - `is-automated=(true|false)` + - `is-official=(true|false)` + type: "string" + tags: + - "Image" + /auth: + post: + summary: "Check auth configuration" + description: "Validate credentials for a registry and, if available, get an identity token for accessing the registry without password." + operationId: "Authenticate" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 200: + description: "An identity token was generated successfully." + schema: + type: "object" + required: [Status] + properties: + Status: + description: "The status of the authentication" + type: "string" + x-nullable: false + IdentityToken: + description: "An opaque token used to authenticate a user after a successful login" + type: "string" + x-nullable: false + examples: + application/json: + Status: "Login Succeeded" + IdentityToken: "9cbaf023786cd7..." + 204: + description: "No error" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "authConfig" + in: "body" + description: "Authentication to check" + schema: + $ref: "#/definitions/AuthConfig" + tags: ["Registry"] + /info: + get: + summary: "Get system information" + operationId: "getSystemInformation" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "object" + properties: + Architecture: + type: "string" + Containers: + type: "integer" + ContainersRunning: + type: "integer" + ContainersStopped: + type: "integer" + ContainersPaused: + type: "integer" + CpuCfsPeriod: + type: "boolean" + CpuCfsQuota: + type: "boolean" + Debug: + type: "boolean" + DiscoveryBackend: + type: "string" + DockerRootDir: + type: "string" + Driver: + type: "string" + DriverStatus: + type: "array" + items: + type: "array" + items: + type: "string" + SystemStatus: + type: "array" + items: + type: "array" + items: + type: "string" + Plugins: + type: "object" + properties: + Volume: + type: "array" + items: + type: "string" + Network: + type: "array" + items: + type: "string" + ExecutionDriver: + type: "string" + ExperimentalBuild: + type: "boolean" + HttpProxy: + type: "string" + HttpsProxy: + type: "string" + ID: + type: "string" + IPv4Forwarding: + type: "boolean" + Images: + type: "integer" + IndexServerAddress: + type: "string" + InitPath: + type: "string" + InitSha1: + type: "string" + KernelVersion: + type: "string" + Labels: + type: "array" + items: + type: "string" + MemTotal: + type: "integer" + MemoryLimit: + type: "boolean" + NCPU: + type: "integer" + NEventsListener: + type: "integer" + NFd: + type: "integer" + NGoroutines: + type: "integer" + Name: + type: "string" + NoProxy: + type: "string" + OomKillDisable: + type: "boolean" + OSType: + type: "string" + OomScoreAdj: + type: "integer" + OperatingSystem: + type: "string" + RegistryConfig: + type: "object" + properties: + IndexConfigs: + type: "object" + additionalProperties: + type: "object" + properties: + Mirrors: + type: "array" + items: + type: "string" + Name: + type: "string" + Official: + type: "boolean" + Secure: + type: "boolean" + InsecureRegistryCIDRs: + type: "array" + items: + type: "string" + SwapLimit: + type: "boolean" + SystemTime: + type: "string" + ServerVersion: + type: "string" + examples: + application/json: + Architecture: "x86_64" + ClusterStore: "etcd://localhost:2379" + CgroupDriver: "cgroupfs" + Containers: 11 + ContainersRunning: 7 + ContainersStopped: 3 + ContainersPaused: 1 + CpuCfsPeriod: true + CpuCfsQuota: true + Debug: false + DockerRootDir: "/var/lib/docker" + Driver: "btrfs" + DriverStatus: + - + - "" + ExperimentalBuild: false + HttpProxy: "http://test:test@localhost:8080" + HttpsProxy: "https://test:test@localhost:8080" + ID: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS" + IPv4Forwarding: true + Images: 16 + IndexServerAddress: "https://index.docker.io/v1/" + InitPath: "/usr/bin/docker" + InitSha1: "" + KernelMemory: true + KernelVersion: "3.12.0-1-amd64" + Labels: + - "storage=ssd" + MemTotal: 2099236864 + MemoryLimit: true + NCPU: 1 + NEventsListener: 0 + NFd: 11 + NGoroutines: 21 + Name: "prod-server-42" + NoProxy: "9.81.1.160" + OomKillDisable: true + OSType: "linux" + OperatingSystem: "Boot2Docker" + Plugins: + Volume: + - "local" + Network: + - "null" + - "host" + - "bridge" + RegistryConfig: + IndexConfigs: + docker.io: + Mirrors: null + Name: "docker.io" + Official: true + Secure: true + InsecureRegistryCIDRs: + - "127.0.0.0/8" + SecurityOptions: + - "apparmor" + - "seccomp" + - "selinux" + ServerVersion: "1.9.0" + SwapLimit: false + SystemStatus: + - + - "State" + - "Healthy" + SystemTime: "2015-03-10T11:11:23.730591467-07:00" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: + - "Misc" + /version: + get: + summary: "Get version" + description: "Returns the version of Docker that is running and various information about the system that Docker is running on." + operationId: "getVersion" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "object" + properties: + Version: + type: "string" + ApiVersion: + type: "string" + GitCommit: + type: "string" + GoVersion: + type: "string" + Os: + type: "string" + Arch: + type: "string" + KernelVersion: + type: "string" + Experimental: + type: "boolean" + BuildTime: + type: "string" + examples: + application/json: + Version: "1.13.0" + Os: "linux" + KernelVersion: "3.19.0-23-generic" + GoVersion: "go1.6.3" + GitCommit: "deadbee" + Arch: "amd64" + ApiVersion: "1.25" + BuildTime: "2016-06-14T07:09:13.444803460+00:00" + Experimental: true + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: + - "Misc" + /_ping: + get: + summary: "Ping" + description: "This is a dummy endpoint you can use to test if the server is accessible." + operationId: "ping" + produces: + - "text/plain" + responses: + 200: + description: "no error" + schema: + type: "string" + example: "OK" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: + - "Misc" + /commit: + post: + summary: "Create a new image from a container" + operationId: "PostImageCommit" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/IdResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "containerConfig" + in: "body" + description: "The container configuration" + schema: + $ref: "#/definitions/Config" + - name: "container" + in: "query" + description: "The ID or name of the container to commit" + type: "string" + - name: "repo" + in: "query" + description: "Repository name for the created image" + type: "string" + - name: "tag" + in: "query" + description: "Tag name for the create image" + type: "string" + - name: "comment" + in: "query" + description: "Commit message" + type: "string" + - name: "author" + in: "query" + description: "Author of the image (e.g., `John Hannibal Smith `)" + type: "string" + - name: "pause" + in: "query" + description: "Whether to pause the container before committing" + type: "boolean" + default: true + - name: "changes" + in: "query" + description: "Dockerfile instructions to apply while committing" + type: "string" + tags: + - "Image" + /events: + get: + summary: "Monitor events" + description: | + Stream real-time events from the server. + + Various objects within Docker report events when something happens to them. + + Containers report these events: `attach, commit, copy, create, destroy, detach, die, exec_create, exec_detach, exec_start, export, kill, oom, pause, rename, resize, restart, start, stop, top, unpause, update` + + Images report these events: `delete, import, load, pull, push, save, tag, untag` + + Volumes report these events: `create, mount, unmount, destroy` + + Networks report these events: `create, connect, disconnect, destroy` + + The Docker daemon reports these events: `reload` + + operationId: "getEvents" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "object" + properties: + Type: + description: "The type of object emitting the event" + type: "string" + Action: + description: "The type of event" + type: "string" + Actor: + type: "object" + properties: + ID: + description: "The ID of the object emitting the event" + type: "string" + Attributes: + description: "Various key/value attributes of the object, depending on its type" + type: "object" + additionalProperties: + type: "string" + time: + description: "Timestamp of event" + type: "integer" + timeNano: + description: "Timestamp of event, with nanosecond accuracy" + type: "integer" + examples: + application/json: + Type: "container" + Action: "create" + Actor: + ID: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" + Attributes: + com.example.some-label: "some-label-value" + image: "alpine" + name: "my-container" + time: 1461943101 + timeNano: 1461943101381709551 + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "since" + in: "query" + description: "Show events created since this timestamp then stream new events" + type: "string" + - name: "until" + in: "query" + description: "Show events created until this timestamp then stop streaming" + type: "string" + - name: "filters" + in: "query" + description: | + A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: + + - `container=` container name or ID + - `event=` event type + - `image=` image name or ID + - `label=` image or container label + - `type=` object to filter by, one of `container`, `image`, `volume`, `network`, or `daemon` + - `volume=` volume name or ID + - `network=` network name or ID + - `daemon=` daemon name or ID + type: "string" + tags: + - "Misc" + /images/{name}/get: + get: + summary: "Export an image" + description: | + Get a tarball containing all images and metadata for a repository. + + 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. + + ### Image tarball format + + An image tarball contains one directory per image layer (named using its long ID), each containing these files: + + - `VERSION`: currently `1.0` - the file format version + - `json`: detailed layer information, similar to `docker inspect layer_id` + - `layer.tar`: A tarfile containing the filesystem changes in this layer + + The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. + + 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. + + ```json + { + "hello-world": { + "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1" + } + } + ``` + operationId: "GetImage" + produces: + - "application/x-tar" + responses: + 200: + description: "no error" + schema: + type: "string" + format: "binary" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID" + type: "string" + required: true + tags: + - "Image" + /images/get: + get: + summary: "Export several images" + description: | + Get a tarball containing all images and metadata for several image repositories. + + For each value of the `names` parameter: if it is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned; if it is an image ID, similarly only that image (and its parents) are returned and there would be no names referenced in the 'repositories' file for this image ID. + + For details on the format, see [the export image endpoint](#operation/GetImage). + operationId: "GetImageSaveAll" + produces: + - "application/x-tar" + responses: + 200: + description: "no error" + schema: + type: "string" + format: "binary" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "names" + in: "query" + description: "Image names to filter by" + type: "array" + items: + type: "string" + tags: + - "Image" + /images/load: + post: + summary: "Import images" + description: | + Load a set of images and tags into a repository. + + For details on the format, see [the export image endpoint](#operation/GetImage). + operationId: "PostImageLoad" + consumes: + - "application/x-tar" + produces: + - "application/json" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "imagesTarball" + in: "body" + description: "Tar archive containing images" + schema: + type: "string" + format: "binary" + tags: + - "Image" + /containers/{id}/exec: + post: + summary: "Create an exec instance" + description: "Run a command inside a running container." + operationId: "PostContainerExec" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/IdResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 409: + description: "container is paused" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "execConfig" + in: "body" + description: "Exec configuration" + schema: + type: "object" + properties: + AttachStdin: + type: "boolean" + description: "Attach to `stdin` of the exec command." + AttachStdout: + type: "boolean" + description: "Attach to `stdout` of the exec command." + AttachStderr: + type: "boolean" + description: "Attach to `stderr` of the exec command." + DetachKeys: + type: "string" + description: "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`." + Tty: + type: "boolean" + description: "Allocate a pseudo-TTY." + Cmd: + type: "array" + description: "Command to run, as a string or array of strings." + items: + type: "string" + example: + AttachStdin: false + AttachStdout: true + AttachStderr: true + DetachKeys: "ctrl-p,ctrl-q" + Tty: false + Cmd: + - "date" + required: true + - name: "id" + in: "path" + description: "ID or name of container" + type: "string" + required: true + tags: + - "Exec" + /exec/{id}/start: + post: + summary: "Start an exec instance" + description: "Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command." + operationId: "PostExecStart" + consumes: + - "application/json" + produces: + - "application/vnd.docker.raw-stream" + responses: + 200: + description: "No error" + 404: + description: "No such exec instance" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Container is stopped or paused" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "execStartConfig" + in: "body" + schema: + type: "object" + properties: + Detach: + type: "boolean" + description: "Detach from the command." + Tty: + type: "boolean" + description: "Allocate a pseudo-TTY." + example: + Detach: false + Tty: false + - name: "id" + in: "path" + description: "Exec instance ID" + required: true + type: "string" + tags: + - "Exec" + /exec/{id}/resize: + post: + summary: "Resize an exec instance" + description: "Resize the TTY session used by an exec instance. This endpoint only works if `tty` was specified as part of creating and starting the exec instance." + operationId: "PostExecResize" + responses: + 201: + description: "No error" + 404: + description: "No such exec instance" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Exec instance ID" + required: true + type: "string" + - name: "h" + in: "query" + description: "Height of the TTY session in characters" + type: "integer" + - name: "w" + in: "query" + description: "Width of the TTY session in characters" + type: "integer" + tags: + - "Exec" + /exec/{id}/json: + get: + summary: "Inspect an exec instance" + description: "Return low-level information about an exec instance." + operationId: "PostExecInspect" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "object" + properties: + ID: + type: "string" + Running: + type: "boolean" + ExitCode: + type: "integer" + ProcessConfig: + $ref: "#/definitions/ProcessConfig" + OpenStdin: + type: "boolean" + OpenStderr: + type: "boolean" + OpenStdout: + type: "boolean" + ContainerID: + type: "string" + examples: + application/json: + CanRemove: false + ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126" + DetachKeys: "" + ExitCode: 2 + ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b" + OpenStderr: true + OpenStdin: true + OpenStdout: true + ProcessConfig: + arguments: + - "-c" + - "exit 2" + entrypoint: "sh" + privileged: false + tty: true + user: "1000" + Running: false + 404: + description: "No such exec instance" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Exec instance ID" + required: true + type: "string" + tags: + - "Exec" + + /volumes: + get: + summary: "List volumes" + operationId: "VolumesList" + produces: ["application/json"] + responses: + 200: + description: "Summary volume data that matches the query" + schema: + type: "object" + required: [Volumes, Warnings] + properties: + Volumes: + type: "array" + x-nullable: false + description: "List of volumes" + items: + $ref: "#/definitions/Volume" + Warnings: + type: "array" + x-nullable: false + description: "Warnings that occurred when fetching the list of volumes" + items: + type: "string" + + examples: + application/json: + Volumes: + - Name: "tardis" + Driver: "local" + Mountpoint: "/var/lib/docker/volumes/tardis" + Labels: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Scope: "local" + Warnings: [] + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + description: | + JSON encoded value of the filters (a `map[string][]string`) to + process on the volumes list. Available filters: + + - `name=` Matches all or part of a volume name. + - `dangling=` When set to `true` (or `1`), returns all + volumes that are not in use by a container. When set to `false` + (or `0`), only volumes that are in use by one or more + containers are returned. + - `driver=` Matches all or part of a volume + driver name. + type: "string" + format: "json" + tags: ["Volume"] + + /volumes/create: + post: + summary: "Create a volume" + operationId: "VolumesCreate" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 201: + description: "The volume was created successfully" + schema: + $ref: "#/definitions/Volume" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "volumeConfig" + in: "body" + required: true + description: "Volume configuration" + schema: + type: "object" + properties: + Name: + description: "The new volume's name. If not specified, Docker generates a name." + type: "string" + x-nullable: false + Driver: + description: "Name of the volume driver to use." + type: "string" + default: "local" + x-nullable: false + DriverOpts: + description: "A mapping of driver options and values. These options are passed directly to the driver and are driver specific." + type: "object" + additionalProperties: + type: "string" + Labels: + description: "A mapping of arbitrary key/value data to set on the volume." + type: "object" + additionalProperties: + type: "string" + example: + Name: "tardis" + Labels: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Driver: "custom" + tags: ["Volume"] + + /volumes/{name}: + get: + summary: "Inspect a volume" + operationId: "VolumesInspect" + produces: ["application/json"] + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/Volume" + 404: + description: "No such volume" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + required: true + description: "Volume name or ID" + type: "string" + tags: ["Volume"] + + delete: + summary: "Remove a volume" + description: "Instruct the driver to remove the volume." + operationId: "VolumesDelete" + responses: + 204: + description: "The volume was removed" + 404: + description: "No such volume or volume driver" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Volume is in use and cannot be removed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + required: true + description: "Volume name or ID" + type: "string" + tags: ["Volume"] + + /networks: + get: + summary: "List networks" + operationId: "NetworksList" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "array" + items: + $ref: "#/definitions/Network" + examples: + application/json: + - Name: "bridge" + Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566" + Scope: "local" + Driver: "bridge" + EnableIPv6: false + Internal: false + IPAM: + Driver: "default" + Config: + - + Subnet: "172.17.0.0/16" + Containers: + 39b69226f9d79f5634485fb236a23b2fe4e96a0a94128390a7fbbcc167065867: + EndpointID: "ed2419a97c1d9954d05b46e462e7002ea552f216e9b136b80a7db8d98b442eda" + MacAddress: "02:42:ac:11:00:02" + IPv4Address: "172.17.0.2/16" + IPv6Address: "" + Options: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" + com.docker.network.bridge.name: "docker0" + com.docker.network.driver.mtu: "1500" + - Name: "none" + Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794" + Scope: "local" + Driver: "null" + EnableIPv6: false + Internal: false + IPAM: + Driver: "default" + Config: [] + Containers: {} + Options: {} + - Name: "host" + Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e" + Scope: "local" + Driver: "host" + EnableIPv6: false + Internal: false + IPAM: + Driver: "default" + Config: [] + Containers: {} + Options: {} + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + description: | + JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters: + + - `driver=` Matches a network's driver. + - `id=` Matches all or part of a network ID. + - `label=` or `label==` of a network label. + - `name=` Matches all or part of a network name. + - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. + type: "string" + tags: ["Network"] + + /networks/{id}: + get: + summary: "Inspect a network" + operationId: "NetworksInspect" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/Network" + 404: + description: "Network not found" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + tags: ["Network"] + + delete: + summary: "Remove a network" + operationId: "DeleteNetworks" + responses: + 204: + description: "No error" + 404: + description: "no such network" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + tags: ["Network"] + + /networks/create: + post: + summary: "Create a network" + operationId: "NetworksCreate" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "No error" + schema: + type: "object" + properties: + Id: + description: "The ID of the created network." + type: "string" + Warning: + type: "string" + example: + Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30" + Warning: "" + 404: + description: "plugin not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "networkConfig" + in: "body" + description: "Network configuration" + required: true + schema: + type: "object" + required: ["Name"] + properties: + Name: + description: "The network's name." + type: "string" + CheckDuplicate: + description: "Check for networks with duplicate names." + type: "boolean" + Driver: + description: "Name of the network driver plugin to use." + type: "string" + default: "bridge" + Internal: + description: "Restrict external access to the network." + type: "boolean" + IPAM: + description: "Optional custom IP scheme for the network." + $ref: "#/definitions/IPAM" + EnableIPv6: + description: "Enable IPv6 on the network." + type: "boolean" + Options: + description: "Network specific options to be used by the drivers." + type: "object" + additionalProperties: + type: "string" + Labels: + description: "Arbitrary key/value metadata to attach to the network." + type: "object" + additionalProperties: + type: "string" + example: + Name: "isolated_nw" + CheckDuplicate: false + Driver: "bridge" + EnableIPv6: true + IPAM: + Config: + - Subnet: "172.20.0.0/16" + IPRange: "172.20.10.0/24" + Gateway: "172.20.10.11" + - Subnet: "2001:db8:abcd::/64" + Gateway: "2001:db8:abcd::1011" + Options: + foo: "bar" + Internal: true + Options: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" + com.docker.network.bridge.name: "docker0" + com.docker.network.driver.mtu: "1500" + Labels: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + tags: ["Network"] + + /networks/{id}/connect: + post: + summary: "Connect a container to a network" + operationId: "NetworksConnect" + consumes: + - "application/octet-stream" + responses: + 200: + description: "No error" + 403: + description: "Operation not supported for swarm scoped networks" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "Network or container not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + - name: "container" + in: "body" + required: true + schema: + type: "object" + properties: + Container: + type: "string" + description: "The ID or name of the container to connect to the network." + EndpointConfig: + $ref: "#/definitions/EndpointSettings" + example: + Container: "3613f73ba0e4" + EndpointConfig: + IPAMConfig: + IPv4Address: "172.24.56.89" + IPv6Address: "2001:db8::5689" + tags: ["Network"] + + /networks/{id}/disconnect: + post: + summary: "Disconnect a container from a network" + operationId: "NetworksDisconnect" + consumes: + - "application/json" + responses: + 200: + description: "No error" + 403: + description: "Operation not supported for swarm scoped networks" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "Network or container not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + - name: "container" + in: "body" + required: true + schema: + type: "object" + properties: + Container: + type: "string" + description: "The ID or name of the container to disconnect from the network." + Force: + type: "boolean" + description: "Force the container to disconnect from the network." + tags: ["Network"] + + /plugins: + get: + summary: "List plugins" + operationId: "PluginsList" + description: "Returns information about installed plugins." + produces: ["application/json"] + responses: + 200: + description: "No error" + schema: + type: "array" + items: + $ref: "#/definitions/Plugin" + example: + - Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" + Name: "tiborvass/no-remove" + Tag: "latest" + Active: true + Config: + Mounts: + - Name: "" + Description: "" + Settable: null + Source: "/data" + Destination: "/data" + Type: "bind" + Options: + - "shared" + - "rbind" + - Name: "" + Description: "" + Settable: null + Source: null + Destination: "/foobar" + Type: "tmpfs" + Options: null + Env: + - "DEBUG=1" + Args: null + Devices: null + Manifest: + ManifestVersion: "v0" + Description: "A test plugin for Docker" + Documentation: "https://docs.docker.com/engine/extend/plugins/" + Interface: + Types: + - "docker.volumedriver/1.0" + Socket: "plugins.sock" + Entrypoint: + - "plugin-no-remove" + - "/data" + Workdir: "" + User: {} + Network: + Type: "host" + Capabilities: null + Mounts: + - Name: "" + Description: "" + Settable: null + Source: "/data" + Destination: "/data" + Type: "bind" + Options: + - "shared" + - "rbind" + - Name: "" + Description: "" + Settable: null + Source: null + Destination: "/foobar" + Type: "tmpfs" + Options: null + Devices: + - Name: "device" + Description: "a host device to mount" + Settable: null + Path: "/dev/cpu_dma_latency" + Env: + - Name: "DEBUG" + Description: "If set, prints debug messages" + Settable: null + Value: "1" + Args: + Name: "args" + Description: "command line arguments" + Settable: null + Value: [] + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Plugins"] + + /plugins/pull: + post: + summary: "Install a plugin" + operationId: "PostPluginsPull" + description: | + Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginEnable). + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + description: "Describes a permission the user has to accept upon installing the plugin." + type: "object" + properties: + Name: + type: "string" + Description: + type: "string" + Value: + type: "array" + items: + type: "string" + example: + - Name: "network" + Description: "" + Value: + - "host" + - Name: "mount" + Description: "" + Value: + - "/data" + - Name: "device" + Description: "" + Value: + - "/dev/cpu_dma_latency" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "query" + description: | + The plugin to install. + + The `:latest` tag is optional, and is used as the default if omitted. + required: true + type: "string" + - name: "X-Registry-Auth" + in: "header" + description: "A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication)" + type: "string" + tags: + - "Plugins" + /plugins/{name}: + get: + summary: "Inspect a plugin" + operationId: "GetPluginsInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Plugin" + 404: + description: "plugin is not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." + required: true + type: "string" + tags: + - "Plugins" + delete: + summary: "Remove a plugin" + operationId: "DeletePlugins" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Plugin" + 404: + description: "plugin is not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." + required: true + type: "string" + - name: "force" + in: "query" + description: "Disable the plugin before removing. This may result in issues if the plugin is in use by a container." + type: "boolean" + default: false + tags: + - "Plugins" + /plugins/{name}/enable: + post: + summary: "Enable a plugin" + operationId: "PostPluginsEnable" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." + required: true + type: "string" + tags: + - "Plugins" + /plugins/{name}/disable: + post: + summary: "Disable a plugin" + operationId: "PostPluginsDisable" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." + required: true + type: "string" + tags: + - "Plugins" + /nodes: + get: + summary: "List nodes" + operationId: "GetNodesList" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Node" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the nodes list, encoded as JSON (a `map[string][]string`). + + Available filters: + - `id=` + - `name=` + - `membership=`(`pending`|`accepted`|`rejected`)` + - `role=`(`worker`|`manager`)` + type: "string" + tags: + - "Nodes" + /nodes/{id}: + get: + summary: "Inspect a node" + operationId: "GetNodesInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Node" + 404: + description: "no such node" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID of the node" + type: "string" + required: true + tags: + - "Nodes" + delete: + summary: "Delete a node" + operationId: "DeleteNodes" + responses: + 200: + description: "no error" + 404: + description: "no such node" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID of the node" + type: "string" + required: true + - name: "force" + in: "query" + description: "Force remove a node from the swarm" + default: false + type: "boolean" + tags: + - "Nodes" + /nodes/{id}/update: + post: + summary: "Update a node" + operationId: "PostNodesUpdate" + responses: + 200: + description: "no error" + 404: + description: "no such node" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID of the node" + type: "string" + required: true + - name: "body" + in: "body" + schema: + $ref: "#/definitions/NodeSpec" + - name: "version" + in: "query" + description: "The version number of the node object being updated. This is required to avoid conflicting writes." + type: "integer" + format: "int64" + required: true + tags: + - "Nodes" + /swarm: + get: + summary: "Inspect swarm" + operationId: "GetSwarmInspect" + responses: + 200: + description: "no error" + schema: + allOf: + - $ref: "#/definitions/ClusterInfo" + - type: "object" + properties: + JoinTokens: + description: "The tokens workers and managers need to join the swarm." + type: "object" + properties: + Worker: + description: "The token workers can use to join the swarm." + type: "string" + Manager: + description: "The token managers can use to join the swarm." + type: "string" + example: + CreatedAt: "2016-08-15T16:00:20.349727406Z" + Spec: + Dispatcher: + HeartbeatPeriod: 5000000000 + Orchestration: + TaskHistoryRetentionLimit: 10 + CAConfig: + NodeCertExpiry: 7776000000000000 + Raft: + LogEntriesForSlowFollowers: 500 + HeartbeatTick: 1 + SnapshotInterval: 10000 + ElectionTick: 3 + TaskDefaults: {} + Name: "default" + JoinTokens: + Worker: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-6qmn92w6bu3jdvnglku58u11a" + Manager: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-8llk83c4wm9lwioey2s316r9l" + ID: "70ilmkj2f6sp2137c753w2nmt" + UpdatedAt: "2016-08-15T16:32:09.623207604Z" + Version: + Index: 51 + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: + - "Swarm" + /swarm/init: + post: + summary: "Initialize a new swarm" + operationId: "PostSwarmInit" + produces: + - "application/json" + - "text/plain" + responses: + 200: + description: "no error" + schema: + description: "The node ID" + type: "string" + example: "7v2t30z9blmxuhnyo6s4cpenp" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 406: + description: "node is already part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + type: "object" + properties: + ListenAddr: + description: "Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the default swarm listening port is used." + type: "string" + AdvertiseAddr: + description: "Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible." + type: "string" + ForceNewCluster: + description: "Force creation of a new swarm." + type: "boolean" + Spec: + $ref: "#/definitions/SwarmSpec" + example: + ListenAddr: "0.0.0.0:2377" + AdvertiseAddr: "192.168.1.1:2377" + ForceNewCluster: false + Spec: + Orchestration: {} + Raft: {} + Dispatcher: {} + CAConfig: {} + tags: + - "Swarm" + /swarm/join: + post: + summary: "Join an existing swarm" + operationId: "PostSwarmJoin" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 406: + description: "node is already part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + type: "object" + properties: + ListenAddr: + description: "Listen address used for inter-manager communication if the node gets promoted to manager, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP)." + type: "string" + AdvertiseAddr: + description: "Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible." + type: "string" + RemoteAddrs: + description: "Addresses of manager nodes already participating in the swarm." + type: "string" + JoinToken: + description: "Secret token for joining this swarm." + type: "string" + example: + ListenAddr: "0.0.0.0:2377" + AdvertiseAddr: "192.168.1.1:2377" + RemoteAddrs: + - "node1:2377" + JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" + tags: + - "Swarm" + /swarm/leave: + post: + summary: "Leave a swarm" + operationId: "PostSwarmLeave" + responses: + 200: + description: "no error" + 406: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "force" + description: "Force leave swarm, even if this is the last manager or that it will break the cluster." + in: "query" + type: "boolean" + default: false + tags: + - "Swarm" + /swarm/update: + post: + summary: "Update a swarm" + operationId: "PostSwarmUpdate" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 406: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + $ref: "#/definitions/SwarmSpec" + - name: "version" + in: "query" + description: "The version number of the swarm object being updated. This is required to avoid conflicting writes." + type: "integer" + format: "int64" + required: true + - name: "rotateWorkerToken" + in: "query" + description: "Rotate the worker join token." + type: "boolean" + default: false + - name: "rotateManagerToken" + in: "query" + description: "Rotate the manager join token." + type: "boolean" + default: false + tags: + - "Swarm" + /services: + get: + summary: "List services" + operationId: "GetServicesList" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Service" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters: + + - `id=` + - `name=` + tags: + - "Services" + /services/create: + post: + summary: "Create a service" + operationId: "PostServicesCreate" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + type: "object" + properties: + ID: + description: "The ID of the created service." + type: "string" + example: + ID: "ak7w3gjqoa3kuz8xcpnyy0pvl" + 406: + description: "server error or node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "name conflicts with an existing service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + allOf: + - $ref: "#/definitions/ServiceSpec" + - example: + Name: "web" + TaskTemplate: + ContainerSpec: + Image: "nginx:alpine" + Mounts: + - + ReadOnly: true + Source: "web-data" + Target: "/usr/share/nginx/html" + Type: "volume" + VolumeOptions: + DriverConfig: {} + Labels: + com.example.something: "something-value" + User: "33" + LogDriver: + Name: "json-file" + Options: + max-file: "3" + max-size: "10M" + Placement: {} + Resources: + Limits: + MemoryBytes: 104857600 + Reservations: {} + RestartPolicy: + Condition: "on-failure" + Delay: 10000000000 + MaxAttempts: 10 + Mode: + Replicated: + Replicas: 4 + UpdateConfig: + Delay: 30000000000 + Parallelism: 2 + FailureAction: "pause" + EndpointSpec: + Ports: + - + Protocol: "tcp" + PublishedPort: 8080 + TargetPort: 80 + Labels: + foo: "bar" + - name: "X-Registry-Auth" + in: "header" + description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)" + type: "string" + tags: + - "Services" + /services/{id}: + get: + summary: "Inspect a service" + operationId: "GetServicesInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Service" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID or name of service." + required: true + type: "string" + tags: + - "Services" + delete: + summary: "Delete a service" + operationId: "DeleteServices" + responses: + 200: + description: "no error" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID or name of service." + required: true + type: "string" + tags: + - "Services" + /services/{id}/update: + post: + summary: "Update a service" + operationId: "PostServicesUpdate" + responses: + 200: + description: "no error" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID or name of service." + required: true + type: "string" + - name: "body" + in: "body" + required: true + schema: + allOf: + - $ref: "#/definitions/ServiceSpec" + - example: + Name: "top" + TaskTemplate: + ContainerSpec: + Image: "busybox" + Args: + - "top" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + Mode: + Replicated: + Replicas: 1 + UpdateConfig: + Parallelism: 1 + EndpointSpec: + Mode: "vip" + + - name: "version" + in: "query" + description: "The version number of the service object being updated. This is required to avoid conflicting writes." + required: true + type: "integer" + - name: "X-Registry-Auth" + in: "header" + description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)" + type: "string" + + tags: + - "Services" + /tasks: + get: + summary: "List tasks" + operationId: "GetTasksList" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Task" + example: + - ID: "0kzzo1i0y4jz6027t0k7aezc7" + Version: + Index: 71 + CreatedAt: "2016-06-07T21:07:31.171892745Z" + UpdatedAt: "2016-06-07T21:07:31.376370513Z" + Spec: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Slot: 1 + NodeID: "60gvrl6tm78dmak4yl7srz94v" + Status: + Timestamp: "2016-06-07T21:07:31.290032978Z" + State: "running" + Message: "started" + ContainerStatus: + ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" + PID: 677 + DesiredState: "running" + NetworksAttachments: + - Network: + ID: "4qvuz4ko70xaltuqbt8956gd1" + Version: + Index: 18 + CreatedAt: "2016-06-07T20:31:11.912919752Z" + UpdatedAt: "2016-06-07T21:07:29.955277358Z" + Spec: + Name: "ingress" + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + DriverState: + Name: "overlay" + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: "default" + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + Addresses: + - "10.255.0.10/16" + - ID: "1yljwbmlr8er2waf8orvqpwms" + Version: + Index: 30 + CreatedAt: "2016-06-07T21:07:30.019104782Z" + UpdatedAt: "2016-06-07T21:07:30.231958098Z" + Name: "hopeful_cori" + Spec: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Slot: 1 + NodeID: "60gvrl6tm78dmak4yl7srz94v" + Status: + Timestamp: "2016-06-07T21:07:30.202183143Z" + State: "shutdown" + Message: "shutdown" + ContainerStatus: + ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213" + DesiredState: "shutdown" + NetworksAttachments: + - Network: + ID: "4qvuz4ko70xaltuqbt8956gd1" + Version: + Index: 18 + CreatedAt: "2016-06-07T20:31:11.912919752Z" + UpdatedAt: "2016-06-07T21:07:29.955277358Z" + Spec: + Name: "ingress" + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + DriverState: + Name: "overlay" + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: "default" + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + Addresses: + - "10.255.0.5/16" + + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters: + + - `id=` + - `name=` + - `service=` + - `node=` + - `label=key` or `label="key=value"` + - `desired-state=(running | shutdown | accepted)` + tags: + - "Tasks" + /tasks/{id}: + get: + summary: "Inspect a task" + operationId: "GetTasksInspect" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Task" + 404: + description: "no such task" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID of the task" + required: true + type: "string" + tags: + - "Tasks" diff --git a/vendor/github.com/docker/engine-api/types/strslice/strslice.go b/vendor/github.com/docker/docker/api/types/strslice/strslice.go similarity index 100% rename from vendor/github.com/docker/engine-api/types/strslice/strslice.go rename to vendor/github.com/docker/docker/api/types/strslice/strslice.go diff --git a/vendor/github.com/docker/docker/vendor.conf b/vendor/github.com/docker/docker/vendor.conf new file mode 100644 index 0000000..9a9d1f4 --- /dev/null +++ b/vendor/github.com/docker/docker/vendor.conf @@ -0,0 +1,132 @@ +# the following lines are in sorted order, FYI +github.com/Azure/go-ansiterm 388960b655244e76e24c75f48631564eaefade62 +github.com/Microsoft/hcsshim v0.5.2 +github.com/Microsoft/go-winio v0.3.5 +github.com/Sirupsen/logrus f76d643702a30fbffecdfe50831e11881c96ceb3 https://github.com/aaronlehmann/logrus +github.com/davecgh/go-spew 6d212800a42e8ab5c146b8ace3490ee17e5225f9 +github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a +github.com/go-check/check 4ed411733c5785b40214c70bce814c3a3a689609 https://github.com/cpuguy83/check.git +github.com/gorilla/context v1.1 +github.com/gorilla/mux v1.1 +github.com/kr/pty 5cf931ef8f +github.com/mattn/go-shellwords v1.0.0 +github.com/mattn/go-sqlite3 v1.1.0 +github.com/tchap/go-patricia v2.2.6 +github.com/vdemeester/shakers 24d7f1d6a71aa5d9cbe7390e4afb66b7eef9e1b3 +# forked golang.org/x/net package includes a patch for lazy loading trace templates +golang.org/x/net 2beffdc2e92c8a3027590f898fe88f69af48a3f8 https://github.com/tonistiigi/net.git +golang.org/x/sys 8f0908ab3b2457e2e15403d3697c9ef5cb4b57a9 +github.com/docker/go-units 8a7beacffa3009a9ac66bad506b18ffdd110cf97 +github.com/docker/go-connections f512407a188ecb16f31a33dbc9c4e4814afc1b03 + +github.com/RackSec/srslog 365bf33cd9acc21ae1c355209865f17228ca534e +github.com/imdario/mergo 0.2.1 + +#get libnetwork packages +github.com/docker/libnetwork 9ab6e136fa628b5bb4af4a75f76609ef2c21c024 +github.com/docker/go-events 18b43f1bc85d9cdd42c05a6cd2d444c7a200a894 +github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80 +github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec +github.com/hashicorp/go-msgpack 71c2886f5a673a35f909803f38ece5810165097b +github.com/hashicorp/memberlist 88ac4de0d1a0ca6def284b571342db3b777a4c37 +github.com/hashicorp/go-multierror fcdddc395df1ddf4247c69bd436e84cfa0733f7e +github.com/hashicorp/serf 598c54895cc5a7b1a24a398d635e8c0ea0959870 +github.com/docker/libkv v0.2.1 +github.com/vishvananda/netns 604eaf189ee867d8c147fafc28def2394e878d25 +github.com/vishvananda/netlink e73bad418fd727ed3a02830b1af1ad0283a1de6c +github.com/BurntSushi/toml f706d00e3de6abe700c994cdd545a1a4915af060 +github.com/samuel/go-zookeeper d0e0d8e11f318e000a8cc434616d69e329edc374 +github.com/deckarep/golang-set ef32fa3046d9f249d399f98ebaf9be944430fd1d +github.com/coreos/etcd 3a49cbb769ebd8d1dd25abb1e83386e9883a5707 +github.com/ugorji/go f1f1a805ed361a0e078bb537e4ea78cd37dcf065 +github.com/hashicorp/consul v0.5.2 +github.com/boltdb/bolt fff57c100f4dea1905678da7e90d92429dff2904 +github.com/miekg/dns 75e6e86cc601825c5dbcd4e0c209eab180997cd7 + +# get graph and distribution packages +github.com/docker/distribution fbb70dc3a14ca65cdac3aaf5e5122b03b42f6fbc +github.com/vbatts/tar-split v0.10.1 + +# get go-zfs packages +github.com/mistifyio/go-zfs 22c9b32c84eb0d0c6f4043b6e90fc94073de92fa +github.com/pborman/uuid v1.0 + +# get desired notary commit, might also need to be updated in Dockerfile +github.com/docker/notary v0.4.2 + +google.golang.org/grpc v1.0.2 +github.com/miekg/pkcs11 df8ae6ca730422dba20c768ff38ef7d79077a59f +github.com/docker/go v1.5.1-1-1-gbaf439e +github.com/agl/ed25519 d2b94fd789ea21d12fac1a4443dd3a3f79cda72c + +github.com/opencontainers/runc ac031b5bf1cc92239461125f4c1ffb760522bbf2 # libcontainer +github.com/opencontainers/runtime-spec 1c7c27d043c2a5e513a44084d2b10d77d1402b8c # specs +github.com/seccomp/libseccomp-golang 32f571b70023028bd57d9288c20efbcb237f3ce0 +# libcontainer deps (see src/github.com/opencontainers/runc/Godeps/Godeps.json) +github.com/coreos/go-systemd v4 +github.com/godbus/dbus v4.0.0 +github.com/syndtr/gocapability 2c00daeb6c3b45114c80ac44119e7b8801fdd852 +github.com/golang/protobuf 1f49d83d9aa00e6ce4fc8258c71cc7786aec968a + +# gelf logging driver deps +github.com/Graylog2/go-gelf aab2f594e4585d43468ac57287b0dece9d806883 + +github.com/fluent/fluent-logger-golang v1.2.1 +# fluent-logger-golang deps +github.com/philhofer/fwd 899e4efba8eaa1fea74175308f3fae18ff3319fa +github.com/tinylib/msgp 75ee40d2601edf122ef667e2a07d600d4c44490c + +# fsnotify +github.com/fsnotify/fsnotify v1.2.11 + +# awslogs deps +github.com/aws/aws-sdk-go v1.4.22 +github.com/go-ini/ini 060d7da055ba6ec5ea7a31f116332fe5efa04ce0 +github.com/jmespath/go-jmespath 0b12d6b521d83fc7f755e7cfc1b1fbdd35a01a74 + +# logentries +github.com/bsphere/le_go d3308aafe090956bc89a65f0769f58251a1b4f03 + +# gcplogs deps +golang.org/x/oauth2 2baa8a1b9338cf13d9eeb27696d761155fa480be +google.golang.org/api dc6d2353af16e2a2b0ff6986af051d473a4ed468 +google.golang.org/cloud dae7e3d993bc3812a2185af60552bb6b847e52a0 + +# native credentials +github.com/docker/docker-credential-helpers f72c04f1d8e71959a6d103f808c50ccbad79b9fd + +# containerd +github.com/docker/containerd 52ef1ceb4b660c42cf4ea9013180a5663968d4c7 +github.com/tonistiigi/fifo b4c3a126bac4051ae3fa83bfcb3c60ab7a9da0dd + +# cluster +github.com/docker/swarmkit 2eaae1ab6800f8521236e01bafb2667d2ec5371f +github.com/golang/mock bd3c8e81be01eef76d4b503f5e687d2d1354d2d9 +github.com/gogo/protobuf v0.3 +github.com/cloudflare/cfssl 7fb22c8cba7ecaf98e4082d22d65800cf45e042a +github.com/google/certificate-transparency d90e65c3a07988180c5b1ece71791c0b6506826e +golang.org/x/crypto 3fbbcd23f1cb824e69491a5930cfeff09b12f4d2 +golang.org/x/time a4bde12657593d5e90d0533a3e4fd95e635124cb +github.com/mreiferson/go-httpclient 63fe23f7434723dc904c901043af07931f293c47 +github.com/hashicorp/go-memdb 608dda3b1410a73eaf3ac8b517c9ae7ebab6aa87 https://github.com/floridoo/go-memdb +github.com/hashicorp/go-immutable-radix 8e8ed81f8f0bf1bdd829593fdd5c29922c1ea990 +github.com/hashicorp/golang-lru a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4 +github.com/coreos/pkg fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8 +github.com/pivotal-golang/clock 3fd3c1944c59d9742e1cd333672181cd1a6f9fa0 +github.com/prometheus/client_golang 52437c81da6b127a9925d17eb3a382a2e5fd395e +github.com/beorn7/perks 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9 +github.com/prometheus/client_model fa8ad6fec33561be4280a8f0514318c79d7f6cb6 +github.com/prometheus/common ebdfc6da46522d58825777cf1f90490a5b1ef1d8 +github.com/prometheus/procfs abf152e5f3e97f2fafac028d2cc06c1feb87ffa5 +bitbucket.org/ww/goautoneg 75cd24fc2f2c2a2088577d12123ddee5f54e0675 +github.com/matttproud/golang_protobuf_extensions fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a +github.com/pkg/errors 01fa4104b9c248c8945d14d9f128454d5b28d595 + +# cli +github.com/spf13/cobra v1.5 https://github.com/dnephin/cobra.git +github.com/spf13/pflag dabebe21bf790f782ea4c7bbd2efc430de182afd +github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 +github.com/flynn-archive/go-shlex 3f9db97f856818214da2e1057f8ad84803971cff + +# metrics +github.com/docker/go-metrics 86138d05f285fd9737a99bee2d9be30866b59d72 diff --git a/vendor/github.com/docker/engine-api/.travis.yml b/vendor/github.com/docker/engine-api/.travis.yml deleted file mode 100644 index d085af2..0000000 --- a/vendor/github.com/docker/engine-api/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- - language: go - sudo: false - notifications: - email: false - go: - - 1.6 - install: make deps - script: make validate && make test diff --git a/vendor/github.com/docker/engine-api/CHANGELOG.md b/vendor/github.com/docker/engine-api/CHANGELOG.md deleted file mode 100644 index 33cefd6..0000000 --- a/vendor/github.com/docker/engine-api/CHANGELOG.md +++ /dev/null @@ -1,141 +0,0 @@ -# Changelog - -Items starting with DEPRECATE are important deprecation notices. For more information on the list of deprecated APIs please have a look at https://docs.docker.com/misc/deprecated/ where target removal dates can also be found. - -## 0.3.2 (2016-03-30) - -## Client - -- Revert setting the ServerName in the TLS configuration at client init. See https://github.com/docker/swarm/issues/2027. - -## 0.3.1 (2016-03-23) - -### Client - -- Ensure that API paths are properly escaped. - -## 0.3.0 (2016-03-22) - -### Client - -- Add context to every function. -- Fix issue loading a default TLS CA. -- Allow to configure the client with a given http.Client. -- Add support for Windows named pipes. -- Set default host for Solaris. -- Add quiet flag for image load. -- Add ability to hijack connections through a proxy. -- Correctly set content type for image load. -- Add support for getting token for login. - -### Types - -- Add struct for update restart policy. -- Add human friendly State for container. -- Use OS specific host when DOCKER_HOST is not set. -- Rename Status in info to SystemStatus. -- Add internal flag to network inspect. -- Add disk quota field to container. -- Add EnableIPv6 fields. -- Add Mounts to container. -- Add cgroup driver to info. -- Add userns to host config. -- Remove email from AuthConfig. -- Make AuthConfig fields optional. -- Add IO resource settings for Windows. -- Add storage driver to host config. -- Update NetworkName to return proper user defined network names. -- Support joining cgroups by container id. -- Add KernelMemory to info. -- Add UsernsMode to container config. -- Add CPU resource control for Windows. -- Add AutoRemove to host config. -- Add Status field to Volume. -- Add Label to Image, Network and Volume. -- Add RootFS to container. - -## 0.2.3 (2016-02-02) - -### Types - -- Add missing status field. - -## 0.2.2 (2016-01-13) - -### Client - -- Fix issue configuring response hijacking with TLS enabled. - - -## 0.2.1 (2016-01-12) - -### Client - -- Fix issue detecting missing images on container creation. - -### Types - -- Remove invalid json tag in endpoint configuration. -- Add missing fields in info structure. - -## 0.2.0 (2016-01-11) - -### Client - -- Allow to force network disconnection. (docker 1.10) - -### Types - -- Add global and local alias configuration to network endpoint. -- Add network ID to network endpoint. -- Add IPAM options. -- Add Seccomp options. -- Fix issue referencing OOMKillDisable. - - -## 0.1.3 (2016-01-07) - -### Client - -- Fix issue sending all network configurations for a per network request. - - -## 0.1.2 (2016-01-07) - -### Client - -- Add interface to represent the API client. -- Restrict the fields send to the update endpoint to only those that are used. -- Send network settings as part of the container create request. (docker 1.10) -- Send network settings as part of the network connect request. (docker 1.10) - -### Types - -- Add PidsLimit as part of the host configuration. -- Add PidsStats to show PID stats. -- Add graph storage options to host configuration. -- Add NetworkConfig and EndpointIPAMConfig structs. (docker 1.10) - - -## 0.1.1 (2016-01-06) - -### Client - -- Delegate shmSize units conversion to the consumer. - -### Types - -- Add warnings to the volume list reponse. -- Fix image build options: - * use 0 as default value for shmSize. - - -## 0.1.0 (2016-01-04) - -### Client - -- Initial API client implementation. - -### Types - -- Initial API types implementation. diff --git a/vendor/github.com/docker/engine-api/CONTRIBUTING.md b/vendor/github.com/docker/engine-api/CONTRIBUTING.md deleted file mode 100644 index 926dcc9..0000000 --- a/vendor/github.com/docker/engine-api/CONTRIBUTING.md +++ /dev/null @@ -1,55 +0,0 @@ -# Contributing to Docker - -### Sign your work - -The sign-off is a simple line at the end of the explanation for the patch. Your -signature certifies that you wrote the patch or otherwise have the right to pass -it on as an open-source patch. The rules are pretty simple: if you can certify -the below (from [developercertificate.org](http://developercertificate.org/)): - -``` -Developer Certificate of Origin -Version 1.1 - -Copyright (C) 2004, 2006 The Linux Foundation and its contributors. -660 York Street, Suite 102, -San Francisco, CA 94110 USA - -Everyone is permitted to copy and distribute verbatim copies of this -license document, but changing it is not allowed. - -Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -(a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -(b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -(c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -(d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. -``` - -Then you just add a line to every git commit message: - - Signed-off-by: Joe Smith - -Use your real name (sorry, no pseudonyms or anonymous contributions.) - -If you set your `user.name` and `user.email` git configs, you can sign your -commit automatically with `git commit -s`. diff --git a/vendor/github.com/docker/engine-api/LICENSE b/vendor/github.com/docker/engine-api/LICENSE deleted file mode 100644 index c157bff..0000000 --- a/vendor/github.com/docker/engine-api/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - https://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2015-2016 Docker, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/docker/engine-api/MAINTAINERS b/vendor/github.com/docker/engine-api/MAINTAINERS deleted file mode 100644 index f86ffe0..0000000 --- a/vendor/github.com/docker/engine-api/MAINTAINERS +++ /dev/null @@ -1,160 +0,0 @@ -# engine-api maintainers file -# -# This file describes who runs the docker/engine-api project and how. -# This is a living document - if you see something out of date or missing, speak up! -# -# It is structured to be consumable by both humans and programs. -# To extract its contents programmatically, use any TOML-compliant parser. -# -# This file is compiled into the MAINTAINERS file in docker/opensource. -# -[Org] - [Org."Core maintainers"] - people = [ - "aaronlehmann", - "calavera", - "coolljt0725", - "cpuguy83", - "crosbymichael", - "dnephin", - "dongluochen", - "duglin", - "estesp", - "icecrime", - "jhowardmsft", - "lk4d4", - "mavenugo", - "mhbauer", - "runcom", - "stevvooe", - "thajeztah", - "tianon", - "tibor", - "tonistiigi", - "unclejack", - "vdemeester", - "vieux" - ] - -[people] - -# A reference list of all people associated with the project. -# All other sections should refer to people by their canonical key -# in the people section. - - # ADD YOURSELF HERE IN ALPHABETICAL ORDER - - [people.aaronlehmann] - Name = "Aaron Lehmann" - Email = "aaron.lehmann@docker.com" - GitHub = "aaronlehmann" - - [people.calavera] - Name = "David Calavera" - Email = "david.calavera@gmail.com" - GitHub = "calavera" - - [people.coolljt0725] - Name = "Lei Jitang" - Email = "leijitang@huawei.com" - GitHub = "coolljt0725" - - [people.cpuguy83] - Name = "Brian Goff" - Email = "cpuguy83@gmail.com" - Github = "cpuguy83" - - [people.crosbymichael] - Name = "Michael Crosby" - Email = "crosbymichael@gmail.com" - GitHub = "crosbymichael" - - [people.dnephin] - Name = "Daniel Nephin" - Email = "dnephin@gmail.com" - GitHub = "dnephin" - - [people.dongluochen] - Name = "Dongluo Chen" - Email = "dongluo.chen@docker.com" - GitHub = "dongluochen" - - [people.duglin] - Name = "Doug Davis" - Email = "dug@us.ibm.com" - GitHub = "duglin" - - [people.estesp] - Name = "Phil Estes" - Email = "estesp@linux.vnet.ibm.com" - GitHub = "estesp" - - [people.icecrime] - Name = "Arnaud Porterie" - Email = "arnaud@docker.com" - GitHub = "icecrime" - - [people.jhowardmsft] - Name = "John Howard" - Email = "jhoward@microsoft.com" - GitHub = "jhowardmsft" - - [people.lk4d4] - Name = "Alexander Morozov" - Email = "lk4d4@docker.com" - GitHub = "lk4d4" - - [people.mavenugo] - Name = "Madhu Venugopal" - Email = "madhu@docker.com" - GitHub = "mavenugo" - - [people.mhbauer] - Name = "Morgan Bauer" - Email = "mbauer@us.ibm.com" - GitHub = "mhbauer" - - [people.runcom] - Name = "Antonio Murdaca" - Email = "runcom@redhat.com" - GitHub = "runcom" - - [people.stevvooe] - Name = "Stephen Day" - Email = "stephen.day@docker.com" - GitHub = "stevvooe" - - [people.thajeztah] - Name = "Sebastiaan van Stijn" - Email = "github@gone.nl" - GitHub = "thaJeztah" - - [people.tianon] - Name = "Tianon Gravi" - Email = "admwiggin@gmail.com" - GitHub = "tianon" - - [people.tibor] - Name = "Tibor Vass" - Email = "tibor@docker.com" - GitHub = "tiborvass" - - [people.tonistiigi] - Name = "Tõnis Tiigi" - Email = "tonis@docker.com" - GitHub = "tonistiigi" - - [people.unclejack] - Name = "Cristian Staretu" - Email = "cristian.staretu@gmail.com" - GitHub = "unclejack" - - [people.vdemeester] - Name = "Vincent Demeester" - Email = "vincent@sbr.pm" - GitHub = "vdemeester" - - [people.vieux] - Name = "Victor Vieux" - Email = "vieux@docker.com" - GitHub = "vieux" diff --git a/vendor/github.com/docker/engine-api/Makefile b/vendor/github.com/docker/engine-api/Makefile deleted file mode 100644 index 61e9ef2..0000000 --- a/vendor/github.com/docker/engine-api/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -.PHONY: all deps test validate lint - -all: deps test validate - -deps: - go get -t ./... - go get -u github.com/golang/lint/golint - -test: - go test -tags experimental -race -cover ./... - -validate: lint - go vet ./... - test -z "$(gofmt -s -l . | tee /dev/stderr)" - -lint: - out="$$(golint ./...)"; \ - if [ -n "$$(golint ./...)" ]; then \ - echo "$$out"; \ - exit 1; \ - fi diff --git a/vendor/github.com/docker/engine-api/README.md b/vendor/github.com/docker/engine-api/README.md deleted file mode 100644 index 897dbdf..0000000 --- a/vendor/github.com/docker/engine-api/README.md +++ /dev/null @@ -1,68 +0,0 @@ -[![GoDoc](https://godoc.org/github.com/docker/engine-api?status.svg)](https://godoc.org/github.com/docker/engine-api) - -# Introduction - -Engine-api is a set of Go libraries to implement client and server components compatible with the Docker engine. -The code was extracted from the [Docker engine](https://github.com/docker/docker) and contributed back as an external library. - -## Components - -### Client - -The client package implements a fully featured http client to interact with the Docker engine. It's modeled after the requirements of the Docker engine CLI, but it can also serve other purposes. - -#### Usage - -You can use this client package in your applications by creating a new client object. Then use that object to execute operations against the remote server. Follow the example below to see how to list all the containers running in a Docker engine host: - -```go -package main - -import ( - "fmt" - - "github.com/docker/engine-api/client" - "github.com/docker/engine-api/types" - "golang.org/x/net/context" -) - -func main() { - defaultHeaders := map[string]string{"User-Agent": "engine-api-cli-1.0"} - cli, err := client.NewClient("unix:///var/run/docker.sock", "v1.22", nil, defaultHeaders) - if err != nil { - panic(err) - } - - options := types.ContainerListOptions{All: true} - containers, err := cli.ContainerList(context.Background(), options) - if err != nil { - panic(err) - } - - for _, c := range containers { - fmt.Println(c.ID) - } -} -``` - -### Types - -The types package includes all typed structures that client and server serialize to execute operations. - -### Server - -The server package includes API endpoints that applications compatible with the Docker engine API can reuse. It also provides useful middlewares and helpers to handle http requests. - -This package is still pending to be extracted from the Docker engine. - -## Developing - -engine-api requires some minimal libraries that you can download running `make deps`. - -To run tests, use the command `make test`. We use build tags to isolate functions and structures that are only available for testing. - -To validate the sources, use the command `make validate`. - -## License - -engine-api is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full license text. diff --git a/vendor/github.com/docker/engine-api/appveyor.yml b/vendor/github.com/docker/engine-api/appveyor.yml deleted file mode 100644 index b31137f..0000000 --- a/vendor/github.com/docker/engine-api/appveyor.yml +++ /dev/null @@ -1,37 +0,0 @@ -version: "{build}" - -# Source Config -clone_folder: c:\gopath\src\github.com\docker\engine-api - -# Build host - -environment: - GOPATH: c:\gopath - GOVERSION: 1.6 - -init: - - git config --global core.autocrlf input - -# Build - -install: - # Install Go 1.6. - - rmdir c:\go /s /q - - appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-amd64.msi - - msiexec /i go%GOVERSION%.windows-amd64.msi /q - - set Path=c:\go\bin;c:\gopath\bin;%Path% - - go version - - go env - -build: false -deploy: false - -before_test: - - go get -t ./... - - go get github.com/golang/lint/golint - -test_script: - - go vet ./... - - golint ./... - - gofmt -s -l . - - go test -race -cover -v -tags=test ./... diff --git a/vendor/github.com/docker/libcompose/Dockerfile b/vendor/github.com/docker/libcompose/Dockerfile index 34d160f..66e94aa 100644 --- a/vendor/github.com/docker/libcompose/Dockerfile +++ b/vendor/github.com/docker/libcompose/Dockerfile @@ -1,5 +1,5 @@ # This file describes the standard way to build libcompose, using docker -FROM golang:1.7.0 +FROM golang:1.7.1 # virtualenv is necessary to run acceptance tests @@ -14,7 +14,7 @@ RUN go get github.com/aktau/github-release && \ go get github.com/golang/lint/golint # Which docker version to test on and what default one to use -ENV DOCKER_VERSIONS 1.9.1 1.10.3 1.11.0 +ENV DOCKER_VERSIONS 1.9.1 1.10.3 1.11.2 1.12.1 ENV DEFAULT_DOCKER_VERSION 1.10.3 # Download docker @@ -39,7 +39,7 @@ WORKDIR /go/src/github.com/docker/libcompose # Compose COMMIT for acceptance test version, update that commit when # you want to update the acceptance test version to support. -ENV COMPOSE_COMMIT 1.8.0-rc2 +ENV COMPOSE_COMMIT 1.8.0 RUN virtualenv venv && \ git clone https://github.com/docker/compose.git venv/compose && \ cd venv/compose && \ @@ -60,6 +60,6 @@ ENV DOCKER_CROSSPLATFORMS \ windows/amd64 windows/386 # Wrap all commands in the "docker-in-docker" script to allow nested containers -ENTRYPOINT ["script/dind"] +ENTRYPOINT ["hack/dind"] COPY . /go/src/github.com/docker/libcompose diff --git a/vendor/github.com/docker/libcompose/Makefile b/vendor/github.com/docker/libcompose/Makefile index 342c9a5..9f035c9 100644 --- a/vendor/github.com/docker/libcompose/Makefile +++ b/vendor/github.com/docker/libcompose/Makefile @@ -24,28 +24,28 @@ DOCKER_RUN_LIBCOMPOSE := docker run --rm -i $(TTY) --privileged -e DAEMON_VERSIO default: binary all: build ## validate all checks, build linux binary, run all tests\ncross build non-linux binaries - $(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh + $(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh binary: build ## build the linux binary - $(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh binary + $(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh binary cross-binary: build ## cross build the non linux binaries (windows, darwin) - $(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh cross-binary + $(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh cross-binary test: build ## run the unit, integration and acceptance tests - $(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh binary test-unit test-integration test-acceptance + $(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh binary test-unit test-integration test-acceptance test-unit: build ## run the unit tests - $(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh test-unit + $(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh test-unit test-integration: build ## run the integration tests - $(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh binary test-integration + $(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh binary test-integration test-acceptance: build ## run the acceptance tests - $(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh binary test-acceptance + $(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh binary test-acceptance validate: build ## validate DCO, git conflicts marks, gofmt, golint and go vet - $(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh validate-dco validate-git-marks validate-gofmt validate-lint validate-vet + $(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh validate-dco validate-git-marks validate-gofmt validate-lint validate-vet shell: build ## start a shell inside the build env $(DOCKER_RUN_LIBCOMPOSE) bash @@ -58,7 +58,7 @@ bundles: mkdir bundles clean: - $(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh clean + $(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh clean help: ## this help @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) diff --git a/vendor/github.com/docker/libcompose/README.md b/vendor/github.com/docker/libcompose/README.md index 1413702..a301268 100644 --- a/vendor/github.com/docker/libcompose/README.md +++ b/vendor/github.com/docker/libcompose/README.md @@ -11,8 +11,8 @@ Here is a list of known project that uses `libcompose`: - [rancher-compose](https://github.com/rancher/rancher-compose) and [rancher os](https://github.com/rancher/os) (by [Rancher](https://github.com/rancher)) - [openshift](https://github.com/openshift/origin) (by [Red Hat](https://github.com/openshift)) -- [henge](https://github.com/redhat-developer/henge) (by [Red Hat](https://github.com/redhat-developer)) -- [kompose](https://github.com/skippbox/kompose2) (by [skippbox](https://github.com/skippbox)) +- [henge](https://github.com/redhat-developer/henge) (by [Red Hat](https://github.com/redhat-developer)) [Deprecated in favour of kompose] +- [kompose](https://github.com/skippbox/kompose) (by [skippbox](https://github.com/skippbox)) - [compose2kube](https://github.com/kelseyhightower/compose2kube) (by [kelseyhightower](https://github.com/kelseyhightower)) - [amazon-ecs-cli](https://github.com/aws/amazon-ecs-cli) (by [Amazon AWS](https://github.com/aws)) - [libkermit](https://github.com/libkermit/docker) (by [vdemeester](https://github.com/vdemeester)) @@ -28,12 +28,13 @@ import ( "golang.org/x/net/context" "github.com/docker/libcompose/docker" + "github.com/docker/libcompose/docker/ctx" "github.com/docker/libcompose/project" "github.com/docker/libcompose/project/options" ) func main() { - project, err := docker.NewProject(&docker.Context{ + project, err := docker.NewProject(&ctx.Context{ Context: project.Context{ ComposeFiles: []string{"docker-compose.yml"}, ProjectName: "my-compose", @@ -61,7 +62,7 @@ or `go` in order to build libcompose. ### Building with `docker` You need Docker and ``make`` and then run the ``binary`` target. This -will create binary for all platform in the `bundles` folder. +will create binary for all platform in the `bundles` folder. ```bash $ make binary @@ -121,7 +122,7 @@ libcompose-cli_windows-386.exe You can run unit tests using the `test-unit` target and the integration test using the `test-integration` target. If you don't use Docker and `make` to build `libcompose`, you can use `go test` and the -following scripts : `script/test-unit` and `script/test-integration`. +following scripts : `hack/test-unit` and `hack/test-integration`. ```bash $ make test-unit diff --git a/vendor/github.com/docker/libcompose/config/types.go b/vendor/github.com/docker/libcompose/config/types.go index 1651ee1..299afaa 100644 --- a/vendor/github.com/docker/libcompose/config/types.go +++ b/vendor/github.com/docker/libcompose/config/types.go @@ -19,56 +19,69 @@ type ResourceLookup interface { // ServiceConfigV1 holds version 1 of libcompose service configuration type ServiceConfigV1 struct { - Build string `yaml:"build,omitempty"` - CapAdd []string `yaml:"cap_add,omitempty"` - CapDrop []string `yaml:"cap_drop,omitempty"` - CgroupParent string `yaml:"cgroup_parent,omitempty"` - CPUQuota yaml.StringorInt `yaml:"cpu_quota,omitempty"` - CPUSet string `yaml:"cpuset,omitempty"` - CPUShares yaml.StringorInt `yaml:"cpu_shares,omitempty"` - Command yaml.Command `yaml:"command,flow,omitempty"` - ContainerName string `yaml:"container_name,omitempty"` - DeviceReadIOps yaml.MaporColonSlice `yaml:"device_read_iops,omitempty"` - Devices []string `yaml:"devices,omitempty"` - DeviceWriteIOps yaml.MaporColonSlice `yaml:"device_write_iops,omitempty"` - DNS yaml.Stringorslice `yaml:"dns,omitempty"` - DNSSearch yaml.Stringorslice `yaml:"dns_search,omitempty"` - Dockerfile string `yaml:"dockerfile,omitempty"` - DomainName string `yaml:"domainname,omitempty"` - Entrypoint yaml.Command `yaml:"entrypoint,flow,omitempty"` - EnvFile yaml.Stringorslice `yaml:"env_file,omitempty"` - Environment yaml.MaporEqualSlice `yaml:"environment,omitempty"` - Hostname string `yaml:"hostname,omitempty"` - Image string `yaml:"image,omitempty"` - Labels yaml.SliceorMap `yaml:"labels,omitempty"` - Links yaml.MaporColonSlice `yaml:"links,omitempty"` - LogDriver string `yaml:"log_driver,omitempty"` - MacAddress string `yaml:"mac_address,omitempty"` - MemLimit yaml.StringorInt `yaml:"mem_limit,omitempty"` - MemSwapLimit yaml.StringorInt `yaml:"memswap_limit,omitempty"` - Name string `yaml:"name,omitempty"` - Net string `yaml:"net,omitempty"` - Pid string `yaml:"pid,omitempty"` - Uts string `yaml:"uts,omitempty"` - Ipc string `yaml:"ipc,omitempty"` - Ports []string `yaml:"ports,omitempty"` - Privileged bool `yaml:"privileged,omitempty"` - Restart string `yaml:"restart,omitempty"` - ReadOnly bool `yaml:"read_only,omitempty"` - ShmSize yaml.StringorInt `yaml:"shm_size,omitempty"` - StdinOpen bool `yaml:"stdin_open,omitempty"` - SecurityOpt []string `yaml:"security_opt,omitempty"` - Tty bool `yaml:"tty,omitempty"` - User string `yaml:"user,omitempty"` - VolumeDriver string `yaml:"volume_driver,omitempty"` - Volumes []string `yaml:"volumes,omitempty"` - VolumesFrom []string `yaml:"volumes_from,omitempty"` - WorkingDir string `yaml:"working_dir,omitempty"` - Expose []string `yaml:"expose,omitempty"` - ExternalLinks []string `yaml:"external_links,omitempty"` - LogOpt map[string]string `yaml:"log_opt,omitempty"` - ExtraHosts []string `yaml:"extra_hosts,omitempty"` - Ulimits yaml.Ulimits `yaml:"ulimits,omitempty"` + BlkioWeight yaml.StringorInt `yaml:"blkio_weight,omitempty"` + BlkioWeightDevice string `yaml:"blkio_weight_device,omitempty"` + Build string `yaml:"build,omitempty"` + CapAdd []string `yaml:"cap_add,omitempty"` + CapDrop []string `yaml:"cap_drop,omitempty"` + CgroupParent string `yaml:"cgroup_parent,omitempty"` + CPUPeriod yaml.StringorInt `yaml:"cpu_period,omitempty"` + CPUQuota yaml.StringorInt `yaml:"cpu_quota,omitempty"` + CPUSet string `yaml:"cpuset,omitempty"` + CPUShares yaml.StringorInt `yaml:"cpu_shares,omitempty"` + Command yaml.Command `yaml:"command,flow,omitempty"` + ContainerName string `yaml:"container_name,omitempty"` + DeviceReadBps yaml.MaporColonSlice `yaml:"device_read_bps,omitempty"` + DeviceReadIOps yaml.MaporColonSlice `yaml:"device_read_iops,omitempty"` + Devices []string `yaml:"devices,omitempty"` + DeviceWriteBps yaml.MaporColonSlice `yaml:"device_write_bps,omitempty"` + DeviceWriteIOps yaml.MaporColonSlice `yaml:"device_write_iops,omitempty"` + DNS yaml.Stringorslice `yaml:"dns,omitempty"` + DNSOpt []string `yaml:"dns_opt,omitempty"` + DNSSearch yaml.Stringorslice `yaml:"dns_search,omitempty"` + Dockerfile string `yaml:"dockerfile,omitempty"` + DomainName string `yaml:"domainname,omitempty"` + Entrypoint yaml.Command `yaml:"entrypoint,flow,omitempty"` + EnvFile yaml.Stringorslice `yaml:"env_file,omitempty"` + Environment yaml.MaporEqualSlice `yaml:"environment,omitempty"` + GroupAdd []string `yaml:"group_add,omitempty"` + Hostname string `yaml:"hostname,omitempty"` + Image string `yaml:"image,omitempty"` + Isolation string `yaml:"isolation,omitempty"` + Labels yaml.SliceorMap `yaml:"labels,omitempty"` + Links yaml.MaporColonSlice `yaml:"links,omitempty"` + LogDriver string `yaml:"log_driver,omitempty"` + MacAddress string `yaml:"mac_address,omitempty"` + MemLimit yaml.StringorInt `yaml:"mem_limit,omitempty"` + MemSwapLimit yaml.StringorInt `yaml:"memswap_limit,omitempty"` + MemSwappiness yaml.StringorInt `yaml:"mem_swappiness,omitempty"` + Name string `yaml:"name,omitempty"` + Net string `yaml:"net,omitempty"` + OomKillDisable bool `yaml:"oom_kill_disable,omitempty"` + OomScoreAdj yaml.StringorInt `yaml:"oom_score_adj,omitempty"` + Pid string `yaml:"pid,omitempty"` + Uts string `yaml:"uts,omitempty"` + Ipc string `yaml:"ipc,omitempty"` + Ports []string `yaml:"ports,omitempty"` + Privileged bool `yaml:"privileged,omitempty"` + Restart string `yaml:"restart,omitempty"` + ReadOnly bool `yaml:"read_only,omitempty"` + ShmSize yaml.StringorInt `yaml:"shm_size,omitempty"` + StdinOpen bool `yaml:"stdin_open,omitempty"` + SecurityOpt []string `yaml:"security_opt,omitempty"` + StopSignal string `yaml:"stop_signal,omitempty"` + Tmpfs yaml.Stringorslice `yaml:"tmpfs,omitempty"` + Tty bool `yaml:"tty,omitempty"` + User string `yaml:"user,omitempty"` + VolumeDriver string `yaml:"volume_driver,omitempty"` + Volumes []string `yaml:"volumes,omitempty"` + VolumesFrom []string `yaml:"volumes_from,omitempty"` + WorkingDir string `yaml:"working_dir,omitempty"` + Expose []string `yaml:"expose,omitempty"` + ExternalLinks []string `yaml:"external_links,omitempty"` + LogOpt map[string]string `yaml:"log_opt,omitempty"` + ExtraHosts []string `yaml:"extra_hosts,omitempty"` + Ulimits yaml.Ulimits `yaml:"ulimits,omitempty"` } // Log holds v2 logging information @@ -79,64 +92,78 @@ type Log struct { // ServiceConfig holds version 2 of libcompose service configuration type ServiceConfig struct { - Build yaml.Build `yaml:"build,omitempty"` - CapAdd []string `yaml:"cap_add,omitempty"` - CapDrop []string `yaml:"cap_drop,omitempty"` - CPUSet string `yaml:"cpuset,omitempty"` - CPUShares yaml.StringorInt `yaml:"cpu_shares,omitempty"` - CPUQuota yaml.StringorInt `yaml:"cpu_quota,omitempty"` - Command yaml.Command `yaml:"command,flow,omitempty"` - CgroupParent string `yaml:"cgroup_parent,omitempty"` - ContainerName string `yaml:"container_name,omitempty"` - DeviceReadIOps yaml.MaporColonSlice `yaml:"device_read_iops,omitempty"` - Devices []string `yaml:"devices,omitempty"` - DeviceWriteIOps yaml.MaporColonSlice `yaml:"device_write_iops,omitempty"` - DependsOn []string `yaml:"depends_on,omitempty"` - DNS yaml.Stringorslice `yaml:"dns,omitempty"` - DNSSearch yaml.Stringorslice `yaml:"dns_search,omitempty"` - DomainName string `yaml:"domainname,omitempty"` - Entrypoint yaml.Command `yaml:"entrypoint,flow,omitempty"` - EnvFile yaml.Stringorslice `yaml:"env_file,omitempty"` - Environment yaml.MaporEqualSlice `yaml:"environment,omitempty"` - Expose []string `yaml:"expose,omitempty"` - Extends yaml.MaporEqualSlice `yaml:"extends,omitempty"` - ExternalLinks []string `yaml:"external_links,omitempty"` - ExtraHosts []string `yaml:"extra_hosts,omitempty"` - Image string `yaml:"image,omitempty"` - Hostname string `yaml:"hostname,omitempty"` - Ipc string `yaml:"ipc,omitempty"` - Labels yaml.SliceorMap `yaml:"labels,omitempty"` - Links yaml.MaporColonSlice `yaml:"links,omitempty"` - Logging Log `yaml:"logging,omitempty"` - MacAddress string `yaml:"mac_address,omitempty"` - MemLimit yaml.StringorInt `yaml:"mem_limit,omitempty"` - MemSwapLimit yaml.StringorInt `yaml:"memswap_limit,omitempty"` - NetworkMode string `yaml:"network_mode,omitempty"` - Networks *yaml.Networks `yaml:"networks,omitempty"` - Pid string `yaml:"pid,omitempty"` - Ports []string `yaml:"ports,omitempty"` - Privileged bool `yaml:"privileged,omitempty"` - SecurityOpt []string `yaml:"security_opt,omitempty"` - ShmSize yaml.StringorInt `yaml:"shm_size,omitempty"` - StopSignal string `yaml:"stop_signal,omitempty"` - VolumeDriver string `yaml:"volume_driver,omitempty"` - Volumes *yaml.Volumes `yaml:"volumes,omitempty"` - VolumesFrom []string `yaml:"volumes_from,omitempty"` - Uts string `yaml:"uts,omitempty"` - Restart string `yaml:"restart,omitempty"` - ReadOnly bool `yaml:"read_only,omitempty"` - StdinOpen bool `yaml:"stdin_open,omitempty"` - Tty bool `yaml:"tty,omitempty"` - User string `yaml:"user,omitempty"` - WorkingDir string `yaml:"working_dir,omitempty"` - Ulimits yaml.Ulimits `yaml:"ulimits,omitempty"` + BlkioWeight yaml.StringorInt `yaml:"blkio_weight,omitempty"` + BlkioWeightDevice []string `yaml:"blkio_weight_device,omitempty"` + Build yaml.Build `yaml:"build,omitempty"` + CapAdd []string `yaml:"cap_add,omitempty"` + CapDrop []string `yaml:"cap_drop,omitempty"` + CPUPeriod yaml.StringorInt `yaml:"cpu_period,omitempty"` + CPUSet string `yaml:"cpuset,omitempty"` + CPUShares yaml.StringorInt `yaml:"cpu_shares,omitempty"` + CPUQuota yaml.StringorInt `yaml:"cpu_quota,omitempty"` + Command yaml.Command `yaml:"command,flow,omitempty"` + CgroupParent string `yaml:"cgroup_parent,omitempty"` + ContainerName string `yaml:"container_name,omitempty"` + DeviceReadBps yaml.MaporColonSlice `yaml:"device_read_bps,omitempty"` + DeviceReadIOps yaml.MaporColonSlice `yaml:"device_read_iops,omitempty"` + Devices []string `yaml:"devices,omitempty"` + DeviceWriteBps yaml.MaporColonSlice `yaml:"device_write_bps,omitempty"` + DeviceWriteIOps yaml.MaporColonSlice `yaml:"device_write_iops,omitempty"` + DependsOn []string `yaml:"depends_on,omitempty"` + DNS yaml.Stringorslice `yaml:"dns,omitempty"` + DNSOpt []string `yaml:"dns_opt,omitempty"` + DNSSearch yaml.Stringorslice `yaml:"dns_search,omitempty"` + DomainName string `yaml:"domainname,omitempty"` + Entrypoint yaml.Command `yaml:"entrypoint,flow,omitempty"` + EnvFile yaml.Stringorslice `yaml:"env_file,omitempty"` + Environment yaml.MaporEqualSlice `yaml:"environment,omitempty"` + Expose []string `yaml:"expose,omitempty"` + Extends yaml.MaporEqualSlice `yaml:"extends,omitempty"` + ExternalLinks []string `yaml:"external_links,omitempty"` + ExtraHosts []string `yaml:"extra_hosts,omitempty"` + GroupAdd []string `yaml:"group_add,omitempty"` + Image string `yaml:"image,omitempty"` + Isolation string `yaml:"isolation,omitempty"` + Hostname string `yaml:"hostname,omitempty"` + Ipc string `yaml:"ipc,omitempty"` + Labels yaml.SliceorMap `yaml:"labels,omitempty"` + Links yaml.MaporColonSlice `yaml:"links,omitempty"` + Logging Log `yaml:"logging,omitempty"` + MacAddress string `yaml:"mac_address,omitempty"` + MemLimit yaml.StringorInt `yaml:"mem_limit,omitempty"` + MemReservation yaml.StringorInt `yaml:"mem_reservation,omitempty"` + MemSwapLimit yaml.StringorInt `yaml:"memswap_limit,omitempty"` + MemSwappiness yaml.StringorInt `yaml:"mem_swappiness,omitempty"` + NetworkMode string `yaml:"network_mode,omitempty"` + Networks *yaml.Networks `yaml:"networks,omitempty"` + OomKillDisable bool `yaml:"oom_kill_disable,omitempty"` + OomScoreAdj yaml.StringorInt `yaml:"oom_score_adj,omitempty"` + Pid string `yaml:"pid,omitempty"` + Ports []string `yaml:"ports,omitempty"` + Privileged bool `yaml:"privileged,omitempty"` + SecurityOpt []string `yaml:"security_opt,omitempty"` + ShmSize yaml.StringorInt `yaml:"shm_size,omitempty"` + StopSignal string `yaml:"stop_signal,omitempty"` + Tmpfs yaml.Stringorslice `yaml:"tmpfs,omitempty"` + VolumeDriver string `yaml:"volume_driver,omitempty"` + Volumes *yaml.Volumes `yaml:"volumes,omitempty"` + VolumesFrom []string `yaml:"volumes_from,omitempty"` + Uts string `yaml:"uts,omitempty"` + Restart string `yaml:"restart,omitempty"` + ReadOnly bool `yaml:"read_only,omitempty"` + StdinOpen bool `yaml:"stdin_open,omitempty"` + Tty bool `yaml:"tty,omitempty"` + User string `yaml:"user,omitempty"` + WorkingDir string `yaml:"working_dir,omitempty"` + Ulimits yaml.Ulimits `yaml:"ulimits,omitempty"` } // VolumeConfig holds v2 volume configuration type VolumeConfig struct { - Driver string `yaml:"driver,omitempty"` - DriverOpts map[string]string `yaml:"driver_opts,omitempty"` - External yaml.External `yaml:"external,omitempty"` + Driver string `yaml:"driver,omitempty"` + DriverOpts map[string]string `yaml:"driver_opts,omitempty"` + External yaml.External `yaml:"external,omitempty"` + PerContainer bool `yaml:"per_container,omitempty"` } // Ipam holds v2 network IPAM information diff --git a/vendor/github.com/docker/libcompose/yaml/command.go b/vendor/github.com/docker/libcompose/yaml/command.go index a9e4586..ace69b5 100644 --- a/vendor/github.com/docker/libcompose/yaml/command.go +++ b/vendor/github.com/docker/libcompose/yaml/command.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/docker/engine-api/types/strslice" + "github.com/docker/docker/api/types/strslice" "github.com/flynn/go-shlex" ) diff --git a/vendor/github.com/docker/libcompose/yaml/types_yaml.go b/vendor/github.com/docker/libcompose/yaml/types_yaml.go index 3c15235..b3c1126 100644 --- a/vendor/github.com/docker/libcompose/yaml/types_yaml.go +++ b/vendor/github.com/docker/libcompose/yaml/types_yaml.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "github.com/docker/engine-api/types/strslice" + "github.com/docker/docker/api/types/strslice" ) // StringorInt represents a string or an integer. diff --git a/vendor/github.com/rancher/rancher-compose/.drone.yml b/vendor/github.com/rancher/rancher-compose/.drone.yml index b0f0e2e..4898e8f 100644 --- a/vendor/github.com/rancher/rancher-compose/.drone.yml +++ b/vendor/github.com/rancher/rancher-compose/.drone.yml @@ -1,4 +1,9 @@ -image: rancher/dind:v1.10.0-rancher1 -script: - - wrapdocker - - make ci +--- +pipeline: + build: + privileged: true + image: rancher/dapper:1.10.3 + volumes: + - /var/run/docker.sock:/var/run/docker.sock + commands: + - dapper ci diff --git a/vendor/github.com/rancher/rancher-compose/Dockerfile.dapper b/vendor/github.com/rancher/rancher-compose/Dockerfile.dapper index 5295e69..4f64f7e 100644 --- a/vendor/github.com/rancher/rancher-compose/Dockerfile.dapper +++ b/vendor/github.com/rancher/rancher-compose/Dockerfile.dapper @@ -1,5 +1,5 @@ FROM golang:1.6 -RUN go get github.com/imikushin/trash +RUN go get github.com/rancher/trash RUN go get github.com/golang/lint/golint RUN curl -sL https://get.docker.com/builds/Linux/x86_64/docker-1.9.1 > /usr/bin/docker && \ chmod +x /usr/bin/docker diff --git a/vendor/github.com/rancher/rancher-compose/preprocess/project.go b/vendor/github.com/rancher/rancher-compose/preprocess/project.go index fe2ac80..0e9fe30 100644 --- a/vendor/github.com/rancher/rancher-compose/preprocess/project.go +++ b/vendor/github.com/rancher/rancher-compose/preprocess/project.go @@ -1,22 +1,111 @@ package preprocess import ( + "encoding/json" "fmt" + "strconv" "github.com/docker/libcompose/config" + "github.com/rancher/rancher-compose/utils" ) -func PreprocessServiceMap(serviceMap config.RawServiceMap) (config.RawServiceMap, error) { +type BindingProperty struct { + Services map[string]Service `json:"services"` +} + +type Service struct { + Labels map[string]interface{} `json:"labels"` + Ports []interface{} `json:"ports"` +} + +func PreprocessServiceMap(bindingsBytes []byte) func(serviceMap config.RawServiceMap) (config.RawServiceMap, error) { + return func(serviceMap config.RawServiceMap) (config.RawServiceMap, error) { + newServiceMap := make(config.RawServiceMap) + + var binding BindingProperty + var bindingsServices []string + + if bindingsBytes != nil { + err := json.Unmarshal(bindingsBytes, &binding) + if err != nil { + return nil, err + } + + for k := range binding.Services { + bindingsServices = append(bindingsServices, k) + } + } + + for k, v := range serviceMap { + newServiceMap[k] = make(config.RawService) + if bindingsBytes != nil { + if utils.Contains(bindingsServices, k) == true { + labelMap := make(map[interface{}]interface{}) + for key, value := range binding.Services[k].Labels { + labelMap[interface{}(key)] = value + } + if len(labelMap) != 0 { + v["labels"] = labelMap + } + if len(binding.Services[k].Ports) > 0 { + v["ports"] = binding.Services[k].Ports + } + } + } + for k2, v2 := range v { + if k2 == "environment" || k2 == "labels" { + newServiceMap[k][k2] = Preprocess(v2, true) + } else { + newServiceMap[k][k2] = Preprocess(v2, false) + } + + } + } + + return newServiceMap, nil + } +} + +func Preprocess(item interface{}, replaceTypes bool) interface{} { + switch typedDatas := item.(type) { + + case map[interface{}]interface{}: + newMap := make(map[interface{}]interface{}) + + for key, value := range typedDatas { + newMap[key] = Preprocess(value, replaceTypes) + } + return newMap + + case []interface{}: + // newArray := make([]interface{}, 0) will cause golint to complain + var newArray []interface{} + newArray = make([]interface{}, 0) + + for _, value := range typedDatas { + newArray = append(newArray, Preprocess(value, replaceTypes)) + } + return newArray + + default: + if replaceTypes && item != nil { + return fmt.Sprint(item) + } + return item + } +} + +func TryConvertStringsToInts(serviceMap config.RawServiceMap) (config.RawServiceMap, error) { newServiceMap := make(config.RawServiceMap) for k, v := range serviceMap { newServiceMap[k] = make(config.RawService) for k2, v2 := range v { - if k2 == "environment" || k2 == "labels" { - newServiceMap[k][k2] = Preprocess(v2, true) + if k2 == "disks" || k2 == "load_balancer_config" || k2 == "health_check" || k2 == "scale_policy" || k2 == "upgrade_strategy" || k2 == "service_schemas" { + newServiceMap[k][k2] = tryConvertStringsToInts(v2, true) } else { - newServiceMap[k][k2] = Preprocess(v2, false) + newServiceMap[k][k2] = tryConvertStringsToInts(v2, false) } } @@ -25,14 +114,14 @@ func PreprocessServiceMap(serviceMap config.RawServiceMap) (config.RawServiceMap return newServiceMap, nil } -func Preprocess(item interface{}, replaceTypes bool) interface{} { +func tryConvertStringsToInts(item interface{}, replaceTypes bool) interface{} { switch typedDatas := item.(type) { case map[interface{}]interface{}: newMap := make(map[interface{}]interface{}) for key, value := range typedDatas { - newMap[key] = Preprocess(value, replaceTypes) + newMap[key] = tryConvertStringsToInts(value, replaceTypes) } return newMap @@ -42,14 +131,19 @@ func Preprocess(item interface{}, replaceTypes bool) interface{} { newArray = make([]interface{}, 0) for _, value := range typedDatas { - newArray = append(newArray, Preprocess(value, replaceTypes)) + newArray = append(newArray, tryConvertStringsToInts(value, replaceTypes)) } return newArray - default: - if replaceTypes { - return fmt.Sprint(item) + case string: + lineAsInteger, err := strconv.Atoi(typedDatas) + + if replaceTypes && err == nil { + return lineAsInteger } + + return item + default: return item } } diff --git a/vendor/github.com/rancher/rancher-compose/trash.conf b/vendor/github.com/rancher/rancher-compose/trash.conf index 3d8ecee..58ad607 100644 --- a/vendor/github.com/rancher/rancher-compose/trash.conf +++ b/vendor/github.com/rancher/rancher-compose/trash.conf @@ -1,31 +1,31 @@ -github.com/Sirupsen/logrus v0.10.0 +github.com/Sirupsen/logrus 26709e2714106fb8ad40b773b711ebce25b78914 github.com/awslabs/aws-sdk-go 75d65bc91a02d9f67cf4a5297c46d4d2c4c09c6c github.com/urfave/cli v1.18.0 -github.com/docker/distribution 5bbf65499960b184fe8e0f045397375e1a6722b8 -github.com/docker/docker 534753663161334baba06f13b8efa4cad22b5bc5 -github.com/docker/engine-api 62043eb79d581a32ea849645277023c550732e52 -github.com/docker/go-connections 990a1a1a70b0da4c4cb70e117971a4f0babfbf1a -github.com/docker/libcompose 8afd773e5531623d91f62c332dd5b72bcf310e6a https://github.com/joshwget/libcompose/ +github.com/docker/distribution 77b9d2997abcded79a5314970fe69a44c93c25fb +github.com/docker/docker 8658748ef716e43a5f6d834825d818012ed6e2c4 +github.com/docker/go-connections 988efe982fdecb46f01d53465878ff1f2ff411ce +github.com/docker/libcompose bdd1f372661dff036f55f1d5ec7c67d04c572285 https://github.com/rancher/libcompose github.com/flynn/go-shlex 3f9db97f856818214da2e1057f8ad84803971cff github.com/gorilla/context 14f550f51a github.com/gorilla/mux e444e69cbd github.com/gorilla/websocket 1551221275a7bd42978745a376b2531f791d88f3 github.com/hashicorp/go-version 2b9865f60ce11e527bd1255ba82036d465570aa3 github.com/opencontainers/runc cc29e3dded8e27ba8f65738f40d251c885030a28 -github.com/rancher/event-subscriber 2e42f210dae2234d08786806100b4ddc4ce87641 -github.com/rancher/go-rancher 37c17e456a2d6dce279f54ee2f957797d30a20dc +github.com/pkg/errors 1d2e60385a13aaa66134984235061c2f9302520e +github.com/rancher/event-subscriber ddef5975d2b174e234d7232c811bd55e5e2bf22f +github.com/rancher/go-rancher af955cd2925739b199df4077fafaddfaa4834a2f github.com/rancher/rancher-catalog-service a3a8b500adceb82b3a0387b2c7b06a60e7eeee9a github.com/vaughan0/go-ini a98ad7ee00ec53921f08832bc06ecf7fd600e6a1 -golang.org/x/net 3a29182c25eeabbaaf94daaeecbc7823d86261e7 golang.org/x/crypto 4d48e5fa3d62b5e6e71260571bf76c767198ca02 -gopkg.in/yaml.v2 49c95bdc21843256fb6c4e0d370a05f24a0bf213 +golang.org/x/net 2beffdc2e92c8a3027590f898fe88f69af48a3f8 https://github.com/tonistiigi/net.git +golang.org/x/sys eb2c74142fd19a79b3f237334c7384d5167b1b46 +golang.org/x/time a4bde12657593d5e90d0533a3e4fd95e635124cb +gopkg.in/yaml.v2 e4d366fc3c7938e2958e662b4258c7a89e1f0e3e github.com/docker/go-units f2d77a61e3c169b43402a0a1e84f06daf29b8190 -github.com/cloudfoundry-incubator/candiedyaml 5cef21e2e4f0fd147973b558d4db7395176bcd95 github.com/vbatts/tar-split v0.9.11 github.com/Azure/go-ansiterm 388960b655244e76e24c75f48631564eaefade62 -github.com/Microsoft/go-winio v0.3.0 +github.com/Microsoft/go-winio v0.3.4 github.com/xeipuuv/gojsonschema ac452913faa25c08bb78810d3e6f88b8a39f8f25 github.com/xeipuuv/gojsonreference e02fc20de94c78484cd5ffb007f8af96be030a45 github.com/xeipuuv/gojsonpointer e0fe6f68307607d540ed8eac07a342c33fa1b54a github.com/spf13/pflag cb88ea77998c3f024757528e3305022ab50b43be -github.com/vdemeester/docker-events be74d4929ec1ad118df54349fda4b0cba60f849b diff --git a/vendor/github.com/rancher/rancher-compose/utils/util.go b/vendor/github.com/rancher/rancher-compose/utils/util.go new file mode 100644 index 0000000..a06d024 --- /dev/null +++ b/vendor/github.com/rancher/rancher-compose/utils/util.go @@ -0,0 +1,104 @@ +package utils + +import ( + "fmt" + "strings" +) + +func NestedMapsToMapInterface(data map[string]interface{}) map[string]interface{} { + newMapInterface := map[string]interface{}{} + for k, v := range data { + newMapInterface[k] = convertObj(v) + } + return newMapInterface +} + +func convertObj(v interface{}) interface{} { + switch k := v.(type) { + case map[interface{}]interface{}: + return mapWalk(k) + case map[string]interface{}: + return NestedMapsToMapInterface(k) + case []interface{}: + return listWalk(k) + default: + return v + } +} + +func listWalk(val []interface{}) []interface{} { + for i, v := range val { + val[i] = convertObj(v) + } + return val +} + +func mapWalk(val map[interface{}]interface{}) map[string]interface{} { + newMap := map[string]interface{}{} + for k, v := range val { + newMap[fmt.Sprintf("%v", k)] = convertObj(v) + } + return newMap +} + +func Contains(list []string, item string) bool { + for _, v := range list { + if v == item { + return true + } + } + return false +} + +func ToMapInterface(data map[string]string) map[string]interface{} { + ret := map[string]interface{}{} + + for k, v := range data { + ret[k] = v + } + + return ret +} + +func RemoveInterfaceKeys(data interface{}) interface{} { + switch value := data.(type) { + case map[interface{}]interface{}: + ret := map[string]interface{}{} + for k, v := range value { + ret[fmt.Sprintf("%v", k)] = v + } + return ret + case []interface{}: + for i, j := range value { + value[i] = RemoveInterfaceKeys(j) + } + case map[string]interface{}: + for k, v := range value { + value[k] = RemoveInterfaceKeys(v) + } + } + return data +} + +func MapUnion(left, right map[string]string) map[string]string { + ret := map[string]string{} + + for k, v := range left { + ret[k] = v + } + + for k, v := range right { + ret[k] = v + } + + return ret +} + +func TrimSplit(str, sep string, count int) []string { + result := []string{} + for _, i := range strings.SplitN(strings.TrimSpace(str), sep, count) { + result = append(result, strings.TrimSpace(i)) + } + + return result +} From 40d35ae17df895b588bcdfd18ecc25dc82dde621 Mon Sep 17 00:00:00 2001 From: rajashree Date: Mon, 7 Nov 2016 09:51:43 -0800 Subject: [PATCH 2/2] Updates rancher-compose in trash.conf --- model/bindings.go | 3 ++- trash.conf | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/model/bindings.go b/model/bindings.go index 65663ce..56c93bb 100644 --- a/model/bindings.go +++ b/model/bindings.go @@ -62,7 +62,8 @@ func ExtractBindings(yamlContent []byte) (BindingProperty, error) { } rawConfigDocker = config.Services - rawConfigDocker, err = preprocess.PreprocessServiceMap(rawConfigDocker) + preProcessServiceMap := preprocess.PreprocessServiceMap(nil) + rawConfigDocker, err = preProcessServiceMap(rawConfigDocker) if err != nil { log.Errorf("Error during preprocess : %v\n", err) return nil, err diff --git a/trash.conf b/trash.conf index 71eaae6..44baa53 100644 --- a/trash.conf +++ b/trash.conf @@ -5,7 +5,7 @@ github.com/gorilla/mux e444e69cbd github.com/gorilla/websocket 1551221275a7bd42978745a376b2531f791d88f3 github.com/rancher/go-rancher 37c17e456a2d6dce279f54ee2f957797d30a20dc gopkg.in/yaml.v2 49c95bdc21843256fb6c4e0d370a05f24a0bf213 -github.com/docker/libcompose 39b83d07f112b11233ef590658626cbb9e57f3f3 https://github.com/rancher/libcompose/ +github.com/docker/libcompose bdd1f372661dff036f55f1d5ec7c67d04c572285 https://github.com/rancher/libcompose github.com/docker/engine-api 62043eb79d581a32ea849645277023c550732e52 github.com/docker/go-connections 990a1a1a70b0da4c4cb70e117971a4f0babfbf1a github.com/cloudfoundry-incubator/candiedyaml 5cef21e2e4f0fd147973b558d4db7395176bcd95 @@ -13,10 +13,10 @@ github.com/xeipuuv/gojsonschema ac452913faa25c08bb78810d3e6f88b8a39f8f25 github.com/xeipuuv/gojsonreference e02fc20de94c78484cd5ffb007f8af96be030a45 github.com/xeipuuv/gojsonpointer e0fe6f68307607d540ed8eac07a342c33fa1b54a github.com/flynn/go-shlex 3f9db97f856818214da2e1057f8ad84803971cff -github.com/rancher/rancher-compose 017b29ba81b50a19ba3a35d096182739cec427f0 +github.com/rancher/rancher-compose c623d0cf5f04dc8fe3f1a16f524bd339eef7bcfd github.com/awslabs/aws-sdk-go 75d65bc91a02d9f67cf4a5297c46d4d2c4c09c6c github.com/docker/distribution 5bbf65499960b184fe8e0f045397375e1a6722b8 -github.com/docker/docker 534753663161334baba06f13b8efa4cad22b5bc5 +github.com/docker/docker b34b29e2379b51edcf45bf9cb70cf1cb4a409608 github.com/hashicorp/go-version 2b9865f60ce11e527bd1255ba82036d465570aa3 golang.org/x/net 3a29182c25eeabbaaf94daaeecbc7823d86261e7 golang.org/x/crypto 4d48e5fa3d62b5e6e71260571bf76c767198ca02 @@ -25,7 +25,6 @@ github.com/vbatts/tar-split v0.9.11 github.com/vdemeester/docker-events be74d4929ec1ad118df54349fda4b0cba60f849b github.com/vaughan0/go-ini a98ad7ee00ec53921f08832bc06ecf7fd600e6a1 github.com/opencontainers/runc ec01ae5f10516ac73eafb41456365a06f0e21065 -github.com/docker/docker/cliconfig ff3e187cc7a56ce102a61c1a4883f57fb1aed2f7 github.com/spf13/pflag cb88ea77998c3f024757528e3305022ab50b43be github.com/vdemeester/docker-events be74d4929ec1ad118df54349fda4b0cba60f849b github.com/spf13/pflag cb88ea77998c3f024757528e3305022ab50b43be