Sebastiaan van Stijn
64adea1ce1
volume: use strings.Cut() and minor refactor
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:00 +01:00
Sebastiaan van Stijn
19db33afc9
pkg/tarsum: use strings.Cut() and minor refactor
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:00 +01:00
Sebastiaan van Stijn
59880cb855
builder/dockerfile: use strings.Cut()
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:00 +01:00
Sebastiaan van Stijn
604a2d67b5
builder/remotecontext/git: use strings.Cut()
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:00 +01:00
Sebastiaan van Stijn
380a2dfc3a
api/types: use strings.Cut()
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:00 +01:00
Sebastiaan van Stijn
7841ce781c
api/types/time: use strings.Cut()
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:00 +01:00
Sebastiaan van Stijn
ba9bcf92f6
api/types/filters: use strings.Cut()
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:08:59 +01:00
Sebastiaan van Stijn
6db4af7bd5
graphdriver: windows: use strings.Cut()
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:08:59 +01:00
Sebastiaan van Stijn
c545473920
daemon/cluster: use strings.Cut()
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:08:57 +01:00
Sebastiaan van Stijn
ec878a3d89
pkg/sysinfo: unify ReadMemInfo implementation
...
Use a single exported implementation, so that we can maintain the
GoDoc string in one place, and use non-exported functions for the
actual implementation.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 10:53:45 +01:00
Sebastiaan van Stijn
09ea6744fe
pkg/sysinfo: remove github.com/docker/go-units dependency
...
It was only used in a test, and only for a single const; define
it locally.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 10:53:45 +01:00
Sebastiaan van Stijn
6a516acb2e
pkg/system: move memory-info types to pkg/systeminfo
...
These types and functions are more closely related to the functionality
provided by pkg/systeminfo, and used in conjunction with the other functions
in that package, so moving them there.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 10:53:45 +01:00
Sebastiaan van Stijn
6919b9879b
pkg/sysinfo: unify NumCPU implementation
...
Use a single exported implementation, so that we can maintain the
GoDoc string in one place, and use non-exported functions for the
actual implementation (which were already in place).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 10:53:42 +01:00
Sebastiaan van Stijn
298d3aa8b8
Merge pull request #44515 from thaJeztah/move_ioutils_tempdir
...
pkg/ioutils: TempDir: move to pkg/longpath
2022-12-21 10:37:50 +01:00
Sebastiaan van Stijn
c63ea32a17
pkg/ioutils: TempDir: move to pkg/longpath
...
This utility wasn't very related to all other utilities in pkg/ioutils.
Moving it to longpath to also make it more clear what it does.
It looks like there's only a single (public) external consumer of this
utility, and only used in a test, and it's not 100% clear if it was
intentional to use our package, of if it was a case of "I actually meant
`io/ioutil.MkdirTemp`" so we could consider skipping the alias.
While moving the package, I also renamed `TempDir` to `MkdirTemp`, which
is the signature it matches in "os" from stdlib.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-20 23:24:12 +01:00
Sebastiaan van Stijn
3314f4ef09
pkg/ioutils: unify TempDir implementation
...
This allows us to maintain a single GoDoc string to describe
what it's used for.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-20 23:23:59 +01:00
Sebastiaan van Stijn
2e67c85c13
pkg/longpath: fix package GoDoc
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-20 23:23:59 +01:00
Sebastiaan van Stijn
c4c53659f1
integration-cli: remove uses of ioutils.TempDir
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-20 23:23:55 +01:00
Sebastiaan van Stijn
2e67c827bb
errdefs: FromStatusCode() don't log "FIXME" debug message
...
This utility is used by the client, which cannot do anything about errors
received from the API. In situations where no API connection was possible,
for example, if the client has no permissions to connect to the socket,
the request would have a "-1" status-code;
3e39ec60da/client/request.go (L133-L134)
In this case, a client with "debug" enabled, would print _and_ log a confusing
error message:
DEBU[0000] FIXME: Got an status-code for which error does not match any expected type!!! error="Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post \"http://%2Fvar%2Frun%2Fdocker.sock/v1.24/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile.repro&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=repro&target=&ulimits=null&version=1 \": dial unix /var/run/docker.sock: connect: permission denied" module=api status_code=-1
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile.repro&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=repro&target=&ulimits=null&version=1 ": dial unix /var/run/docker.sock: connect: permission denied
In the above; `DEBU` logs the error (including the "FIXME"), and the second
line is the error message printed.
This was a mistake on my side when I added the `FromStatusCode` utility. I
implemented that to be the counterpart to `FromError`, but in doing so also
copied over the logging (see 1af30c50ca
). That
log-message is only intended to be logged on the daemon side, for situations
where we return an error without a proper errdefs (which would result in an
500 "internal server error" to be returned by the API).
This patch removes the debug log, and a minor cleanup to explicitly return
"nil" if we didn't get an error in the first place.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-20 16:03:46 +01:00
Sebastiaan van Stijn
3e39ec60da
Merge pull request #44674 from thaJeztah/vendor_containerd_1.6.14
...
vendor: github.com/containerd/containerd v1.6.14
2022-12-20 10:59:17 +01:00
Sebastiaan van Stijn
83d7ae76e8
vendor: github.com/containerd/containerd v1.6.14
...
No changes in vendored code, other than the version bump
full diff: https://github.com/containerd/containerd/compare/v1.6.13...v1.6.14
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-19 22:44:40 +01:00
Sebastiaan van Stijn
72ea8cfb43
registry: use http.NewServeMux for tests instead of gorilla/mux
...
We don't need gorilla/mux for these tests, so let's use stdlib.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-19 13:25:43 +01:00
Sebastiaan van Stijn
13b36ce063
Merge pull request #44661 from thaJeztah/optimize_stringid
...
pkg/stringid: optimize performance
2022-12-17 18:24:39 +01:00
Sebastiaan van Stijn
6371675bf9
Merge pull request #44275 from thaJeztah/move_pkg_system_funcs
...
pkg/system: move some functions to a new home
2022-12-16 15:25:41 +01:00
Sebastiaan van Stijn
54512f2184
pkg/stringid: optimize performance
...
Had these laying around; not very critical as these functions are barely
used, but probably won't hurt:
BenchmarkIsShortID-10 1447230 816.9 ns/op 0 B/op 0 allocs/op
BenchmarkIsShortIDNew-10 10103319 101.9 ns/op 0 B/op 0 allocs/op
BenchmarkValidateID-10 10000 112208 ns/op 33005 B/op 10 allocs/op
BenchmarkValidateIDNew-10 653293 1737 ns/op 16534 B/op 6 allocs/op
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-16 14:44:52 +01:00
Sebastiaan van Stijn
b10de9186c
Merge pull request #44653 from thaJeztah/containerd_binary_1.7
...
update containerd binary to v1.7.0-beta.1
2022-12-16 12:33:47 +01:00
Sebastiaan van Stijn
c766258e9c
Merge pull request #44409 from corhere/libnetwork-test-sanity
...
libnetwork: improve tests & fix some bugs
2022-12-16 12:30:02 +01:00
Sebastiaan van Stijn
d20ddb6807
update containerd binary to v1.7.0-beta.1
...
release notes: https://github.com/containerd/containerd/releases/tag/v1.7.0-beta.1
full diff: https://github.com/containerd/containerd/compare/v1.7.0-beta.0...v1.7.0-beta.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 23:10:18 +01:00
Sebastiaan van Stijn
5f1938f545
Merge pull request #44513 from crazy-max/dockerfile-targetplatform
...
Dockerfile: use TARGETPLATFORM
2022-12-15 23:00:19 +01:00
Sebastiaan van Stijn
ade06e284b
Merge pull request #44657 from thaJeztah/vendor_containerd_1.6.13
...
vendor: github.com/containerd/containerd v1.6.13
2022-12-15 22:36:00 +01:00
Sebastiaan van Stijn
35cbdc9661
vendor: github.com/containerd/containerd v1.6.13
...
full diff: https://github.com/containerd/containerd/compare/v1.6.12...v1.6.13
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 19:34:46 +01:00
Sebastiaan van Stijn
9300aca2a6
vendor: github.com/Microsoft/hcsshim v0.9.6
...
full diff: https://github.com/Microsoft/hcsshim/compare/v0.9.5...v0.9.6
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 19:33:18 +01:00
Sebastiaan van Stijn
9af68a2415
Merge pull request #44651 from thaJeztah/bump_swarmkit
...
vendor: github.com/moby/swarmkit/v2 v2.0.0-20221215132206-0da442b2780f
2022-12-15 18:04:18 +01:00
CrazyMax
19f3448c21
Dockerfile: delve cross build with TARGETPLATFORM
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 15:02:22 +01:00
CrazyMax
ed95e1a9ff
Dockerfile: swagger cross build with TARGETPLATFORM
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 15:02:22 +01:00
CrazyMax
879b023706
Dockerfile: containerutility cross build with TARGETPLATFORM
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 15:02:21 +01:00
CrazyMax
8d9a357a67
Dockerfile: registry cross build with TARGETPLATFORM
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 15:02:21 +01:00
CrazyMax
a4bc2922c2
Dockerfile: dockercli cross build with TARGETPLATFORM
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 15:02:21 +01:00
CrazyMax
420591c4a2
Dockerfile: rootlesskit cross build with TARGETPLATFORM
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 15:02:21 +01:00
CrazyMax
f0307892ea
Dockerfile: tini cross build with TARGETPLATFORM
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 15:02:21 +01:00
CrazyMax
5e19d7ec54
Dockerfile: runc cross build with TARGETPLATFORM
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 15:02:21 +01:00
Kevin Alvarez
81d704d15d
Dockerfile: containerd cross build with TARGETPLATFORM
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 15:02:20 +01:00
CrazyMax
b19c11621a
Dockerfile: DOCKER_STATIC arg
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 15:02:20 +01:00
CrazyMax
69c9dfd6d5
Dockerfile: add dummy stage
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 15:02:20 +01:00
CrazyMax
6cba7d22e9
Dockerfile: add cross compilation helper
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 15:02:20 +01:00
Sebastiaan van Stijn
0007490b21
vendor: github.com/moby/swarmkit/v2 v2.0.0-20221215132206-0da442b2780f
...
No changes in vendored code, but removes some indirect dependencies.
full diff: b17f02f0a0...0da442b278
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 14:27:07 +01:00
Sebastiaan van Stijn
aac5e5906d
Merge pull request #44625 from thaJeztah/update_fluent_deps
...
vendor: update dependencies for fluentd
2022-12-15 10:54:51 +01:00
Sebastiaan van Stijn
e19dff9285
daemon/config: remove deprecated RootDeprecated field
...
Since b58de39ca7
, this option was now only used
to produce a fatal error when starting the daemon. That change is in the 23.0
release, so we can remove it from the master branch.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 10:44:32 +01:00
Sebastiaan van Stijn
32b299f63e
daemon/config: rename CommonTLSOptions to TLSOptions
...
This type was added in 677a6b3506
, and named
"common", because at the time, the "docker" and "dockerd" (daemon) code
were still in the same repository, and shared this type. Renaming it, now
that's no longer the case.
As there are no external consumers of this type, I'm not adding an alias.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 10:44:24 +01:00
Sebastiaan van Stijn
07387913a8
Merge pull request #44642 from thaJeztah/remote_cli_package_step1
...
Remove "cli" package (step 1)
2022-12-15 09:41:23 +01:00