Commit Graph

7608 Commits

Author SHA1 Message Date
Vincent Demeester 24ef01ce6e
Merge pull request #2659 from thaJeztah/bump_docker
vendor: update docker/docker 0f41a77c6993ade605a639fb25994cfe5e1b3fe8
2020-07-29 07:50:50 +00:00
Albin Kerouanton 21da11c5fd
docker service inspect fails when TaskTemplate.Resources is nil
When doing `docker service inspect --pretty` on services without
`TaskTemplate.Resources` or `TaskTemplate.Resources.Limits`, the command
fails. This is due to a missing check on ResourceLimitPids().

This bug has been introduced by 395a6d560d
and produces following error message:

```
Template parsing error: template: :139:10: executing "" at <.ResourceLimitPids>: error calling ResourceLimitPids: runtime error: invalid memory address or nil pointer dereference
```

Signed-off-by: Albin Kerouanton <albin@akerouanton.name>
2020-07-28 22:38:33 +02:00
Sebastiaan van Stijn 097d57314d
vendor: update docker/docker 0f41a77c6993ade605a639fb25994cfe5e1b3fe8
full diff: 78e6ffd279...0f41a77c69

Relevant changes:

- https://github.com/moby/moby/pull/41234 vendor: update buildkit to 4d1f260e8
- various updates to swagger files
- https://github.com/moby/moby/pull/41249 Replace swarm Capabilites API with cap add/drop API
    - updates swarmkit to 035d564a3686f5e348d861ec0c074ff26854c498
- https://github.com/moby/moby/pull/41254 Deprecate KernelMemory

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-28 17:16:03 +02:00
Sebastiaan van Stijn 293e239e18
vendor: update containerd/continuity efbc4488d8fe1bdc16bde3b2d2990d9b3a899165
full diff: 26c1120b8d...efbc4488d8

Relevant changes:

- sysx/xattr: fix and improve
    - fix getxattrAll: change initial buffer size to 128 to prevent unneeded
      iterations and change the logic to get the real size in case we get ERANGE
      rather than doubling the buffer)
    - improve listxattrAll; refactor for readability, prevent calling `listxattr()`
      twice. Handle condition when attributes size is changed in between the two
      calls to listxattr().
- Remove Windows' Readlink fork
    - Drops support for Go 1.12 and under
- Fix sameFile() to recognize empty files as the same
    - fixes "Empty files can diff as "modified" even when they're not"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-28 17:12:12 +02:00
Sebastiaan van Stijn 79b4d93c1b
vendor: update tonistiigi/fsutil ae3a8d753069d0f76fbee396457e8b6cfd7cb8c3
full diff: c2c7d7b0e1...ae3a8d7530

Relevant changes

- Update dependencies
    - update docker/docker to current master
    - update opencontainers/runc to v1.0.0-rc10
    - update pkg/errors to v0.9.1 to support Go 1.13 errors
    - update stretchr/testify to the latest version
- Drop support for go1.12, and use errors.Is() for error-detection

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-28 16:19:54 +02:00
Tonis Tiigi 5dd9bd4c2c docs: remove docs for —-from=index
Naming stages is the preferred method for using
multi-stage builds.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-27 15:56:23 -07:00
Brian Goff 415fe22dbe
Merge pull request #2652 from AkihiroSuda/deprecate-kernel-memory
deprecate `docker run --kernel-memory`
2020-07-27 10:35:10 -07:00
Akihiro Suda 074a8dcff6
deprecate `docker run --kernel-memory`
`docker run --kernel-memory` is being deprecated in https://github.com/moby/moby/pull/41254

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-24 20:56:15 +09:00
Brian Goff 12b74cb5a0
Merge pull request #2395 from wangyumu/add-default-address-pools-to-docker-info 2020-07-23 13:44:37 -07:00
horpto 04ab71457a Add shorthand for --tail option
I chose -n shorthand as it's similar with linux `tail` command.

Signed-off-by: Александр Менщиков <__Singleton__@hackerdom.ru>
2020-07-23 15:25:12 +03:00
Wang Yumu 1f907fb7ba Add DefaultAddressPools to docker info output #40388
Signed-off-by: Wang Yumu <37442693@qq.com>
2020-07-22 01:45:30 +08:00
Sebastiaan van Stijn 280e7230d5
Merge pull request #2641 from thaJeztah/bump_docker
vendor: update docker and buildkit
2020-07-21 16:49:04 +02:00
Silvin Lubecki bc2c8d9830
Merge pull request #2639 from thaJeztah/remove_shellwords
Replace mattn/go-shellwords with google/shlex
2020-07-21 15:06:47 +02:00
Silvin Lubecki ede188c951
Merge pull request #2634 from thaJeztah/bump_golang_1.13.14
Bump Golang 1.13.14
2020-07-21 15:05:14 +02:00
Tibor Vass aca38b347b
Merge pull request #2638 from mirogula/feature/add-build-target-zsh-completion
added 'docker build --target' to zsh completion
2020-07-21 13:26:36 +02:00
Tibor Vass b3a8358787
Merge pull request #2624 from justinkb/csfix
scripts/make.ps1: actually define the CommitSuffix parameter
2020-07-21 13:24:11 +02:00
Sebastiaan van Stijn 52ec986b5a
vendor: docker/docker 78e6ffd279b627ebba046b9675ff4849091d9cc3
full diff: aaf470eca7...78e6ffd279

- Add DefaultAddressPools to Info
- Configure shims from runtime config
- pkg/archive: use containerd/sys to detect UserNamespaces
    - removes github.com/opencontainers/runc/libcontainer/system dependency
- pkg/archive: Don't use init() to set unpigz path

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-20 20:01:27 +02:00
Sebastiaan van Stijn c496fefe4d
vendor: buildkit df35e9818d1f9066e616e03f4b8d727c97562e5b
full diff: ae7ff7174f...df35e9818d

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-20 15:50:51 +02:00
Silvin Lubecki d8991089c0
Merge pull request #2640 from thaJeztah/revert_github_codeql
Revert "Add CodeQL Analysis workflow"
2020-07-20 10:37:50 +02:00
Sebastiaan van Stijn 176380db88
Revert "Add CodeQL Analysis workflow"
This feature does not appear to be generally available yet, so
reverting for now.

This reverts commit 454c1927c0.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-20 10:26:10 +02:00
Sebastiaan van Stijn 251861237a
Replace mattn/go-shellwords with google/shlex
Both libaries provide similar functionality. We're currently using
Google Shlex in more places, so prefering that one for now, but we
could decide to switch to mattn/go-shellwords in future if that
library is considered better (it looks to be more actively maintained,
but that may be related to it providing "more features").

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-20 10:20:42 +02:00
Miroslav Gula 1c79d16d89 added 'docker build --taget' to zsh completion
Signed-off-by: Miroslav Gula <miroslav.gula@naytrolabs.com>
2020-07-20 01:33:02 +02:00
Sebastiaan van Stijn cdfafe03e3
Bump Golang 1.13.14
full diff: https://github.com/golang/go/compare/go1.13.13...go1.13.14

go1.13.14 (released 2020/07/16) includes fixes to the compiler, vet, and the
database/sql, net/http, and reflect packages. See the Go 1.13.14 milestone on
the issue tracker for details:

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

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-17 15:44:54 +02:00
Brian Goff bece8cc41c
Merge pull request #2626 from thaJeztah/test_cleanup 2020-07-16 09:58:16 -07:00
Silvin Lubecki 1d54570c84
Merge pull request #2632 from thaJeztah/bump_golang_1.13.13
Bump Golang 1.13.13
2020-07-16 16:09:51 +02:00
Sebastiaan van Stijn dc4f7fb375
Bump Golang 1.13.13
full diff: https://github.com/golang/go/compare/go1.13.12...go1.13.13

go1.13.13 (released 2020/07/14) includes security fixes to the crypto/x509 and
net/http packages. See the Go 1.13.13 milestone on the issue tracker for details.

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

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-16 15:45:25 +02:00
Tibor Vass 8ff4f034aa
Merge pull request #2627 from thaJeztah/dont_overwrite_symlinks
Fix ConfigFile.Save() replacing symlink with file
2020-07-16 12:06:34 +02:00
Sebastiaan van Stijn 75ab44af6f
Fix ConfigFile.Save() replacing symlink with file
In situations where `~/.docker/config.json` was a symlink, saving
the file would replace the symlink with a file, instead of updating
the target file location;

    mkdir -p ~/.docker
    touch ~/real-config.json
    ln -s ~/real-config.json ~/.docker/config.json

    ls -la ~/.docker/config.json
    # lrwxrwxrwx 1 root root 22 Jun 23 12:34 /root/.docker/config.json -> /root/real-config.json

    docker login
    # Username: thajeztah
    # Password:

    # Login Succeeded

    ls -la ~/.docker/config.json
    -rw-r--r-- 1 root root 229 Jun 23 12:36 /root/.docker/config.json

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-16 11:35:41 +02:00
Sebastiaan van Stijn 0c2fe385bf
cli/formatter: reformat TestImageContext test cases
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-16 11:34:52 +02:00
Sebastiaan van Stijn d642de78f3
cli/command/formatter: remove deprecated compareMultipleValues() utility
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-16 11:34:50 +02:00
Silvin Lubecki 03716c0a07
Merge pull request #2628 from thaJeztah/migrate_circleci
Move circle.yml to .circleci/config.yml
2020-07-15 22:55:15 +02:00
Silvin Lubecki fc097f5282
Merge pull request #2630 from thaJeztah/github_codeql
Add CodeQL Analysis workflow
2020-07-15 22:52:15 +02:00
Sebastiaan van Stijn 454c1927c0
Add CodeQL Analysis workflow
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-15 18:34:53 +02:00
Sebastiaan van Stijn 77e78a2fea
Move circle.yml to .circleci/config.yml
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-15 18:12:37 +02:00
Silvin Lubecki e4e754bb74
Merge pull request #2595 from cpuguy83/handle_close_error_on_save
Handle errors on close in config file write.
2020-07-15 17:40:10 +02:00
Paul Mulders 05eebb8ccf scripts/make.ps1: actually define the CommitSuffix parameter
Signed-off-by: Paul Mulders <justinkb@gmail.com>
2020-07-10 14:36:22 +02:00
Silvin Lubecki cae16e70b9
Merge pull request #2599 from thaJeztah/ignore_empty_configfile
config: ignore empty config file instead of printing warning
2020-07-09 15:27:29 +02:00
Silvin Lubecki f0a21931c7
Merge pull request #2546 from thaJeztah/resolve_image_cleanup
Some minor refactoring and reformatting
2020-07-09 15:15:06 +02:00
Sebastiaan van Stijn 66ea6250a1
Merge pull request #2596 from Madhur1997/master
Add checks for dependencies that are not vendored
2020-07-06 15:16:54 +02:00
Sebastiaan van Stijn fde22be3ea
TestServiceUpdateResolveImageChanged: use subtests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-06 14:58:40 +02:00
Sebastiaan van Stijn 732d8b51a8
un-wrap some code
The wrapping made the code harder to read (and in some cases destracted
from the actual code flow).

Some of these functions take too many arguments; instead of hiding that,
it probably better to make it apparent that something needs to be done
(and fix it :-)).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-06 14:55:17 +02:00
Sebastiaan van Stijn 47fce8f4bc
clean-up "resolve image" option logic
- change `validateResolveImageFlag()` to only perform _validation_,
  and not combine it with modifying the option.
- use a `switch` instead of `if` in `validateResolveImageFlag()`
- `deployServices()`: break up some `switch` cases to make them
  easier to read/understand the logic.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-06 14:55:08 +02:00
Madhur Batra 55451d3c75 Add checks for dependencies that are not vendored.
`make vendor` fails if any dependency is not vendored.

Signed-off-by: Madhur Batra <madhurbatra097@gmail.com>
2020-07-06 09:23:19 +00:00
Silvin Lubecki 674c80af89
Merge pull request #2611 from thaJeztah/bump_mapstructure
vendor: mitchellh/mapstructure v1.3.2
2020-07-06 10:49:05 +02:00
Silvin Lubecki 03cd0689c4
Merge pull request #2612 from thaJeztah/bump_gojsonschema
vendor: xeipuuv/gojsonschema v1.2.0
2020-07-06 10:41:30 +02:00
Silvin Lubecki 00f38a7447
Merge pull request #2616 from thaJeztah/refactor_opts_tests
refactor opts tests
2020-07-02 14:40:03 +02:00
Silvin Lubecki ade9fd2caf
Merge pull request #2617 from thaJeztah/builder_comment_info
docs/builder: add note about handling of leading whitespace
2020-07-02 14:36:05 +02:00
Sebastiaan van Stijn 6776f7cdcd
docs/builder: add note about handling of leading whitespace
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-01 15:35:59 +02:00
Sebastiaan van Stijn cce2f7fd9c
refactor opts tests
- TestParseRunAttach: use subtests to reduce cyclomatic complexity
- TestParseRunWithInvalidArgs: use subtests, and check if the expected
  error is returned.
- Removed parseMustError() as it was mostly redundant

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-01 14:45:47 +02:00
Sebastiaan van Stijn af62a0529b
vendor: xeipuuv/gojsonschema v1.2.0
full diff: https://github.com/xeipuuv/gojsonschema/compare/v1.1.0...v1.2.0

- Fix a race condition when registering new formats.
- Improve the performance of uniqueItems.
- Fix an issue where integers would be shown as a fraction
- Require format to be of type string and formats can now be registered after a schema is parsed.
- Improve the handling of true and false schema.
- Fix an issue where an invalid schema would cause a panic.
- Properly handle file URIs that contain spaces.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-30 16:20:03 +02:00