Commit Graph

4962 Commits

Author SHA1 Message Date
edee73b51b Merge pull request #511 from thaJeztah/18.03-backport-fix-stack-deploy-after-force
[18.03] Fix stack deploy re-deploying service after --force
2018-04-18 14:48:17 -07:00
b522d934b9 Merge pull request #498 from thaJeztah/18.03-backport-fix-version-output
[18.03] Fix docker version output alignment
2018-04-18 14:46:15 -07:00
da69d9e253 Add bash completion for secret|config create --template-driver
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 43024e2d57)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-18 10:18:01 -07:00
79e8ae0e9d docker load: Typofix in examples
Remove the double "docker docker" from example

Signed-off-by: Henry Ne <henrynmail-github@yahoo.de>
(cherry picked from commit 79c489d812)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-18 10:17:55 -07:00
39f7e7efd0 build.md: Document --build-arg without value
This use case is currently _working correctly_, which is nice, but there is no documentation to be found about it. This PR fixes that.

Signed-off-by: Per Lundberg <perlun@gmail.com>
(cherry picked from commit 82c23208ee)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-18 10:17:50 -07:00
766c24e554 Update examples to reflect docker-runc's runtime root for plugins.
Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
(cherry picked from commit 5fd9eab3d0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-18 10:17:44 -07:00
4e72a2fd51 Fix --format example for docker history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2f7bf40e73)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-18 10:17:39 -07:00
24306165c5 Use printf, not echo when creating secrets
Update the docs so that users don't use `echo` when creating
secrets from STDIN. `echo` adds a trailing new line, so users
will probably be confused when their passwords don't work.

Signed-off-by: Joao Fernandes <joao.fernandes@docker.com>
(cherry picked from commit 5238f3e93e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-18 10:17:33 -07:00
27540de1ad Update build.md
Explicitly stated that you must add --build-arg for each build argument.
Added multiple arguments to example of `--build-arg` usage.
Fix for https://github.com/docker/docker.github.io/issues/6248

Signed-off-by: Preston Cowley <cowlinator@gmail.com>
(cherry picked from commit ad44e2d45e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-18 10:17:26 -07:00
1df656a2f0 Clarify behaviour of restart policy in run ref doc
This clarifies that the behaviour of `unless-stopped` will restart the container on daemon start.  This was implied before, but now the restart-on-daemon-start behaviour is mentioned directly.

Signed-off-by: David Beitey <david@davidjb.com>
(cherry picked from commit 8ca237054f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-18 10:17:18 -07:00
bb68afd0fc Docs touch-ups for "autoremove" and broken anchor
`--rm` moved to the daemon, so is now also supported
when combined with `-d`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit e9ce688d6e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-18 10:17:11 -07:00
d602967356 Merge pull request #495 from thaJeztah/18.03-backport-972-fix-merge-network
[18.03] backport Fix error with merge composefile with networks…
2018-04-16 19:04:36 -07:00
aded7a8259 Fix stack deploy re-deploying service after --force
When updating a service with the `--force` option, the `ForceUpdate`
property of the taskspec is incremented.

Stack deploy did not take this into account, and reset this
field to its default value (0), causing the service to be
re-deployed.

This patch copies the existing value before updating the service.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 76439457d2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 15:42:45 -07:00
dc75023a9a Merge pull request #503 from jose-bigio/18.03_version_bump
[18.03] version bump to 18.03.1-ce-rc1
2018-04-11 23:24:42 -07:00
aff214cf5c Merge pull request #497 from thaJeztah/18.03-backport-fix-manifest-docs-typo
[18.03] [docs] Fix typo in manifest command docs: updated `MANFEST` to `MANIFEST`
2018-04-11 21:32:33 -07:00
4cff440f16 Merge pull request #499 from thaJeztah/18.03-backport-bump-golang-1.9.5
[18.03] bump golang to 1.9.5
2018-04-11 21:28:45 -07:00
a0c8cc80ab Fix docker version output alignment
Use tabwriter to print the version output

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 48eb7a082d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-11 19:13:58 -07:00
d6931c2d12 Fix error with merge composefile with networks…
… and other cases too. Updating mergo fixes the bugs (but introduced a
slight behaviour change that had to be fixed too)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 0122730faf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-11 14:41:04 -07:00
92f0dce1d1 Fix docker stack deploy reference flag
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 2ee9635b1e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-11 14:40:52 -07:00
7bfd67bece Fix imports in CLI compose test
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-11 11:39:36 -07:00
010ba8f1dd Fix test for trust inspect --pretty
This fix was part of 8c3d0b93d6,
but was reverted due to the order in which other changes were
backported.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 17:28:16 -07:00
7dd4bb6171 18.03.1-ce-rc1 version bump
Signed-off-by: jose-bigio <jose.bigio@docker.com>
2018-04-10 15:52:21 -07:00
566c20094c Remove filewatcher
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit c0588a9c8f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:21:13 -07:00
bc28daf367 Add more content trust tests
Importing from moby's DockerTrustSuite tests.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 8b00c5cfd8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:20:40 -07:00
a20423b7f7 Add a build unit test for symlinked context
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 00b803b2d8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:20:29 -07:00
8723ba6cc0 Remove unused powershell function
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 10baa756b2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:19:06 -07:00
c270672ced Fixes some unit tests to be able to run them on windows
Some of them are skipped for now (because the feature is not supported
or needs more work), some of them are fixed.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 0cf2e6353a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:18:59 -07:00
0d45d8f964 Add appveyor setup to build and unit test
Adds a `make.ps1` powershell script to make it easy to compile and test.

```
.\scripts\make.ps1 -Binary
INFO: make.ps1 starting at 03/01/2018 14:37:28
INFO: Building...

 ________   ____  __.
 \_____  \ |    |/ _|
 /   |   \|      <
 /    |    \    |  \
 \_______  /____|__ \
         \/        \/

INFO: make.ps1 ended at 03/01/2018 14:37:30

.\scripts\make.ps1 -TestUnit
```

The next step is to run e2e tests on windows too.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit facb22573d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:18:52 -07:00
311944ec04 Small content trust enhancement
- `replaceDockerfileForContentTrust` is only used when content trust is
  enabled, so remove the boolean.
- rename `isContentTrustEnabled` to `contentTrustEnabled`

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 63ebcae382)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:14:17 -07:00
ad89cb6a38 Only read trust setting from options
Rename IsTrusted to ContentTrustEnabled

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit feae0e9756)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:12:02 -07:00
aba0bb77e1 Refactor content_trust cli/flags handling
Remove the global variable used. Allows easier unit testing.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 6e21829af4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:07:03 -07:00
a20c69243b Cleanup config load error handling
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 789acb526c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:01:36 -07:00
bcb040440f Don't set a default filename for ConfigFile
With a default filename tests will leave a file in the working directory
that is never cleaned up.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 7c8b5708eb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:01:20 -07:00
2cc21bf56f Use new APIClient interface
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit cff874122c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:55:17 -07:00
a218857a9a Convert assert.Check(t, is.Error()) to assert.Error
git grep -l -P '^\s+assert\.Check\(t, is\.Error\(' | \
    xargs perl -pi -e 's/^(\s+assert\.)Check\(t, is\.Error\((.*)\)$/\1Error(t, \2/'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit e15b208e96)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:48:48 -07:00
a723f7351d manual clean of asserts
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit f21276575f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:48:41 -07:00
df9ed934e3 Convert assert.Check with
git grep -l -P '^\s+assert\.Check\(t, ' | \
    xargs perl -pi -e 's/^(\s+assert)\.Check(\(t, (?!is).*(\.Execute\(|\.Set\(|\.Write\(|\.Close\(|\.Untar\(|\.WriteFile\(|Validate\().*\)$)/\1.NilError\2/'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 078cbc9c4b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:48:34 -07:00
f7124ab5e4 Convert to assert.NilError
Using:

  git grep -l '^\s\+assert\.Check(t, err)$' | \
    xargs sed -i -e 's/^\(\s\+assert\)\.Check(t, err)$/\1.NilError(t, err)/'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit baf65a5502)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:48:09 -07:00
9550f71467 dont prompt for github creds in unit test
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 0f11a310fd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:45:49 -07:00
1f1816b098 Remove testutil
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 681c921528)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:40:48 -07:00
7c2863a6e0 Post migration fixes
Fix tests that failed when using cmp.Compare()
internal/test/testutil/assert
InDelta
Fix DeepEqual with kube metav1.Time
Convert some ErrorContains to assert

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 5155cda716)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:33:18 -07:00
fb9700fdbd Automated migration
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 39c2ca57c1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:29:47 -07:00
70083e56be Replace testify vendor with updated gotestyourself
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 5ef8835f23)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 13:54:23 -07:00
659ea5343c Update some assertions.
and fix some tests

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 93615dd967)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 13:54:15 -07:00
49dc9b064e Update gotestyourself dependency
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 98ba439f67)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 12:12:52 -07:00
45c8a7d911 Bump Golang to 1.9.5
go1.9.5 (released 2018/03/28) includes fixes to the compiler, go command, and
net/http/pprof package. See the Go 1.9.5 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.9.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d3b8ceb52c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-09 16:35:48 -07:00
64fe575962 [docs] Fix typo in manifest command docs: updated MANFEST to MANIFEST.
Signed-off-by: Bogdan Anton <contact@bogdananton.ro>
(cherry picked from commit 9fa6bd4174)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-09 13:31:04 -07:00
95930e8794 bump version to 18.03.0-ce
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-03-21 17:59:46 +00:00
fbedb97a27 Merge pull request #464 from jose-bigio/18.03_versionBump
[18.03] Version bump for 18.03-ce-rc4
2018-03-15 00:28:45 -07:00
7d9137fefc Merge pull request #461 from vdemeester/trust-updates
[18.03] move trust out of experimental
2018-03-14 10:23:54 -07:00