1
0
mirror of https://github.com/docker/cli.git synced 2025-04-18 19:24:03 +03:00
Stephen Day 1a502e91c9
run: flag to include the Docker API socket
Adds a flag to the create and run command, `--use-api-socket`, that can
be used to start a container with the correctly configured parameters to
ensure that accessing the docker socket will work with out managing bind
mounts and authentication injection.

The implementation in this PR resolves the tokens for the current
credential set in the client and then copies it into a container at the
well know location of /run/secrets/docker/config.json, setting
DOCKER_CONFIG to ensure it is resolved by existing tooling. We use a
compose-compatible secret location with the hope that the CLI and
compose can work together seamlessly.

The bind mount for the socket is resolved from the current context,
erroring out if the flag is set and the provided socket is not a unix
socket.

There are a few drawbacks to this approach but it resolves a long
standing pain point. We'll continue to develop this as we understand
more use cases but it is marked as experimental for now.

Signed-off-by: Stephen Day <stephen.day@docker.com>
2025-04-15 10:57:44 -07:00
..
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2023-01-06 22:36:47 +01:00
2024-07-04 10:30:56 +02:00
2023-01-06 22:36:47 +01:00
2023-01-06 22:36:47 +01:00
2024-02-21 10:40:13 +01:00
2023-01-06 22:36:47 +01:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2023-01-06 22:36:47 +01:00
2023-01-06 22:36:47 +01:00
2023-01-06 22:36:47 +01:00
2023-01-06 22:36:47 +01:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2023-01-06 22:36:47 +01:00
2023-01-06 22:36:47 +01:00
2023-01-06 22:36:47 +01:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2024-10-10 17:00:43 +02:00
2024-10-10 16:35:07 +02:00
2024-08-16 15:09:51 +02:00
2024-07-04 10:30:56 +02:00
2024-10-10 16:35:03 +02:00
2023-01-06 22:36:47 +01:00
2024-08-16 15:09:51 +02:00
2024-10-10 16:35:07 +02:00
2023-01-06 22:36:47 +01:00
2024-07-04 10:30:56 +02:00
2023-01-06 22:36:47 +01:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2023-01-06 22:36:47 +01:00
2024-12-10 15:51:21 +00:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2023-01-06 22:36:47 +01:00
2023-01-06 22:36:47 +01:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2023-01-06 22:36:47 +01:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2024-02-21 10:40:13 +01:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2023-01-06 22:36:47 +01:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2024-07-10 11:36:40 +02:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2024-10-10 16:35:03 +02:00
2023-01-06 22:36:47 +01:00
2024-07-04 10:30:56 +02:00
2023-01-06 22:36:47 +01:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2023-01-06 22:36:47 +01:00
2023-01-06 22:36:47 +01:00
2024-01-18 14:58:43 +01:00
2023-08-28 01:58:58 +02:00
2024-07-04 10:30:56 +02:00
2023-01-06 22:36:47 +01:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2023-01-06 22:36:47 +01:00
2023-01-06 22:36:47 +01:00
2024-07-04 10:30:56 +02:00
2024-07-04 10:30:56 +02:00
2023-01-06 22:36:47 +01:00