Commit Graph

7281 Commits

Author SHA1 Message Date
Sebastiaan van Stijn d443b74091
Merge pull request #1856 from arthrp/master
Forcing the creation of tmp directory
2020-01-20 14:04:39 +01:00
Silvin Lubecki 52714e413c
Merge pull request #2263 from thaJeztah/bump_miekg_pkcs11
vendor: bump miekg/pkcs11 v1.0.3
2020-01-17 16:32:47 +01:00
Silvin Lubecki 7d087b5aa6
Merge pull request #1950 from RahulZoldyck/1943-bug-fix
Add log-driver and options to service inspect "pretty" format
2020-01-17 15:42:22 +01:00
Rahul Zoldyck 139af1f6d6
Add log-driver and options to service inspect "pretty" format
Signed-off-by: Rahul Zoldyck <rahulzoldyck@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-17 15:10:36 +01:00
Sebastiaan van Stijn 84c6b08cf6
Update Golang 1.12.15
full diff: https://github.com/golang/go/compare/go1.12.14...go1.12.15

go1.12.15 (released 2020/01/09) includes fixes to the runtime and the net/http
package. See the Go 1.12.15 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.12.15+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-17 15:00:22 +01:00
Sebastiaan van Stijn b53ffd6c1f
vendor: bump miekg/pkcs11 v1.0.3
full diff: https://github.com/miekg/pkcs11/compare/v1.0.2...v1.0.3

- miekg/pkcs11#100 Add typed convenience `Find...` methods to `Session`
- miekg/pkcs11#115 Add CK_EFFECTIVELY_INFINITE and CK_UNAVAILABLE_INFORMATION

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-16 17:30:06 +01:00
Sebastiaan van Stijn c6d10b6da0
Merge pull request #2091 from mikesir87/user-group-info
Add clarification when using USER UID:GID
2020-01-16 15:24:28 +01:00
Silvin Lubecki d05846d2cb
Merge pull request #2260 from thaJeztah/fix_comment_formatting
Fix comment formatting and minor linting issue
2020-01-16 14:55:38 +01:00
Sebastiaan van Stijn 1d6445dc99
opts: fix formatting of comments
Comments should have a leading space unless the comment is
for special purposes (go:generate, nolint:)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-16 12:48:09 +01:00
Sebastiaan van Stijn e7f720b0a6
cli/config: fix formatting of comments
Comments should have a leading space unless the comment is
for special purposes (go:generate, nolint:)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-16 12:47:49 +01:00
Sebastiaan van Stijn 73dcf50d5a
cli/command: fix formatting of comments, and minor linting issues
Comments should have a leading space unless the comment is
for special purposes (go:generate, nolint:)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-16 12:47:12 +01:00
Sebastiaan van Stijn 6e5528b650
e2e: fix formatting of comments
Comments should have a leading space unless the comment is
for special purposes (go:generate, nolint:)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-16 12:46:07 +01:00
Silvin Lubecki ddde460613
Merge pull request #2258 from thaJeztah/e2e_update_compose
Dockerfile.e2e: update compose v1.25.1, enable buildkit
2020-01-16 11:27:49 +01:00
Silvin Lubecki 0ab564b1c8
Merge pull request #2251 from thaJeztah/1962-fix-port-bug
Convert ports before parsing.
2020-01-16 11:26:44 +01:00
Sebastiaan van Stijn c804b1083e
Dockerfile.e2e: update compose v1.25.1, enable buildkit
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-15 18:41:44 +01:00
Aleksander Piotrowski c2c7503d49
Convert ports before parsing.
Refactor code to allow mixed notation with -p flag.

Signed-off-by: Aleksander Piotrowski <apiotrowski312@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-15 15:09:00 +01:00
Sebastiaan van Stijn c8e27296b7
Merge pull request #2252 from zappy-shu/2250-reverse-port-long-format-order
Reverse order of long-form ports
2020-01-15 14:54:10 +01:00
Nick Adcock 154a1f6df8 Reverse order of long-form ports
Reverses the order long-form port options when converted to short-form
to correctly match the documentation and `docker service create`.

Post change `-p published=8111,target=8112` is the equivalent of
`8111:8112`

Signed-off-by: Nick Adcock <nick.adcock@docker.com>
2020-01-15 12:11:57 +00:00
Silvin Lubecki 34d8486237
Merge pull request #2243 from zappy-shu/2058-single-value-advanced-syntax
Detect single-value advanced syntax
2020-01-13 16:53:11 +01:00
Sebastiaan van Stijn a4f60165b7
Merge pull request #2132 from tonistiigi/ssh-mux
connhelper: use ssh multiplexing
2020-01-09 23:12:25 +01:00
Tonis Tiigi 4ecbef4660 docs: document ssh multiplexing env
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-01-09 10:25:12 -08:00
Tonis Tiigi c04dd6e244 connhelper: add ssh multiplexing
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-01-09 10:14:59 -08:00
Silvin Lubecki af097b2618
Merge pull request #2228 from thaJeztah/config_permissions
config: preserve ownership and permissions on configfile
2020-01-09 15:26:54 +01:00
Silvin Lubecki 02e2b95298
Merge pull request #2237 from thaJeztah/fix_build_binary_macos
Fix "make build" (non-containerized) on macOS
2020-01-09 15:20:23 +01:00
Silvin Lubecki 9afb0ea81d
Merge pull request #2242 from thaJeztah/bump_engine
vendor: bump docker and dependencies a9507c6f76627fdc092edc542d5a7ef4a6df5eec
2020-01-09 15:17:44 +01:00
Sebastiaan van Stijn 69b5c4c30c
Merge pull request #2218 from akhilerm/privileged-device-doc
35991 - Modify CLI docs to specify working of device flag
2020-01-09 14:57:02 +01:00
Nick Adcock 3baa6d57fa Refactor config and secret tests to table-driven
Refactors the config and secret unit tests to be table driven to remove
duplication

Signed-off-by: Nick Adcock <nick.adcock@docker.com>
2020-01-09 13:38:19 +00:00
Nick Adcock 9698b7a374 Default config/secret target to source name
When using advanced syntax for setting config and secret values, default
the target value to the source value when the user does not specify a
target.

Signed-off-by: Nick Adcock <nick.adcock@docker.com>
2020-01-09 13:38:19 +00:00
Nick Adcock 4c2d7b7f70 Detect single value advanced config/secret syntax
Allow the use of the advanced source=x syntax for config and secret values when there is no comma

Before this change the following would fail with config not found:
	docker service create --name hello1 --config source=myconfig nginx:alpine
And the following would fail with secret not found:
	docker service create --name hello2 --secret source=mysecret nginx:alpine

Signed-off-by: Nick Adcock <nick.adcock@docker.com>
2020-01-09 13:38:19 +00:00
Sebastiaan van Stijn 627a4cf7cc
vendor: bump docker/docker a9507c6f76627fdc092edc542d5a7ef4a6df5eec
full diff: a09e6e323e...a9507c6f76

Includes:

- moby/moby#40077 Update "auto-generate" comments to improve detection by linters
- moby/moby#40143 registry: add a critical section to protect authTransport.modReq
- moby/moby#40212 Move DefaultCapabilities() to caps package
- moby/moby#40021 Use newer x/sys/windows SecurityAttributes struct (carry 40017)
    - carries moby/moby#40017 Use newer x/sys/windows SecurityAttributes struct
- moby/moby#40135 pkg/system: make OSVersion an alias for hcsshim OSVersion
    - follow-up to moby/moby#39100 Use Microsoft/hcsshim constants and deprecate pkg/system.GetOsVersion()
- moby/moby#40250 Bump hcsshim to b3f49c06ffaeef24d09c6c08ec8ec8425a0303e2
- moby/moby#40243 Use certs.d from XDG_CONFIG_HOME when in rootless mode
    - fixes moby/moby#40236 Docker rootless dies when unable to read /etc/docker/certs.d
- moby/moby#40283 Fix possible runtime panic in Lgetxattr
- moby/moby#40178 builder/remotecontext: small refactor
- moby/moby#40179 builder/remotecontext: allow ssh:// for remote context URLs
    - fixes docker/cli#2164 Docker build cannot resolve git context with html escapes
- moby/moby#40302 client.ImagePush(): default to ":latest" instead of "all tags"
    - relates to docker/cli#2214 [proposal] change "docker push" behavior to default to ":latest" instead of "all tags"
    - relates to docker/cli#2220 implement docker push `-a`/ `--all-tags`
- moby/moby#40263 Normalize comment formatting
- moby/moby#40238 Allow client consumers like traefik to compile on illumos
- moby/moby#40108 bump google.golang.org/grpc v1.23.1
- moby/moby#40312 update vendor golang.org/x/sys to 6d18c012aee9febd81bbf9806760c8c4480e870d
- moby/moby#40247 pkg/system: deprecate constants in favor of golang.org/x/sys/windows
- moby/moby#40246 pkg/system: minor cleanups and remove use of deprecated system.GetOSVersion()
- moby/moby#40122 Update buildkit to containerd leases
    - vendor: update buildkit to leases support (4f4e03067523b2fc5ca2f17514a5e75ad63e02fb)
    - vendor: update containerd to acdcf13d5eaf0dfe0eaeabe7194a82535549bc2b
    - vendor: update runc to d736ef14f0288d6993a1845745d6756cfc9ddd5a (v1.0.0-rc9)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-07 10:28:38 +01:00
Sebastiaan van Stijn ece71412c0
vendor: bump buildkit 4f4e03067523b2fc5ca2f17514a5e75ad63e02fb
full diff: f7042823e3...4f4e030675

no changes to vendored files

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-07 10:28:21 +01:00
Sebastiaan van Stijn dff269b5e4
vendor: bump hcsshim b3f49c06ffaeef24d09c6c08ec8ec8425a0303e2
full diff: https://2226e083fc390003ae5aa8325c3c92789afa0e7a...b3f49c06ffaeef24d09c6c08ec8ec8425a0303e2

includes:

- microsoft/hcsshim#718 wclayer: Work around Windows bug when expanding sandbox size
    - fixes microsoft/hcsshim#708 Windows Host Compute Service bug breaks docker (and other) sandboxes bigger than 20G on Windows 1903
    - fixes microsoft/hcsshim#624The hcsshim on Windows 10 1903 always fails to build Docker image
    - fixes/addresses docker/for-win#3884 An error occurred while attempting to build Docker image (especially this comment and the next comments after: https://github.com/docker/for-win/issues/3884#issuecomment-498939672)
    - fixes/addresses docker/for-win#4100 Windows 1903 fails when storage-opt used
    - fixes moby/moby#36831 hcsshim::PrepareLayer failed in Win32: The parameter is incorrect (https://github.com/moby/moby/issues/36831#issuecomment-498612392)
    - fixes Stannieman/audacity-with-asio-builder#5 Docker won't build container
    - fixes MicrosoftDocs/visualstudio-docs#3523 Error when running build with storage-opts set
    - fixes moby/moby#39524 Docker build windows 19.03 --storage-opt size>20G

Note that this is a temporary workaround for a bug in the platform, and will be reverted once that is addressed:

- microsoft/hcsshim#721 Revert 718 when Windows 19H1 has expand sandbox fix

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-07 10:28:00 +01:00
Sebastiaan van Stijn b822062959
vendor: bump containerd acdcf13d5eaf0dfe0eaeabe7194a82535549bc2b
full diff: 36cf5b690d...acdcf13d5e

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-07 10:27:42 +01:00
Sebastiaan van Stijn ed8cacd6e0
vendor: bump runc v1.0.0-rc9
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-07 10:27:02 +01:00
Sebastiaan van Stijn 013151ff78
vendor: bump google.golang.org/grpc v1.23.1
full diff: https://github.com/grpc/grpc-go/compare/v1.23.0...v1.23.1

- grpc/grpc-go#3018 server: set and advertise max frame size of 16KB
- grpc/grpc-go#3017 grpclb: fix deadlock in grpclb connection cache
    - Before the fix, if the timer to remove a SubConn fires at the
      same time NewSubConn cancels the timer, it caused a mutex leak
      and deadlock.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-07 10:26:47 +01:00
Sebastiaan van Stijn 268cc5df24
vendor: bump golang.org/x/sys 6d18c012aee9febd81bbf9806760c8c4480e870d
full diff: 9eafafc0a8...6d18c012ae

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-07 10:26:26 +01:00
Silvin Lubecki f7f4a19328
Merge pull request #2236 from thaJeztah/plugin_sorting
docker info: list CLI plugins alphabetically
2020-01-06 15:42:16 +01:00
Silvin Lubecki f870440c35
Merge pull request #2153 from thaJeztah/bump_containerd_1.3.0
bump containerd and dependencies to v1.3.0
2020-01-06 15:38:00 +01:00
Sebastiaan van Stijn 9efca8e7b4
Merge pull request #2231 from oscrx/patch-1
Change example networks
2020-01-06 15:25:53 +01:00
Sebastiaan van Stijn 43c131f0ae
Merge pull request #2238 from thaJeztah/carry_platform_docs
docs: document from platform (carry 2003)
2020-01-06 15:22:36 +01:00
Oscar Wieman 2d6aec78a1
Change example networks
Signed-off-by: Oscar Wieman <oscar@oscarr.nl>
2020-01-06 13:39:02 +01:00
Vincent Demeester a2e252c92a
Merge pull request #2234 from thaJeztah/bump_golang_1.12.14
Bump Golang 1.12.14
2020-01-06 10:47:47 +01:00
Vincent Demeester 389fa742ff
Merge pull request #2232 from thaJeztah/fixup_docker_ps_formatting
Fix some issues with docker ps --format
2020-01-06 10:46:33 +01:00
Tonis Tiigi ce42168940
docs: document from platform
Co-Authored-By: Tibor Vass <tiborvass@users.noreply.github.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-03 17:25:28 +01:00
Sebastiaan van Stijn 4beea58531
Bump Golang 1.12.14
go1.12.14 (released 2019/12/04) includes a fix to the runtime. See the Go 1.12.14
milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.12.14+label%3ACherryPickApproved

Update Golang 1.12.13
------------------------

go1.12.13 (released 2019/10/31) fixes an issue on macOS 10.15 Catalina where the
non-notarized installer and binaries were being rejected by Gatekeeper. Only macOS
users who hit this issue need to update.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-03 12:37:59 +01:00
Sebastiaan van Stijn ef37a8a57c
Fix "make build" (non-containerized) on macOS
macOS doesn't ship with the GNU version of `date`, which
causes the command to fail if the `--rfc-3339 ns` format option
is used.

Given that we don't need the build-time with nanosecond precision,
this patch changes the format used, so that the CLI binary can be
built on the host (outside of a container);

Before this change, `make binary` would fail:

    DISABLE_WARN_OUTSIDE_CONTAINER=1 make binary
    WARNING: binary creates a Linux executable. Use cross for macOS or Windows.
    ./scripts/build/binary
    make: *** [binary] Error 1

With this change, the binary can be built on the host:

    DISABLE_WARN_OUTSIDE_CONTAINER=1 make binary
    WARNING: binary creates a Linux executable. Use cross for macOS or Windows.
    ./scripts/build/binary
    Building statically linked build/docker-darwin-amd64

While the previous version formatted (and parsed) the date with nanoseconds precision,
that level of precision is not actually used;

```go
func reformatDate(buildTime string) string {
	t, errTime := time.Parse(time.RFC3339Nano, buildTime)
	if errTime == nil {
		return t.Format(time.ANSIC)
	}
	return buildTime
}
```

Both the old, and new input will yield the same output:

```go
fmt.Println(reformatDate("2019-12-31T13:41:44.846741804+00:00"))
// Tue Dec 31 13:41:44 2019

fmt.Println(reformatDate("2019-12-31T13:41:44Z"))
// Tue Dec 31 13:41:44 2019
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-12-31 15:06:11 +01:00
Sebastiaan van Stijn 54ba28f402
docker info: list CLI plugins alphabetically
Before this change, plugins were listed in a random order:

    Client:
     Debug Mode: false
     Plugins:
      doodle: Docker Doodles  all around! 🐳 🎃 (thaJeztah, v0.0.1)
      shell: Open a browser shell on the Docker Host. (thaJeztah, v0.0.1)
      app: Docker Application (Docker Inc., v0.8.0)
      buildx: Build with BuildKit (Docker Inc., v0.3.1-tp-docker)

With this change, plugins are listed alphabetically:

    Client:
     Debug Mode: false
     Plugins:
      app: Docker Application (Docker Inc., v0.8.0)
      buildx: Build with BuildKit (Docker Inc., v0.3.1-tp-docker)
      doodle: Docker Doodles  all around! 🐳 🎃 (thaJeztah, v0.0.1)
      shell: Open a browser shell on the Docker Host. (thaJeztah, v0.0.1)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-12-31 14:33:07 +01:00
Sebastiaan van Stijn aef6b04a7c
Fix docker ps table headers with custom format and "split" or "join"
Update the list of overrides for table headers so that columns using split or
join will produce the correct table header.

Before this patch:

    docker ps --format='table {{split .Names "/"}}'
    [NAMES]
    [unruffled_mclean]
    [eloquent_meitner]
    [sleepy_grothendieck]

With this patch applied:

    docker ps --format='table {{split .Names "/"}}'
    NAMES
    [unruffled_mclean]
    [eloquent_meitner]
    [sleepy_grothendieck]

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-12-27 12:36:02 +01:00
Sebastiaan van Stijn 69f216f6e4
Fix docker ps --format with templating functions
Before this patch, using a template that used templating functions (such as
`lower` or `json`) caused the command to fail in the pre-processor step (in
`buildContainerListOptions`):

    docker ps --format='{{upper .Names}}'
    template: :1:8: executing "" at <.Names>: invalid value; expected string

This problem was due to the pre-processing using a different "context" type than
was used in the actual template, and custom functions to not be defined when
instantiating the Go template.

With this patch, using functions in templates works correctly:

    docker ps --format='{{upper .Names}}'
    MUSING_NEUMANN
    ELOQUENT_MEITNER

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-12-27 12:35:55 +01:00
Silvin Lubecki ba63a92655
Merge pull request #2230 from thaJeztah/unify_ps_tests
command/container: unify list tests in a single file
2019-12-20 15:55:25 +01:00