Skip to content

Remote Containers Extension incompatible with Docker-Compose v2.9 #7047

@bigtallcampbell

Description

@bigtallcampbell
  • VSCode Version: 1.7.0
  • Local OS Version: Windows 11
  • Remote OS Version: Ubuntu 20.04
  • Remote Extension/Connection Type: Containers
  • docker-compose --version: 2.9

VSCode Remote Containers extension is using the wrong container name when being built from docker-compose (note the -app versus _app). I believe this is from a breaking change in docker-compose (compose-spec/compose-go#294)

Steps to Reproduce:

  1. Install docker-compose v2.9
    sudo curl -L "https://github.com/docker/compose/releases/download/2.9.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod 755 $DESTINATION
  2. Clone https://github.com/bigtallcampbell/devcontainertest
  3. Build Dev Container
  4. DevContainer will fail to build

Docker images result:
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
devcontainertest_devcontainer-app latest 598b155302bc 4 minutes ago 524MB
dev_container_feature_content_temp latest 20d4bfe8ccc9 4 minutes ago 268kB

Logs from remoteContainers (snippet):
[2022-08-10T17:56:07.280Z] => => sha256:a8da6c1c38839ff116fa3b0d3807bb0bb44515c 101.11MB / 101.11MB 1.9s
=> => extracting sha256:d7bfe07ed8476565a440c2113cc64d7c0409dba8ef761fb3 0.5s
=> => extracting sha256:4a0b6a9c72470ff5d8860f27875472d3ad0d4b19051144f2 0.3s
=> => extracting sha256:d27bf6512b10b479ce26a5fccce481830b0b356e00838901 0.2s
=> => extracting sha256:7e85935d92b53aa4a04ae997f4f06c4fbffa6b027d6dc482 0.0s
=> => extracting sha256:a8da6c1c38839ff116fa3b0d3807bb0bb44515c62c8b6846 1.9s
=> [stage-2 1/2] COPY --from=dev_containers_feature_content_source /tmp/ 0.3s
=> [stage-2 2/2] RUN cd /tmp/build-features/local-cache && chmod +x ./i 14.9s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:598b155302bc944b0cdc098e7bda851086e948c8c4db8 0.0s
=> => naming to docker.io/library/devcontainertest_devcontainer-app 0.0s
=> exporting cache 0.0s
[2022-08-10T17:56:07.280Z] => => preparing build cache for export 0.0s
[2022-08-10T17:56:07.320Z]
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
[2022-08-10T17:56:07.321Z] Stop (25758 ms): Run: docker-compose --project-name devcontainertest_devcontainer -f /home/ryan/repos/bigtallcampbell/devcontainertest/.devcontainer/docker-compose.devContainer.yml -f /tmp/docker-compose/docker-compose.devcontainer.build-1660154141562.yml build --no-cache
[2022-08-10T17:56:07.322Z] Start: Run: docker inspect --type image devcontainertest_devcontainer_app
[2022-08-10T17:56:07.348Z] Stop (26 ms): Run: docker inspect --type image devcontainertest_devcontainer_app

Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: No

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugcontainersIssue in vscode-remote containersverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions