Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode tries to use target on docker-compose syntax versions prior to 3.4 #7301

Closed
kyrofa opened this issue Oct 6, 2022 · 3 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers

Comments

@kyrofa
Copy link

kyrofa commented Oct 6, 2022

  • VSCode Version: 1.71.2
  • Local OS Version: Ubuntu 18.04 (Bionic)
  • Remote OS Version: Ubuntu 20.04 (Focal)
  • Remote Extension/Connection Type: docker-compose
  • Logs:
<snip...>
[2022-10-06T18:32:33.500Z] Docker Compose override file for building image:
version: '3.2'

services:
  dev:
    image: vsc-project-c7c13266ed09e325da5dc5a63e0cf8df
    build:
      dockerfile: /tmp/devcontainercli-kyrofa/container-features/0.19.0-1665081153307/Dockerfile-with-features
      target: dev_containers_target_stage
      context: /home/kyrofa/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/empty-folder
      args:
        - _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label
        - _DEV_CONTAINERS_IMAGE_USER=root
        - _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp

[2022-10-06T18:32:33.501Z] Start: Run: docker-compose --project-name if2engine -f /home/kyrofa/project/docker-compose.yml -f /home/kyrofa/project/docker-compose.override.yml -f /home/kyrofa/project/.devcontainer/docker-compose.yml -f /home/kyrofa/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1665081153500.yml build dev
[2022-10-06T18:32:33.765Z] ERROR: The Compose file '/home/kyrofa/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1665081153500.yml' is invalid because:
services.dev.build contains unsupported option: 'target'
[2022-10-06T18:32:33.785Z] Stop (284 ms): Run: docker-compose --project-name if2engine -f /home/kyrofa/project/docker-compose.yml -f /home/kyrofa/project/docker-compose.override.yml -f /home/kyrofa/project/.devcontainer/docker-compose.yml -f /home/kyrofa/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1665081153500.yml build dev
[2022-10-06T18:32:33.786Z] Error: Command failed: docker-compose --project-name if2engine -f /home/kyrofa/project/docker-compose.yml -f /home/kyrofa/project/docker-compose.override.yml -f /home/kyrofa/project/.devcontainer/docker-compose.yml -f /home/kyrofa/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1665081153500.yml build dev
[2022-10-06T18:32:33.786Z]     at pd (/home/kyrofa/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:259:426)
[2022-10-06T18:32:33.786Z]     at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-10-06T18:32:33.786Z]     at async ZF (/home/kyrofa/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:259:2424)
[2022-10-06T18:32:33.786Z]     at async XF (/home/kyrofa/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:241:2391)
[2022-10-06T18:32:33.786Z]     at async bD (/home/kyrofa/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:303:2193)
[2022-10-06T18:32:33.786Z]     at async ys (/home/kyrofa/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:303:3182)
[2022-10-06T18:32:33.786Z]     at async UL (/home/kyrofa/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:423:10319)
[2022-10-06T18:32:33.786Z]     at async ML (/home/kyrofa/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:423:10075)
[2022-10-06T18:32:33.789Z] Stop (1509 ms): Run: /snap/code/108/usr/share/code/code --ms-enable-electron-run-as-node /home/kyrofa/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/kyrofa/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --workspace-folder /home/kyrofa/project --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/kyrofa/project --log-level debug --log-format json --config /home/kyrofa/project/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-10-06T18:32:33.789Z] Exit code 1
[2022-10-06T18:32:33.790Z] Command failed: /snap/code/108/usr/share/code/code --ms-enable-electron-run-as-node /home/kyrofa/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/kyrofa/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --workspace-folder /home/kyrofa/project --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/kyrofa/project --log-level debug --log-format json --config /home/kyrofa/project/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-10-06T18:32:33.790Z] Exit code 1

Steps to Reproduce:

  1. Open a project that uses a docker-compose syntax version prior to 3.4 (mine is v3.2)
  2. Click "reopen in container"

This is #6568 all over again. Please check syntax versions before trying to do this stuff! I don't want to bump syntax versions in my projects unless it's for something I need. Not because my chosen tooling requires it of me.

@kyrofa
Copy link
Author

kyrofa commented Oct 6, 2022

@chrmarti helped resolve this last time around.

@github-actions github-actions bot added the containers Issue in vscode-remote containers label Oct 6, 2022
@chrmarti chrmarti self-assigned this Oct 7, 2022
@chrmarti chrmarti added the bug Issue identified by VS Code Team member as probable bug label Oct 7, 2022
@chrmarti chrmarti added this to the October 2022 milestone Oct 7, 2022
@chrmarti
Copy link
Contributor

Dev Containers 0.258.0-pre-release comes with a fix. Could you give that a try and let me know if it fixes it? Thanks.

@chrmarti chrmarti modified the milestones: October 2022, September 2022 Recovery Oct 12, 2022
@chrmarti
Copy link
Contributor

Fix is now also available in Dev Containers 0.255.3.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers
Projects
None yet
Development

No branches or pull requests

2 participants