Commit graph

47391 commits

Author SHA1 Message Date
Brian Goff
642e9917ff Add otel support
This uses otel standard environment variables to configure tracing in
the daemon.
It also adds support for propagating trace contexts in the client and
reading those from the API server.

See
https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
for details on otel environment variables.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2023-09-07 18:38:19 +00:00
Sebastiaan van Stijn
791549508a
Merge pull request #46084 from rumpl/fix-test-arch
test: Remove DOCKER_ENGINE_GOARCH from the tests
2023-09-05 18:08:57 +02:00
Sebastiaan van Stijn
032797ea4b
Merge pull request #46376 from thaJeztah/migrate_distribution_reference
migrate to new github.com/distribution/reference module
2023-09-05 15:04:51 +02:00
Sebastiaan van Stijn
7abd7fa739
Merge pull request #46398 from vvoland/tests-integration-cli-build-multline-images
integration-cli/build: Parse multiline images -q output
2023-09-05 12:22:34 +02:00
Sebastiaan van Stijn
1148a24e64
migrate to new github.com/distribution/reference module
The "reference" package was moved to a separate module, which was extracted
from b9b19409cf

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-05 12:09:26 +02:00
Sebastiaan van Stijn
9c4e82435e
Merge pull request #46351 from thaJeztah/api_events_actions_enum
api/types/events: define "Action" type and consts
2023-09-05 11:11:42 +02:00
Sebastiaan van Stijn
2243046bf8
Merge pull request #46384 from rumpl/push-print-digest
c8d: Print the tag, digest and size after push
2023-09-04 16:47:02 +02:00
Paweł Gronowski
dffccfd0f1
integration-cli/build: Alias cmp as is
To make it consistent with other tests.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-09-04 16:40:08 +02:00
Paweł Gronowski
5dbd198b53
integration-cli/build: Parse multiline images -q output
This causes the test to have a saner error message when the `images
-q` returns multiple images separated by newline.

Before this the test would fail with `invalid reference format` when
parsing the multiline string as an image reference.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-09-04 16:40:05 +02:00
Sebastiaan van Stijn
4bf1a946f9
Merge pull request #46396 from thaJeztah/fix_duplicate_definition
libnetwork/osl: remove dead code
2023-09-04 15:06:58 +02:00
Djordje Lukic
96516002cc
c8d: Print the tag, digest and size after push
After a push is completed we must return this information back to the
caller.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-09-04 13:43:19 +02:00
Sebastiaan van Stijn
417328e44e
libnetwork/osl: remove dead code
The test-file had a duplicate definition for ErrNotImplemented, which
caused an error in this package, and was not used otherwise, so we can
remove this file.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-04 10:37:25 +02:00
Sebastiaan van Stijn
97206b7cba
Merge pull request #46360 from thaJeztah/search_split_search_service_step1
registry: split search-related code to separate files
2023-09-01 18:31:16 +02:00
Bjorn Neergaard
74fafbda51
Merge pull request #46265 from dvdksn/docs-rephrase-images-create
docs(api): rephrase description for /images/create
2023-09-01 07:04:27 -06:00
David Karlsson
237eb3b5f1 docs(api): rephrase description for /images/create
Updated the description to clarify that this is the endpoint to use if
you want to pull an image.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-08-31 21:05:43 +02:00
Paweł Gronowski
8dfaf0c780
Merge pull request #46313 from vvoland/c8d-image-ociwrapper
containerd integration: Persist Docker-specific ImageConfig fields
2023-08-31 19:51:47 +02:00
Paweł Gronowski
0ffa3dd870
daemon/c8d: Use Docker imagespec
This makes the c8d code which creates/reads OCI types not lose
Docker-specific features like ONBUILD or Healthcheck.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-08-31 17:15:05 +02:00
Paweł Gronowski
14af90b868
c8d/integration/TestBuildOnBuildCache skip parent check
Parent is a graph-driver only field which is stored in the ImageStore.
It's not available when using containerd snapshotters.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-08-31 16:23:17 +02:00
Paweł Gronowski
2004f60bd6
Merge pull request #46363 from vvoland/image-spec-specs-go
image/spec: Add Go structs
2023-08-31 16:22:46 +02:00
Paweł Gronowski
366a5f1d74
image/spec: Add Go structs
Add Go structs describing the image spec which extend the OCI types.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-08-31 12:29:45 +02:00
Sebastiaan van Stijn
e9b3a16cdc
Merge pull request #46381 from vvoland/image-spec-healthcheck-startinterval
image/spec: Add Healthcheck.StartInterval (v1.3)
2023-08-31 12:23:32 +02:00
Sebastiaan van Stijn
aa9eb76b0d
Merge pull request #46379 from vvoland/image-spec-fix-superseded-typo
image/spec: Fix a typo in "superseded"
2023-08-31 12:22:03 +02:00
Sebastiaan van Stijn
02db973460
Merge pull request #46380 from rumpl/test-platform-timeout
test: remove platform related timeout values
2023-08-31 11:57:09 +02:00
Paweł Gronowski
536826d66f
image/spec: Add Healthcheck.StartInterval (v1.3)
This field was added in 2216d3ca8d.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-08-31 11:22:54 +02:00
Sebastiaan van Stijn
6fc6b9bf31
Merge pull request #46378 from thaJeztah/client_fix_test
client: TestImageTagInvalidSourceImageName remove invalid test-case
2023-08-31 11:02:20 +02:00
Sebastiaan van Stijn
47a3b31ff6
Merge pull request #46377 from thaJeztah/distribution_simplify_mocks
distribution: simplify mocks
2023-08-31 11:01:45 +02:00
Djordje Lukic
75097cf09a
test: remove platform related timeout values
These were dependent on the DOCKER_ENGINE_GOARCH environment variable
but this var was no longer set. There was also some weird check to see
if the architecture is "windows" which doesn't make sense. Seeing how
nothing failed ever since the TIMEOUT was no longer platform-dependent
we can safely remove this check.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-08-31 10:39:28 +02:00
Paweł Gronowski
6dd78a9ac2
image/spec: Fix typo in "superseded"
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-08-31 10:35:14 +02:00
Djordje Lukic
84a4f37cf7
test: use info from the version endpoint for arch checks
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-08-31 09:36:48 +02:00
Djordje Lukic
159b168eea
test/integration: Remove checks for "not arm" in tests
We no longer have any arm (not 64) CI.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-08-31 09:36:48 +02:00
Djordje Lukic
ebb9fade23
makefile: use info -f to get the current storage driver
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-08-31 09:36:48 +02:00
Sebastiaan van Stijn
c243efb0cd
client: TestImageTagInvalidSourceImageName remove invalid test-case
The test considered `Foo/bar` to be an invalid name, with the assumption
that it was `[docker.io]/Foo/bar`. However, this was incorrect, and the
test passed because the reference parsing had a bug; if the first element
(`Foo`) is not lowercase (so not a valid namespace /  "path element"), then
it *should* be considered a domain (as uppercase domain names are valid).

The reference parser did not account for this, and running the test with
a version of the parser with a fix caused the test to fail:

    === Failed
    === FAIL: client TestImageTagInvalidSourceImageName/invalidRepo/FOO/bar (0.00s)
        image_tag_test.go:54: assertion failed: expected error to contain "not a valid repository/tag", got "Error response from daemon: client should not have made an API call"
            Error response from daemon: client should not have made an API call

    === FAIL: client TestImageTagInvalidSourceImageName (0.00s)

This patch removes the faulty test-case.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-30 21:43:02 +02:00
Sebastiaan van Stijn
3a4a04e462
distribution: simplify mocks
embed the interface, so that we don't have to implement stubs.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-30 19:18:59 +02:00
Sebastiaan van Stijn
d390f86080
Merge pull request #46369 from thaJeztah/killWithSignal_dont_discard_errs
daemon: Daemon.killWithSignal(): don't fully discard errors, but log them
2023-08-30 18:22:23 +02:00
Sebastiaan van Stijn
a74f1ab423
Merge pull request #46374 from thaJeztah/image_spec_combined
image/spec: merge history of the v1, v1.1 and v1.2 specification
2023-08-30 17:56:46 +02:00
Sebastiaan van Stijn
d864d1eb97
image/spec: add back versioned files
Add back files at the old locations, as there may be external links
referencing the specification.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-30 16:17:17 +02:00
Sebastiaan van Stijn
7aa0bc5790
merge image-spec v1.2 into specs.md
This merges the v1.2 specs to provide a single history of the
specification.

To view the combined history:

    git log --follow image/spec/spec.md

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-30 16:11:14 +02:00
Sebastiaan van Stijn
823d0b3765
merge image-spec v1.1 into specs.md
This merges the v1.1 specs to provide a single history of the
specification.

To view the combined history:

    git log --follow image/spec/spec.md
2023-08-30 16:09:30 +02:00
Sebastiaan van Stijn
b8de6c01b5
image/spec: rename v1.2.md to spec.md
In preparation of merging the versioned-specs into a single file,
with history.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-30 16:06:36 +02:00
Sebastiaan van Stijn
c3f2bd1009
image/spec: rename v1.1.md to spec.md
In preparation of merging the versioned-specs into a single file,
with history.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-30 16:06:07 +02:00
Sebastiaan van Stijn
7ff38506ab
image/spec: rename v1.0.md to spec.md
In preparation of merging the versioned-specs into a single file,
with history.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-30 16:05:34 +02:00
Sebastiaan van Stijn
32d5e6312d
image/spec: use permalink to versioned documents
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-30 16:04:08 +02:00
Sebastiaan van Stijn
daa4618da8
Merge pull request #46371 from thaJeztah/image_specs_amend
image/specs: add missing OnBuild (v1.0), ArgsEscaped (v1.1), and Shell (v1.2) fields
2023-08-30 15:54:44 +02:00
Sebastiaan van Stijn
7b7019a4da
image/spec: add missing "Shell" field (v1.2)
This field was added in b18ae8c9cc, which
was part of v1.12.0-rc1 and later, which used image spec v1.2.0.

This patch amends the v1.2 spec to include the missing field.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-30 14:33:11 +02:00
Sebastiaan van Stijn
5380f3f0c4
image/spec: add missing "ArgsEscaped" field (v1.1, v1.2)
This field was added in 9db5db1b94, which
was part of v1.10.0-rc1 and later, which used image spec v1.1.0.

It's worth noting that documentation for the v1.1.0 image spec was not
yet available until commit 4fa0eccd10,
which was included in v1.12.0-rc1 and up. The `ArgsEscaped` field was
also adopted by the OCI image spec since [v1.1.0-rc3][1], but considered
deprecated, and not recommended to be used.

This patch amends the v1.1 and v1.2 specifications to describe the field.

[1]: 59780aa569

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-30 13:25:00 +02:00
Sebastiaan van Stijn
f33370219b
image/spec: add missing "OnBuild" field
This field was added in commit 9f994c9646,
which was merged before the image-spec v1.0.0 was released (which happened
in commit 79910625f0).

This patch backfills the specifications to describe the property.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-30 13:04:26 +02:00
Sebastiaan van Stijn
b526ce268f
Merge pull request #46370 from thaJeztah/image_spec_touch_ups
image/spec: minor fixes and touch-ups in markdown files
2023-08-30 12:46:38 +02:00
Sebastiaan van Stijn
e19edd3f25
image/spec: minor fixes and touch-ups in markdown files
- remove some trailing commas, which made the JSON invalid (some of these
  were fixed in the 1.2 spec, but not in older versions).
- synchronise some formatting / phrasing between versions, to make them
  easier to compare.
- remove non-breaking spaces (`NBSP`) in example outputs, and replace
  them with regular spaces.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-30 11:18:20 +02:00
Sebastiaan van Stijn
b9f9e20f01
daemon: Daemon.killWithSignal(): don't discard snapshotting errors
While there's not much we can do if we failed to store a snapshot of the
container's state, let's log the error in case it happens in stad of discarding.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-29 23:11:06 +02:00
Sebastiaan van Stijn
af535233cc
daemon: Daemon.killWithSignal(): don't discard handleContainerExit error
Daemon.handleContainerExit() returns an error if snapshotting the container's
state to disk fails. There's not much we can do with the error if it occurs,
but let's log the error if that happens, instead of discarding it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-29 23:11:06 +02:00