Commit graph

3532 commits

Author SHA1 Message Date
Antonio Murdaca
e76138c35f integration-cli: fix --net=none tests
Example:

21:28:01 [d68573521] waiting for daemon to start
21:28:01 [d68573521] daemon started
21:28:01 docker_api_swarm_test.go:163:
21:28:01     c.Assert(d1.Init(map[string]bool{"worker": true}, ""),
checker.IsNil)
21:28:01 ... value *errors.errorString =
&errors.errorString{s:"initializing swarm: invalid statuscode 500,
\"{\\\"message\\\":\\\"could not determine local IP address: dial udp
8.8.8.8:53: connect: network is unreachable\\\"}\\n\"} ("initializing
swarm: invalid statuscode 500, \"{\\\"message\\\":\\\"could not
determine local IP address: dial udp 8.8.8.8:53: connect: network is
unreachable\\\"}\\n\"")
21:28:01
21:28:01 [d68573521] exiting daemon"}

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
(cherry picked from commit 9fadb8fd6a)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-12 15:43:38 -07:00
Tonis Tiigi
b008283a7f Add more complicated demotion testcases
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit a3f1577365)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-12 15:43:38 -07:00
Justin Cormack
a654ab1e89 Fix test case for docker_api_swarm_test.go
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
(cherry picked from commit 6dfba780cc)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:33:28 -07:00
Aaron Lehmann
a00d12a8dd Generate a swarm joining secret if none is specified
The current behavior of `docker swarm init` is to set up a swarm that
has no secret for joining, and does not require manual acceptance for
workers. Since workers may sometimes receive sensitive data such as pull
credentials, it makes sense to harden the defaults.

This change makes `docker swarm init` generate a random secret if none
is provided, and print it to the terminal. This secret will be needed to
join workers or managers to the swarm. In addition to improving access
control to the cluster, this setup removes an avenue for
denial-of-service attacks, since the secret is necessary to even create
an entry in the node list.

`docker swarm init --secret ""` will set up a swarm without a secret,
matching the old behavior. `docker swarm update --secret ""` removes the
automatically generated secret after `docker swarm init`.

Closes #23785

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 7342e42fce)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:33:27 -07:00
Anusha Ragunathan
61dc82f423 Detect non-plugin content during install and error out.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit d32df6d934)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:34 -07:00
Brian Goff
843b4a93fe Use newer default values for mounts CLI
In the API:
`Writable` changed to `ReadOnly`
`Populate` changed to `NoCopy`

Corresponding CLI options updated to:
`volume-writable` changed to `volume-readonly`
`volume-populate` changed to `volume-nocopy`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 56f3422468)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:30 -07:00
Brian Goff
85aefec45a Implement service integration tests
This is done in a hacky way as currently there is no better way.
Uses known implementation details about how tasks are scheduled to be
able to operate on the underlying container.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit e5ec575b32)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:22 -07:00
Antonio Murdaca
3bf23479cf integration-cli: ensure digest is the same after cross-repo push
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
(cherry picked from commit a0c8970df1)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:22 -07:00
Derek McGowan
dd7fe47136 Treat digest only images as dangling
Add test for dangling digest images

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
(cherry picked from commit 8906f8307c)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:14 -07:00
Derek McGowan
d81ed3eb4c Always store the image digest when pulling and pushing an image.
Always attempt to add digest even when tag already exists.
Ensure digest does not currently exist.
When image id is mismatched, output an error log.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
(cherry picked from commit 33984f256b)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:14 -07:00
Lei Jitang
9d4117ae18 Add NoArm64 testRequires and skip Schema1RegistrySuite on arm64
schema1 manifests is not working on ARM64, we should skip integration-cli
tests for schema1 manifests on ARM64.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
(cherry picked from commit 9c1566a1df)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:13 -07:00
Lei Jitang
a8bd5c65cc Add fchmod and fchmodat to TestRunSeccompProfileDenyChmod
Signed-off-by: Lei Jitang <leijitang@huawei.com>
(cherry picked from commit 8c179348c3)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:31:44 -07:00
Otto Kekäläinen
664c75ebba Fix spelling in comments, strings and documentation
Signed-off-by: Otto Kekäläinen <otto@seravo.fi>
(cherry picked from commit 644a7426cc)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:31:42 -07:00
John Howard
ddae91f21a Windows: Skip RunCidFileCleanupIfEmpty on RS1
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 20424fccdd)
2016-07-01 00:39:50 -07:00
John Howard
9185a0a681 Windows: Skip TestBuildEmptyCmd on RS1
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 45da127442)
2016-07-01 00:39:50 -07:00
Yong Tang
b34706b152 Use HOSTNAME in the output of docker node ls
This fix tries to address an issue raised in #24090 where
the title field of `docker node ls` use NAME instead of
HOSTNAME. Yet the content of this field is actually
hostname.

The fix makes needed changes for the output of
`docker node ls`.

An additional test has been added to cover the change in
this fix.

This fix fixes #24090.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 4bc91ceeb7)
2016-06-30 17:12:45 -07:00
Tonis Tiigi
f492978638 Add test for force-new-cluster
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 1acb8ef825)
2016-06-30 16:57:31 -07:00
Tonis Tiigi
7b70250d07 Switch node management tests to api types
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 22b34d6449)
2016-06-30 16:57:31 -07:00
Wonjun Kim
9ce196dc3c Add integration tests for swarm incompatible
Signed-off-by: Wonjun Kim <wonjun.kim@navercorp.com>
(cherry picked from commit d71789828f)
2016-06-30 16:57:21 -07:00
Anusha Ragunathan
43186c4304 Fix daemon tests.
Fix two test issues:
- pidof is not available in PATH on some Jenkins systems (rhel, centos)
  Use kill -0 instead.
- Cleanup after plugin test. This is a stop gap fix. The right way to
  fix this, is to shutdown the plugin on daemon shutdown path (except
  for the live-restore case). This will be done in a follow up PR.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit 6d36431e23)
2016-06-30 16:47:53 -07:00
Anusha Ragunathan
8ac21ed2d4 Add plugin restore tests.
Also live restore is stable now. So move experimental tests out to stable.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit 006d58d7e6)
2016-06-30 16:47:51 -07:00
Kenfe-Mickael Laventure
7a5e247d01 Use "docker-runc" as alias for the default runtime
This also moves the variable holding the default runtime name from the
engine-api repository into docker repository

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit 69af7d0d13)
2016-06-30 16:47:51 -07:00
Tonis Tiigi
e5fb8b1fb6 Disable iptables in swarm test daemons
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit caaf92f7b4)
2016-06-30 16:47:50 -07:00
Sainath Grandhi
eebd6ac4df docker rename fix to address the issue of renaming with the same name issue #23319
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
(cherry picked from commit 3e8c16ef6d)
2016-06-30 16:47:48 -07:00
Tonis Tiigi
de5fd9d641 Increase test timeouts for node state changes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 2e5da44341)
2016-06-30 16:47:47 -07:00
Alvaro Saurin
c2b195d3c2 Make sure we are trying to unmount a mounted /etc/resolv.conf
Signed-off-by: Alvaro Saurin <alvaro.saurin@gmail.com>
(cherry picked from commit 41cc7c4d9d)
2016-06-30 16:47:47 -07:00
Alvaro Saurin
3e6c39e2ee Make sure we compare strings with the same capitalization
Signed-off-by: Alvaro Saurin <alvaro.saurin@gmail.com>
(cherry picked from commit ded347e744)
2016-06-30 16:47:47 -07:00
Tonis Tiigi
3d06cd4910 Unify swarm init and update options
Add api side validation and defaults for init and
join requests.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit fb3eb1c27e)
2016-06-30 16:47:44 -07:00
nick
62d50a3f13 Fix misspell typos
Signed-off-by: nick <nicholasrusso@icloud.com>
(cherry picked from commit 7135afa79b)
2016-06-30 16:47:43 -07:00
Derek McGowan
aa123b73d1 Add tests for rmi
Add integration test for removing by image id with tag and digest reference to the same repository.
Add integration test to ensure only tag to other repository remains after deleting tag with accompanying digest reference.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
(cherry picked from commit 5cff374b14)
2016-06-30 16:47:39 -07:00
Tonis Tiigi
8a994d4724 Don’t try to restore swarm from incomplete state
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit ded1d9af38)
2016-06-30 16:47:37 -07:00
Yong Tang
92ffbd2b52 Fix docker start error with renamed container
This fix tries to fix the issue raised in #23716 where `docker start`
causes an error of `No such container:` if the container has been
renamed before `docker start` returns.

The issue is that `docker start` use container name passed at the
beginning to check for exit code at the end of the `docker start`.

This fix addresses the issue by always use container's `ID` to get
the information during `docker start`.

Additional integration tests have been added to cover this fix.

This fix fixes #23716.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 6e86733b47)
2016-06-30 16:47:37 -07:00
Arnaud Porterie (icecrime)
f1f2461e09 Change docker service update semantics
Change `docker service update` to replace attributes of the target
service rather than augment them. One particular occurrence where the
previous behavior proved problematic is when trying to update a port
mapping: the merge semantics provided no way of removing published
ports, but strictly of adding more.

The utility merge* functions where renamed accordingly to update*.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
(cherry picked from commit 1f8ab93b44)
2016-06-18 20:58:23 -07:00
Tibor Vass
f24e5d79bc plugins: install should not automatically accept all permissions
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 4b70d4561e)
2016-06-17 13:09:12 -07:00
Anusha Ragunathan
82608cd4ce Add disable flag for plugin Install.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit 22e781e8e3)
2016-06-17 13:09:11 -07:00
Tonis Tiigi
0efe76c62b Add integration test for parsing swarm update options
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit a933ac3c27)
2016-06-16 23:36:58 -07:00
Tonis Tiigi
efc10a92ef Fix removing containers on leaving from pending state
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 826f6f0703)
2016-06-16 23:36:58 -07:00
Tonis Tiigi
0cac3c4c23 Return membership status on join without timeout
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 1973cee0cd)
2016-06-16 23:36:57 -07:00
Derek McGowan
56b253fb3c Do not show empty tags for digest references in output
When a repository has a tag and digests, show tag for each digest value.
Do not duplicate rows for the same image name with both tag and digest.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
(cherry picked from commit 79eada3814)
2016-06-16 23:36:57 -07:00
Yong Tang
1ad7b517fa Add security info to docker info
The security infomation has already been added to `GET /info` in #21172.
However, it is not part of the output of `docker info` yet.

This fix adds the security information to `docker info`.

Additional tests has been added to cover changes.

This fix fixes #23500. This fix is related to #20909, #21172.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit eee20b564f)
2016-06-16 23:36:56 -07:00
Tonis Tiigi
01d26abd5c Add api tests for secret update
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit aed7667bee)
2016-06-16 23:36:55 -07:00
Victor Vieux
7cc76facba fix docker swarm init/update --secret
Signed-off-by: Victor Vieux <vieux@docker.com>
(cherry picked from commit 085895342c)
2016-06-16 23:36:54 -07:00
Thomas Leonard
979ad07925 Remove out-of-date health test
The test was waiting for the container to exit after failing its
healthcheck. However, we no longer automatically terminate containers,
so this waited instead for the container to time-out by itself.

Signed-off-by: Thomas Leonard <thomas.leonard@docker.com>
(cherry picked from commit 18a59bb869)
2016-06-16 23:36:53 -07:00
Anusha Ragunathan
3e44703cae Add basic integration tests for plugins.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit a2d48c9e4e)
2016-06-16 23:36:53 -07:00
Kenfe-Mickael Laventure
e324ec639b Fix TestRunWithRuntime* on arm
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit bd6317031b)
2016-06-16 23:36:52 -07:00
Tonis Tiigi
ca16a4c81d Fix hanging integration tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 22f827abab)
2016-06-16 23:36:51 -07:00
Antonio Murdaca
034d555d30 daemon: allow tmpfs to trump over VOLUME(s)
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
(cherry picked from commit 756f6cef4a)
2016-06-16 23:36:51 -07:00
Arnaud Porterie
91197953d0 Merge pull request #23524 from aboch/restore
Daemon to support network restore
2016-06-15 02:33:16 +00:00
Arnaud Porterie
574f7d2149 Merge pull request #23551 from tonistiigi/update-swarmkit
Update swarmkit to 25572005f
2016-06-15 02:25:31 +00:00
Michael Crosby
cd03a68d31 Merge pull request #23530 from crosbymichael/exp-tests
Kill containers after restart tests
2016-06-14 17:43:52 -07:00
Brian Goff
6ed921dc38 Merge pull request #23446 from tiborvass/plugins-experimental
Plugins: experimental support for new plugin management
2016-06-14 20:32:14 -04:00
Tonis Tiigi
b38408fd02 Update drain test
With the rolling update there can be a possibility
that the container count matches the update has
completely finished yet.

The actual bug for the flakiness was fixed with the
swarmkit update.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-06-14 17:25:17 -07:00
Lei Jitang
7d0689a8d3 Add test case for network restore
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-06-14 16:45:30 -07:00
Michael Crosby
e07d78d247 Kill containers after restart tests
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-06-14 16:17:36 -07:00
Michael Crosby
c97fdbe3c5 Merge pull request #23415 from aboch/ll
Allow user to specify container's link-local addresses
2016-06-14 15:47:54 -07:00
Alessandro Boch
1c4efb6aa0 Allow user to specify container's link-local addresses
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-06-14 14:28:33 -07:00
Tibor Vass
f37117045c plugins: experimental support for new plugin management
This patch introduces a new experimental engine-level plugin management
with a new API and command line. Plugins can be distributed via a Docker
registry, and their lifecycle is managed by the engine.
This makes plugins a first-class construct.

For more background, have a look at issue #20363.

Documentation is in a separate commit. If you want to understand how the
new plugin system works, you can start by reading the documentation.

Note: backwards compatibility with existing plugins is maintained,
albeit they won't benefit from the advantages of the new system.

Signed-off-by: Tibor Vass <tibor@docker.com>
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-06-14 14:20:27 -07:00
Brian Goff
9c52b11e2a TestCleanupMountsAfterGracefulShutdown wait for daemon exit
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-06-14 17:14:53 -04:00
Michael Crosby
6381ed14d1 Merge pull request #22983 from mlaventure/multiple-runtimes
Add support for multiple runtimes
2016-06-14 11:59:34 -07:00
Tonis Tiigi
32f18616c7 Temporarily skip flaky part of the drain test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-06-14 10:20:40 -07:00
Kenfe-Mickael Laventure
77efe6dffc Skip TestRunResolvconfUpdate as it is unstable
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-14 07:47:31 -07:00
Kenfe-Mickael Laventure
1f266d40f3 Fix race in DockerExternalGraphdriverSuite.TestExternalGraphDriver
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-14 07:47:31 -07:00
Kenfe-Mickael Laventure
7b2e5216b8 Add support for multiples runtimes
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-14 07:47:31 -07:00
Tibor Vass
a1e319e847 Merge pull request #23361 from docker/swarm
Add dependency to docker/swarmkit
2016-06-14 00:55:55 -07:00
Vincent Demeester
7d988a7aa6 Merge pull request #23093 from tkopczynski/20784-builder-dockerfile-outside-context
Builder integration tests for Dockerfile outside context as a unit test
2016-06-14 08:44:24 +02:00
Daniel Nephin
12a00e6017 Add Swarm management CLI commands
As described in our ROADMAP.md, introduce new Swarm management commands
to call to the corresponding API endpoints.

This PR is fully backward compatible (joining a Swarm is an optional
feature of the Engine, and existing commands are not impacted).

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-06-13 22:17:15 -07:00
Tonis Tiigi
0d88d5b64b Swarm integration tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-06-13 22:16:18 -07:00
Michael Crosby
3020081e94 Merge pull request #23213 from crosbymichael/restore-option
Add --live-restore flag
2016-06-13 20:57:19 -07:00
Michael Crosby
d705dab1b1 Add --live-restore flag
This flags enables full support of daemonless containers in docker.  It
ensures that docker does not stop containers on shutdown or restore and
properly reconnects to the container when restarted.

This is not the default because of backwards compat but should be the
desired outcome for people running containers in prod.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-06-13 19:16:26 -07:00
Vincent Demeester
5338ae7133 Merge pull request #23425 from runcom/authz-race
pkg: authorization: lock when lazy loading
2016-06-13 23:20:37 +02:00
Antonio Murdaca
d1b7e8373b authz: cleanups
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-06-12 17:23:19 +02:00
Vincent Demeester
4dafd107ad Merge pull request #22777 from WeiZhang555/wait-restarting
Bug fix: `docker run -i --restart always` hangs
2016-06-12 13:01:20 +02:00
Yong Tang
d917723331 Fix incorrect usage of logrus when formatting string is present
This fix tries to fix logrus formatting by adding `f` to the end of
`logrus.[Error|Warn|Debug|Fatal|Panic|Info](` when formatting string
is present but the function `logrus.[Error|Warn|Debug|Fatal|Panic|Info](`
is used (incorrectly).

This fix is related to #23459, and is a follow up of #23461.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-11 15:37:36 -07:00
Vincent Demeester
51f0def774 Merge pull request #23400 from runcom/fix-digest-test
integration-cli: use distribution/reference.DigestRegexp
2016-06-10 11:56:14 +02:00
Antonio Murdaca
0bc88d5b0a integration-cli: use distribution/reference.DigestRegexp
from a docker push output digest.DigestRegexp.FindString(output) does
not retrive the sha256: prefixed digest but just a string - in many
cases it's the registry host. The checks in the code are completely
wrong then. Fix this by using the DigestRegexp from the
distribution/reference package which correctly retrieves the digest
from the output.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-06-09 11:11:08 +02:00
Jess Frazelle
982c5f199f
fix default tmpfs size to prevent breakage
Signed-off-by: Jess Frazelle <me@jessfraz.com>
2016-06-09 00:58:06 -07:00
Sebastiaan van Stijn
7d22eb072c
fix TestEventsContainerWithMultiNetwork
the order in which disconnect takes place is undetermined,
so don't check for the full name

this test was passing due to a previous bug, that
always returned the same network-name.

this bug was recently fixed in 148bcda329
(pull request 23375), exposing this test to be
flaky.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-06-08 23:09:20 +02:00
Alexander Morozov
3b08711bb7 Merge pull request #23343 from vdemeester/migrate-build-to-cobra
Use spf13/cobra for docker build
2016-06-08 11:59:48 -07:00
Michael Crosby
393e97e435 Merge pull request #23002 from Microsoft/jjh/readonly
Windows: Support RO volumes 14350+
2016-06-08 11:18:48 -07:00
Brian Goff
9db33b7646 Merge pull request #23377 from vdemeester/carry-pr-23007
Carry #23007 :  Say something useful during docker load
2016-06-08 13:42:22 -04:00
Vincent Demeester
148bcda329 Merge pull request #23375 from HackToday/fixnetworkmap
Fix wrong map usage
2016-06-08 18:19:08 +02:00
Doug Davis
6986a3220f Say something useful during docker load
During a `docker load` there are times when nothing is printed
to the screen, leaving the user with no idea whether something happened.
When something *is* printed, often its just something like:
```
1834950e52ce: Loading layer 1.311 MB/1.311 MB
5f70bf18a086: Loading layer 1.024 kB/1.024 kB
```
which isn't necessarily the same as the image IDs.

This PR will either show:
- all of the tags for the image, or
- all of the image IDs if there are no tags

Sample output:
```
$ docker load -i busybox.tar
Loaded image: busybox:latest

$ docker load -i a.tar
Loaded image ID: sha256:47bcc53f74dc94b1920f0b34f6036096526296767650f223433fe65c35f149eb
```

IOW, show the human-friendly stuff first and then only if there are no tags
default back to the image IDs, so they have something to work with.

For me this this is needed because I have lots of images and after a
recent `docker load` I had no idea what image I just imported and had a
hard time figuring it out.  This should fix that by telling the user
which images they just imported.

I'll add tests once there's agreement that we want this change.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-06-08 17:17:05 +02:00
Kai Qiang Wu(Kennan)
1cac7e6cbd Fix wrong map usage
As map reference, if all networks use same, it could cause strange
results.
Closes: #23304
Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2016-06-08 14:36:47 +00:00
Ben Firshman
322e2a7d05 Return remote API errors as JSON
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-06-07 18:45:27 -07:00
John Howard
8d174a43ba Windows: Support RO volumes 14350+
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-06-07 14:55:36 -07:00
Brian Goff
ce96ce9e05 Merge pull request #23311 from WeiZhang555/cobra-rm
Migrate rm command to cobra
2016-06-07 17:05:21 -04:00
Alexander Morozov
8cd6977f98 Merge pull request #23338 from vdemeester/23253-fix-create-run
Fix create command flags
2016-06-07 10:46:45 -07:00
Vincent Demeester
60f447b655
Migrate docker build to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-07 18:15:44 +02:00
Sebastiaan van Stijn
7c46ba02e6
add support for filtering by network ID
This adds support for filtering by network ID, to be
consistent with other filter options.

Note that only *full* matches are returned; this is
consistent with other filters (e.g. volume), that
also return full matches only.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-06-07 16:50:31 +02:00
Sainath Grandhi
912af1ae8f Adding network filter to docker ps command
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
2016-06-07 16:43:11 +02:00
Zhang Wei
7702f39fe8 Migrate rm command to cobra
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-06-07 22:19:16 +08:00
Sebastiaan van Stijn
085f41b6a5
Fix TestRenameInvalidName
Change the test back to what it was before
e83dad090a

And added an extra test-case to check the
output if an incorrect number of arguments
is passed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-06-07 15:42:48 +02:00
Vincent Demeester
aa00520fc8
Fix create command flags
Any command that expects extra flags after positional args needs to set flags.SetInterspersed(false).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-07 14:11:11 +02:00
Sebastiaan van Stijn
f061f556f2 Merge pull request #23269 from vdemeester/migrate-import-to-cobra
Use spf13/cobra for docker import
2016-06-07 13:07:30 +02:00
Vincent Demeester
148d2b8e4a Merge pull request #22149 from vdemeester/deprecated-copy-endpoint
Deprecate /containers/(id or name)/copy endpoint
2016-06-07 12:50:04 +02:00
Sebastiaan van Stijn
eb6b5a6448 Merge pull request #23172 from michael-holzheu/PR-s390x-seccomp
Enable seccomp for s390x and ppc: s390x part
2016-06-07 12:04:13 +02:00
Vincent Demeester
f9021838b6 Merge pull request #23226 from HackToday/fixnetinspectId
Fix the network inspect id
2016-06-07 10:02:17 +02:00
Vincent Demeester
e83dad090a Merge pull request #23290 from yongtang/23211-spf13-cobra-rename
Use spf13/cobra for docker rename
2016-06-07 08:28:27 +02:00
Brian Goff
ab821f9f9b Merge pull request #23274 from WeiZhang555/cobra-attach
Move attach command to cobra
2016-06-06 21:16:45 -04:00
Yong Tang
70f7ccb304 Use spf13/cobra for docker rename
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker rename` to use spf13/cobra

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-06 12:39:11 -07:00