extensions-sdk
extensions-sdk copied to clipboard
ExtensionVM does not resolve containers in a composefile
Describe the bug When trying to execute commands using the CLI in the VM using a compose file, the exec call tries to run the command into the compose grouping name and there is no way to access a specific container in the compose group.
Add the steps to reproduce Steps to reproduce the behavior:
- Create an extension that uses more than 2 containers through compose file
- Try to execute any command with
ddClient.extension.vm?.cli.exec
- See the error message in the debug window
Describe the expected behavior There should be a way to get into any of the containers of the compose group and execute the command in that container.
Output of docker extension version
:
Client Version: v0.2.4
Server API Version: 0.2.3
Output of docker version
:
Client: Docker Engine - Community
Cloud integration: v1.0.25
Version: 20.10.16
API version: 1.41
Go version: go1.17.10
Git commit: aa7e414
Built: Thu May 12 09:17:39 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Desktop
Engine:
Version: 20.10.16
API version: 1.41 (minimum version 1.12)
Go version: go1.17.10
Git commit: f756502
Built: Thu May 12 09:15:42 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.4
GitCommit: 212e8b6fa2f44b9c21b2798135fc6fb7c53efc16
runc:
Version: 1.1.1
GitCommit: v1.1.1-0-g52de29d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Additional context Using WSL2 in Windows 10
Hi @hguerrero sorry for the delay, do you still see the issue? Would you mind sharing the error message you see?
Effectively for the sake of simplicity when creating this API, we arbitrarily choose to focus on the "single container" scenario for the CLI command execution, and we try to execute commands in container corresponding to the first compose service in the list. It should be also possible to reorder services in the compose file in order to execute commands in it if you have several containers, but one specific to have commands execution triggered by the front end. We need to specify this in our docs, until we improve the API to allow selecting a container.