32 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
faee204c02 client: VolumeRemove: add output struct
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-28 15:42:33 +01:00
Sebastiaan van Stijn
1f5c82b9fa client: add option and output structs for various container methods
Add option- and output structs for;

- Client.ContainerKill
- Client.ContainerPause
- Client.ContainerRemove
- Client.ContainerResize
- Client.ContainerRestart
- Client.ContainerStart
- Client.ContainerStop
- Client.ContainerUnpause

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-27 23:46:28 +01:00
Sebastiaan van Stijn
425975313a client: merge ContainerInspectWithRaw with ContainerInspect
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-24 22:01:23 +02:00
Sebastiaan van Stijn
c246639baa client: rename ImageRemoveResult.Deleted to ImageRemoveResult.Items
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-24 14:07:10 +02:00
Sebastiaan van Stijn
f9082484c9 Merge pull request #51278 from vvoland/client-container-opts2
client_(attach,commit,create,diff): Wrap result and options
2025-10-24 13:41:23 +02:00
Austin Vazquez
f40e1a7582 api: move types/versions to client/pkg and daemon/internal
This change moves the api/types/versions package out into client and daemon versions.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-23 19:22:31 -05:00
Paweł Gronowski
3340c86db9 client/container_create: Rename ContainerName to Name
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-23 21:11:30 +02:00
Paweł Gronowski
bd31b8b1c7 client_(attach,commit,create,diff): Wrap result and options
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-23 21:11:30 +02:00
Austin Vazquez
a2fd724453 client: wrap volume create api options with client options
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-20 12:55:52 -05:00
Austin Vazquez
d4e6d4f697 client/volume: refactor volume options and responses
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-20 09:05:55 -05:00
Sebastiaan van Stijn
d3e45f8743 testutil: move back to internal
This package was originally internal, but was moved out when BuildKit
used it for its integration tests. That's no longer the case, so we
can make it internal again.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-08 10:08:30 +02:00
Sebastiaan van Stijn
2d1af4e4e4 api/types/build: move build options to client and backend
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 15:57:05 +02:00
Sebastiaan van Stijn
4d20b6fe56 api/types/container: move container options to client
Move the option-types to the client and in some cases create a
copy for the backend. These types are used to construct query-
args, and not marshaled to JSON, and can be replaced with functional
options in the client.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-04 20:09:55 +02:00
Austin Vazquez
853aed171b api/types/image: move image option types to client
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-26 15:38:44 -05:00
Derek McGowan
99181f56ce Fix symlink evaluation to a directory that may not exist
During the arm64 tests, the rootfs directory does not seem to exist when
this test is run and will cause a failure when using snapshotter.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-08-11 08:47:23 -07:00
Derek McGowan
f74e5d48b3 Create github.com/moby/moby/v2 module
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-31 10:13:29 -07:00
Derek McGowan
c47afd41c8 Create github.com/moby/moby/client module
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-21 09:30:26 -07:00
Derek McGowan
afd6487b2e Create github.com/moby/moby/api module
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-21 09:30:05 -07:00
Austin Vazquez
f776cd6922 Merge pull request #50367 from dmcgowan/move-volume-daemon
Move volume under daemon
2025-07-17 14:21:06 -07:00
Paweł Gronowski
967daa627a integration: Skip TestRunMountImageMultipleTimes on Windows
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-07-16 17:25:37 +02:00
Derek McGowan
17d5f731f1 Move internal/safepath to daemon/volume/safepath
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-15 10:45:47 -07:00
Paweł Gronowski
14d9be4978 daemon: Fix mounting same image multiple times with different destinations
The previous implementation generated layer names based on container ID
and source image, which would cause conflicts when mounting the same
image to multiple destinations within a container.

This fixes the issue by changing the layer naming strategy to include
the destination path in the layer name, making it unique for each mount
point.

To avoid filesystem paths producing unexpected names, the combined
string is hex-encoded and used as a layer name.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-07-14 20:34:24 +02:00
Sebastiaan van Stijn
3d1e4d9002 api/types: move build-related types to api/types/build
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-19 09:30:27 +02:00
Sebastiaan van Stijn
c34f8bbba3 integration/volume: setupTestVolume: minor cleanups and fixes
- rename the "client" argument to "apiClient" to prevent shadowing the client import.
- remove intermediate "mount" var, which shadowed an import
- remove debug logs for stdOut/stdErr
- update the defer to use the container test-utils package to fix unhandled error warnings.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-03-04 01:21:12 +01:00
Sebastiaan van Stijn
28bf578a40 integration/volume: TestRunMountImage: use test-util for container cleanup
update the defer to use the container test-utils package to fix unhandled
error warnings.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-03-04 01:18:19 +01:00
Sebastiaan van Stijn
e41eaf2c8d integration/volume: TestRunMountVolumeSubdir: remove some logs
Both stdout and stderr were already asserted further down, so any failure
would be printed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-03-04 01:17:44 +01:00
Paweł Gronowski
a096045678 all: Replace deprecated ImageInspectWithRaw usage
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-02-06 13:31:48 +01:00
Laurent Goderre
90aea3b85f Add image subpath mounting functionality
Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
2025-02-04 21:32:04 -05:00
Laurent Goderre
844797348e Implement image mount for the snapshotter
Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
2025-01-31 10:34:27 -05:00
Laurent Goderre
8c58934106 Implement mount from image
Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
2025-01-31 10:34:27 -05:00
Sebastiaan van Stijn
4adc40ac40 fix duplicate words (dupwords)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-03-07 10:57:03 +01:00
Paweł Gronowski
bfb810445c volumes: Implement subpath mount
`VolumeOptions` now has a `Subpath` field which allows to specify a path
relative to the volume that should be mounted as a destination.

Symlinks are supported, but they cannot escape the base volume
directory.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-01-19 17:32:10 +01:00