Commit Graph

812 Commits

Author SHA1 Message Date
Li Yi 814ced4b30 Using strings.Builder instead of string appending
Signed-off-by: Li Yi <denverdino@gmail.com>
2018-10-09 10:38:21 +08:00
Sebastiaan van Stijn 608b6632b0
Merge pull request #1407 from mindaugasrukas/transform
Allow to transform any source type into the target struct
2018-10-03 10:06:32 +02:00
Daniel Hiltgen a4aba23b85
Remove unused helath check func
During the refactoring for 18.09 the activate/update flows no longer
restart the engine explicitly but let the user do that when they're ready,
so the health check logic is no longer required.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
(cherry picked from commit f2b2061cc3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-10-02 20:52:34 +02:00
Mindaugas Rukas 83fd688fa2 Allow to transform any source type into the target struct
Signed-off-by: Mindaugas Rukas <momomg@gmail.com>
2018-10-02 16:06:08 +03:00
Daniel Hiltgen 4a888d3031 Refine how metadata dir is handled
This is a follow up PR to #1381 to address some of the review comments
we didn't get to.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
(cherry picked from commit c12e23a4c1)
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2018-10-01 14:28:11 -07:00
Andrew Hsu d7ae94b885 use gotest.tools/fs for TestActivateExpiredLicenseDryRun
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit a7488d1bcd)
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2018-09-28 14:50:52 -07:00
Daniel Hiltgen d486baebfc Expose licensing details before loading
Help the user understand which license they're about
to load in case they have multiple licenses they need to
figure out.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
(cherry picked from commit 5a97a93ae1)
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2018-09-28 14:37:02 -07:00
Tõnis Tiigi 00c0c7e12f
Merge pull request #1345 from AkihiroSuda/fix-kill-warning
connhelper: try sending SIGTERM before SIGKILL
2018-09-28 08:22:13 -07:00
Sebastiaan van Stijn 3e4e232e0d
Merge pull request #1195 from olljanat/34795-npipe-mount-type
Allow npipe volume type on stack file
2018-09-28 10:57:09 +02:00
Olli Janatuinen 0704d9a031 Allow npipe volume type on stack file
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
2018-09-27 18:47:20 +03:00
Silvin Lubecki 7d313cf865
Merge pull request #1385 from dhiltgen/revamp_master
Forward port #1381 to master
2018-09-26 15:29:33 +02:00
Sebastiaan van Stijn ec3daea021
Fix substitution with non-empty env-var
Due to a typo, substitution would not work if the given
environment-variable was set.

Given the following docker compose file;

```yaml
version: "3.7"

services:
  app:
    image: nginx:${version:-latest}
```

Deploying a stack with `$version` set would ignore the `$version`
environment variable, and use the default value instead;

```bash
version=alpine docker stack deploy -c docker-compose.yml foobar

Creating network foobar_default
Creating service foobar_app

docker service ls

ID                  NAME                MODE                REPLICAS            IMAGE               PORTS
rskkjxe6sm0w        foobar_app          replicated          1/1                 nginx:latest
```

This patch also fixes "soft default" not detecting empty environment variables,
only non-set environment variables.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-09-25 22:20:25 +02:00
Daniel Hiltgen 2f23c97d17 Fix lint glitches
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
(cherry picked from commit 6004d74b1f)
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2018-09-21 15:43:28 -07:00
Daniel Hiltgen b7ec4a42d9 Review comments
Address code review comemnts and purge additional dead code.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
(cherry picked from commit f250152bf4)
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2018-09-21 15:43:00 -07:00
Daniel Hiltgen f07f51f4c8 Refined engine implementations
Adapt the CLI to the host install model for 18.09.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
(cherry picked from commit 342afe44fb)
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2018-09-21 15:41:25 -07:00
Michael Crosby eacb812c26 Install binaries on host for upgrade
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit cfec8027ed)
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2018-09-21 15:40:35 -07:00
Vincent Demeester 54c19e67f6
Merge pull request #1378 from clnperez/manifest-inspect-insecure-fix
fix insecure manifest inspect with restrictive certs perms
2018-09-20 18:57:30 +02:00
Christy Norman d57adbc034 fix insecure manifest inspect with restrictive certs perms
If, for some reason, the certs directory has permissions that are
inaccessible by docker, we should still be able to fetch manifests using
the `insecure` flag.

Since the cli doesn't access the engine's list of insecure registries,
the registry client should make a singleton list of the registry being queried with the
`insecure` flag.

Closes #1358

Signed-off-by: Christy Norman <christy@linux.vnet.ibm.com>
2018-09-20 10:51:29 -05:00
Arash Deshmeh e9dc2293b1 refactor stack list command unit tests to table-driven
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2018-09-19 22:13:03 -04:00
Arash Deshmeh fc1e11d46a moved integration test TestExportContainerWithOutputAndImportImage from moby/moby to docker/cli.
The integration test TestExportContainerWithOutputAndImportImage in moby/moby is the same as TestExportContainerAndImportImage,
except for the output file option. Adding a unit test to cover the output file option of the export command here allows
the removal of the redundant integration test TestExportContainerWithOutputAndImportImage.

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2018-09-18 12:30:49 -04:00
Sebastiaan van Stijn b4180e8757
Merge pull request #1371 from jhowardmsft/jjh/importlcow
LCOW: --platform on import (already in API)
2018-09-14 13:00:20 +02:00
Tibor Vass a90b99edfc system/df: allow -v with --format
This allows to provide more information for build cache disk usage.

Signed-off-by: Tibor Vass <tibor@docker.com>
2018-09-13 23:14:58 +00:00
John Howard b55a0b681f LCOW: --platform on import (already in API)
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-09-13 15:04:04 -07:00
Sebastiaan van Stijn 1921a6c051
Merge pull request #1354 from nashasha1/fix/some-typo
Fix some typo
2018-09-12 14:53:38 +02:00
Sebastiaan van Stijn bd906df601
Merge pull request #1352 from Lihua93/fix/typo
Typo fix
2018-09-12 14:28:05 +02:00
Sebastiaan van Stijn 82dff32bb4
Merge pull request #1362 from vdemeester/engine-only-linux
Add `docker engine` commands only on Linux…
2018-09-11 16:52:01 +02:00
Silvin Lubecki 2eb9b0cba2
Merge pull request #1361 from vdemeester/contains-containerized
Remove containerizedengine package dependency from docker/cli/command…
2018-09-11 15:54:13 +02:00
Vincent Demeester a3a955f204
Add `docker engine` commands only on Linux…
… this is, for now, the only platform that is supported

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-09-11 15:23:22 +02:00
Vincent Demeester 2d344b2f61
Remove containerizedengine package dependency from docker/cli/command…
… this removes a whole lot of dependencies from people depending on docker/cli…

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-09-11 14:46:30 +02:00
Sebastiaan van Stijn 11ef349c58
Merge pull request #1326 from shin-/compose-json-annotations
Allow marshalling of Compose config to JSON
2018-09-11 14:40:21 +02:00
Benoit Sigoure 7e9e2c10bc cli/config/configfile: Atomically rewrite the config file when saving.
The config file was being truncated first, which created a window during
which it was empty, causing concurrent uses of the `docker` command to
potentially fail with:
  WARNING: Error loading config file: /var/lib/jenkins/.docker/config.json: EOF
  Error response from daemon: Get https://registry/v2/foo/manifests/latest: no basic auth credentials

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
2018-09-10 13:43:24 -07:00
Joffrey F e7788d6f9a Allow marshalling of Compose config to JSON
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-09-10 11:16:05 -07:00
Xiaodong Zhang f8e04011e4 Fix some typo
Signed-off-by: Xiaodong Zhang <a4012017@sina.com>
2018-09-07 17:18:00 +08:00
Akihiro Suda acbb0eb6da connhelper: try sending SIGTERM before SIGKILL
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-09-07 18:13:35 +09:00
Lihua Tang ca5e453180 Typo fix
Signed-off-by: Lihua Tang <lhtang@alauda.io>
2018-09-07 13:28:02 +08:00
Akihiro Suda a22853e64d connhelper: fix cmd.Wait() race
Fix #1336

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-09-06 01:28:50 +09:00
Tibor Vass ca608c2302 system df: show table output for build cache
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-09-05 03:31:40 +00:00
Tibor Vass c806eb49c9 build: add options to builder prune
This patch adds --filter, --keep-storage, --all and --force to builder prune.

Signed-off-by: Tibor Vass <tibor@docker.com>
2018-09-05 00:01:16 +00:00
Sebastiaan van Stijn 3ea56aa0ca
Merge pull request #1191 from adshmh/add-unit-tests-to-plugin-inspect-command
add unit tests to plugin inspect command
2018-08-31 14:39:58 +02:00
Silvin Lubecki 1546d71de5
Merge pull request #1098 from dhiltgen/long_help
Show long help message when defined
2018-08-30 18:07:10 +02:00
Arash Deshmeh 14b696a297 added unit tests to plugin inspect command
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2018-08-29 16:48:43 -04:00
Sebastiaan van Stijn a500c394df
Move "session" support out of experimental for API 1.39 and up
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-08-22 00:51:19 +02:00
Sebastiaan van Stijn 60c75fda67
Remove "experimental" annotations for buildkit
BuildKit can now be enabled without the daemon having
experimental features enabled.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-08-22 00:38:59 +02:00
Sebastiaan van Stijn 3c27ce21c9
Use warnings provided by daemon
Warnings are now generated by the daemon, and returned as
part of the /info API response.

If warnings are returned by the daemon; use those instead
of generating them locally.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-08-21 22:29:57 +02:00
selansen 587a94c935 Global Default Address Pool feature support
This feature brings new attribute/option for swarm init command.
default-addr-pool will take string input which can be in below format.
"CIDR,CIDR,CIDR...:SUBNET-SIZE".
Signed-off-by: selansen <elango.siva@docker.com>
2018-08-21 14:34:00 -04:00
Anda Xu acf43b62b5 vendor dependency
Signed-off-by: Anda Xu <anda.xu@docker.com>
2018-08-20 15:32:25 -07:00
Anda Xu ef09ca8987 enable buildkit as builder from daemon; no env var needs to be set
Signed-off-by: Anda Xu <anda.xu@docker.com>
2018-08-20 11:59:39 -07:00
Daniel Hiltgen fd2f1b3b66 Add engine commands built on containerd
This new collection of commands supports initializing a local
engine using containerd, updating that engine, and activating
the EE product

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2018-08-20 09:42:05 -07:00
mmacy c11acddfb5 [WIP] fix trust inspect typo 'AdminstrativeKeys'
Signed-off-by: mmacy <marsma@microsoft.com>
2018-08-19 17:57:04 -07:00
Andrew Hsu f472a1a480
Merge pull request #1296 from tiborvass/build-progress-flag-no-api-requirement
build: Remove API requirement for --progress as it is CLI only
2018-08-17 18:31:25 -07:00