docker/cli v27 changed the return value of `Err()` to `streams.Out`
which made the typecheck for `console.File` fail.
The check is no longer needed due to the `IsTerminal` method present in
`streams.Out` which also has a special handling for Windows console.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This function is an alias for filepath.IsAbs and we are considering deprecating
and/or removing this function in the archive package, so removing its uses
helps transitioning if we decide to deprecate and/or remove it.
[docker/cli@fb0788f] also added a normalize step in TrimBuildFilesFromExcludes,
so that callers are not _required_ to first normalize the path, so the
normalizeation may be redunant, but keeping the normalization as this variable
is used further down the code.
[docker/cli@fb0788f]: fb0788f18f
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This was racy with the sleep, so the Compose file has been
tweaked to make it pass reliably.
Now, there's 3 services:
* `running` - sleeps forever
* `exit` - exits _successfully_ immediately
* depends on `running` started
* `fail` - exits _with error_ immediately
* depends on `exit` succeeding
Now, the test can ensure that the containers are all run/
started in the expected order the assertions will be reliable.
Before, it was possible for `fail` to run & exit before `exit`,
for example. The `running` service also ensures there's always
at least one other "running" container when we do an abort.
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
When creating automatic file shares, ignore any non-directory
bind mounts, e.g. for an individual (normal) file or a special
type like a Unix socket (`/var/run/docker.sock`).
Additionally, there's no need to create a directory if one
does not exist, the API will handle that. However, the check
for existence remains so that `create_host_path: false`
mounts can be ignored.
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
Kill executed on the second Ctrl-C of docker compose up was
filtering containers depending on its state. In some cases the
containers can reach an state for what these filters don't get
any container, and the command keeps reporting `no container to
kill`.
Remove this filtering, so it tries to kill any container it
finds, independently of its state.
Fixes https://github.com/docker/compose/issues/10661
Signed-off-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
Unfortunately, the feature flag mechanism for experimental features
isn't adequate. To avoid some edge cases where Compose might try to
use Synchronized file shares with Desktop when the feature isn't
available, we need to query a new endpoint.
Before we move any of this out of experimental, we need to improve
the integration here with Desktop & Compose so that we get all the
necessary feature/experiment state up-front to reduce the quantity
of IPC calls needed up-front.
For now, there's some intentional redundancy to avoid making this
extra call if we can avoid it. The actual endpoint is very cheap/
fast, but every IPC call is a potential point of of failure, so
it's worth it.
Signed-off-by: Milas Bowman <milas.bowman@docker.com>