vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

Incorrect location is used as context with podman

Open zastrixarundell opened this issue 1 year ago • 1 comments

  • VSCode Version: 1.85.1

  • Local OS Version: Fedora 39

  • Remote OS Version: NULL

  • Remote Extension/Connection Type: Containers

  • Logs:

[2024-01-10T14:54:54.446Z] Dev Containers 0.330.0 in VS Code 1.85.1 (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2).
[2024-01-10T14:54:54.446Z] Start: Resolving Remote
[2024-01-10T14:54:54.472Z] Setting up container for folder or workspace: /home/zastrix/Projects/cassian
[2024-01-10T14:54:54.472Z] Host: unix:///run/user/1002/podman/podman.sock
[2024-01-10T14:54:54.473Z] Start: Check Docker is running
[2024-01-10T14:54:54.474Z] Start: Run: podman version
[2024-01-10T14:54:54.496Z] Client:       Podman Engine
Version:      4.8.2
API Version:  4.8.2
Go Version:   go1.21.4
Built:        Mon Dec 11 14:23:04 2023
OS/Arch:      linux/amd64
[2024-01-10T14:54:54.498Z] Stop (24 ms): Run: podman version
[2024-01-10T14:54:54.498Z] Stop (25 ms): Check Docker is running
[2024-01-10T14:54:54.499Z] Start: Run: podman volume ls -q
[2024-01-10T14:54:54.521Z] Stop (22 ms): Run: podman volume ls -q
[2024-01-10T14:54:54.522Z] Start: Run: podman ps -q -a --filter label=vsch.local.folder=/home/zastrix/Projects/cassian --filter label=vsch.quality=stable
[2024-01-10T14:54:54.553Z] Stop (31 ms): Run: podman ps -q -a --filter label=vsch.local.folder=/home/zastrix/Projects/cassian --filter label=vsch.quality=stable
[2024-01-10T14:54:54.554Z] Start: Run: podman ps -q -a --filter label=devcontainer.local_folder=/home/zastrix/Projects/cassian --filter label=devcontainer.config_file=/home/zastrix/Projects/cassian/.devcontainer/devcontainer.json
[2024-01-10T14:54:54.579Z] Stop (25 ms): Run: podman ps -q -a --filter label=devcontainer.local_folder=/home/zastrix/Projects/cassian --filter label=devcontainer.config_file=/home/zastrix/Projects/cassian/.devcontainer/devcontainer.json
[2024-01-10T14:54:54.579Z] Start: Run: podman ps -q -a --filter label=devcontainer.local_folder=/home/zastrix/Projects/cassian
[2024-01-10T14:54:54.602Z] Stop (23 ms): Run: podman ps -q -a --filter label=devcontainer.local_folder=/home/zastrix/Projects/cassian
[2024-01-10T14:54:54.602Z] Start: Run: podman ps -q -a --filter label=devcontainer.local_folder=/home/zastrix/Projects/cassian
[2024-01-10T14:54:54.625Z] Stop (23 ms): Run: podman ps -q -a --filter label=devcontainer.local_folder=/home/zastrix/Projects/cassian
[2024-01-10T14:54:54.625Z] Start: Run: /usr/share/code/code --ms-enable-electron-run-as-node /home/zastrix/.vscode/extensions/ms-vscode-remote.remote-containers-0.330.0/dist/spec-node/devContainersSpecCLI.js read-configuration --docker-path podman --workspace-folder /home/zastrix/Projects/cassian --id-label devcontainer.local_folder=/home/zastrix/Projects/cassian --id-label devcontainer.config_file=/home/zastrix/Projects/cassian/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/zastrix/Projects/cassian/.devcontainer/devcontainer.json --mount-workspace-git-root
[2024-01-10T14:54:54.801Z] @devcontainers/cli 0.55.0. Node.js v18.15.0. linux 6.6.9-200.fc39.x86_64 x64.
[2024-01-10T14:54:54.801Z] Start: Run: podman ps -q -a --filter label=devcontainer.local_folder=/home/zastrix/Projects/cassian --filter label=devcontainer.config_file=/home/zastrix/Projects/cassian/.devcontainer/devcontainer.json
[2024-01-10T14:54:54.826Z] Stop (25 ms): Run: podman ps -q -a --filter label=devcontainer.local_folder=/home/zastrix/Projects/cassian --filter label=devcontainer.config_file=/home/zastrix/Projects/cassian/.devcontainer/devcontainer.json
[2024-01-10T14:54:54.830Z] Stop (205 ms): Run: /usr/share/code/code --ms-enable-electron-run-as-node /home/zastrix/.vscode/extensions/ms-vscode-remote.remote-containers-0.330.0/dist/spec-node/devContainersSpecCLI.js read-configuration --docker-path podman --workspace-folder /home/zastrix/Projects/cassian --id-label devcontainer.local_folder=/home/zastrix/Projects/cassian --id-label devcontainer.config_file=/home/zastrix/Projects/cassian/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/zastrix/Projects/cassian/.devcontainer/devcontainer.json --mount-workspace-git-root
[2024-01-10T14:54:54.830Z] Start: Run: /usr/share/code/code --ms-enable-electron-run-as-node /home/zastrix/.vscode/extensions/ms-vscode-remote.remote-containers-0.330.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/zastrix/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --docker-path podman --container-session-data-folder /tmp/devcontainers-10a1461e-f436-4aaf-8687-43463717dbe21704898493983 --workspace-folder /home/zastrix/Projects/cassian --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/zastrix/Projects/cassian --id-label devcontainer.config_file=/home/zastrix/Projects/cassian/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/zastrix/Projects/cassian/.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
[2024-01-10T14:54:55.010Z] @devcontainers/cli 0.55.0. Node.js v18.15.0. linux 6.6.9-200.fc39.x86_64 x64.
[2024-01-10T14:54:55.010Z] Start: Run: podman buildx version
[2024-01-10T14:54:55.049Z] Stop (39 ms): Run: podman buildx version
[2024-01-10T14:54:55.050Z] buildah 1.33.2
[2024-01-10T14:54:55.050Z] 
[2024-01-10T14:54:55.050Z] Start: Resolving Remote
[2024-01-10T14:54:55.120Z] Running the initializeCommand from devcontainer.json...

[2024-01-10T14:54:55.120Z] Start: Run: /bin/sh -c ls
[2024-01-10T14:54:55.125Z] app.json  config  elixir_buildpack.config  lib	    mix.lock  README.md
_build	  deps	  erl_crash.dump	   mix.exs  Procfile  test
[2024-01-10T14:54:55.125Z] Stop (5 ms): Run: /bin/sh -c ls
[2024-01-10T14:54:55.126Z] 
[2024-01-10T14:54:55.126Z] Start: Run: docker-compose version --short
[2024-01-10T14:54:55.129Z] Stop (3 ms): Run: docker-compose version --short
[2024-01-10T14:54:55.129Z] Start: Run: podman compose version --short
[2024-01-10T14:54:55.132Z] Stop (6 ms): Run: docker-compose version --short
[2024-01-10T14:54:55.306Z] Stop (177 ms): Run: podman compose version --short
[2024-01-10T14:54:55.306Z] Docker Compose version: 1.0.6
[2024-01-10T14:54:55.306Z] Start: Run: podman ps -q -a --filter label=com.docker.compose.project=cassiandevcontainer --filter label=com.docker.compose.service=bot
[2024-01-10T14:54:55.329Z] Stop (23 ms): Run: podman ps -q -a --filter label=com.docker.compose.project=cassiandevcontainer --filter label=com.docker.compose.service=bot
[2024-01-10T14:54:55.329Z] Start: Run: podman compose -f /home/zastrix/Projects/cassian/.devcontainer/docker-compose.yml config
[2024-01-10T14:54:55.505Z] Stop (176 ms): Run: podman compose -f /home/zastrix/Projects/cassian/.devcontainer/docker-compose.yml config
[2024-01-10T14:54:55.505Z] services:
  bot:
    build:
      context: ../
      dockerfile: .devcontainer/Dockerfile
    command: bash -c "sleep infinity"
    volumes:
    - ../:/workspace
version: '3.6'

[2024-01-10T14:54:55.507Z] Start: Run: podman -v
[2024-01-10T14:54:55.524Z] Stop (17 ms): Run: podman -v
[2024-01-10T14:54:55.524Z] Start: Run: podman events --format json --filter event=start
[2024-01-10T14:54:55.527Z] PersistedPath=/home/zastrix/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data, ContainerHasLabels=false
[2024-01-10T14:54:55.528Z] Start: Run: podman compose -f /home/zastrix/Projects/cassian/.devcontainer/docker-compose.yml config
[2024-01-10T14:54:55.701Z] Stop (173 ms): Run: podman compose -f /home/zastrix/Projects/cassian/.devcontainer/docker-compose.yml config
[2024-01-10T14:54:55.701Z] services:
  bot:
    build:
      context: ../
      dockerfile: .devcontainer/Dockerfile
    command: bash -c "sleep infinity"
    volumes:
    - ../:/workspace
version: '3.6'

[2024-01-10T14:54:55.701Z] Error: ENOENT: no such file or directory, open '/var/home/zastrix/.vscode/extensions/.devcontainer/Dockerfile'
[2024-01-10T14:54:55.705Z] Stop (875 ms): Run: /usr/share/code/code --ms-enable-electron-run-as-node /home/zastrix/.vscode/extensions/ms-vscode-remote.remote-containers-0.330.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/zastrix/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --docker-path podman --container-session-data-folder /tmp/devcontainers-10a1461e-f436-4aaf-8687-43463717dbe21704898493983 --workspace-folder /home/zastrix/Projects/cassian --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/zastrix/Projects/cassian --id-label devcontainer.config_file=/home/zastrix/Projects/cassian/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/zastrix/Projects/cassian/.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
[2024-01-10T14:54:55.705Z] Exit code 1
[2024-01-10T14:54:55.707Z] Command failed: /usr/share/code/code --ms-enable-electron-run-as-node /home/zastrix/.vscode/extensions/ms-vscode-remote.remote-containers-0.330.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/zastrix/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --docker-path podman --container-session-data-folder /tmp/devcontainers-10a1461e-f436-4aaf-8687-43463717dbe21704898493983 --workspace-folder /home/zastrix/Projects/cassian --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/zastrix/Projects/cassian --id-label devcontainer.config_file=/home/zastrix/Projects/cassian/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/zastrix/Projects/cassian/.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
[2024-01-10T14:54:55.707Z] Exit code 1

Steps to Reproduce:

  1. Try to open in container
  2. Doesn't work because the context of the location is wrong

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


This issue is only happening when I try to to use podman. For some reason it looks like the context is wrong and tries to use the directory of where the plugin is installed instead of the correct path. This is my docker-compose.yml file:

version: "3.6"

services:
  bot:
    build:
      # Set the context to the parent directory, so we can add `.tool-versions` to the container
      context: ../
      dockerfile: .devcontainer/Dockerfile
    volumes:
      - ../:/workspace
    # Overrides default command so things don't shut down after the process ends.
    command: bash -c "sleep infinity"

zastrixarundell avatar Jan 10 '24 14:01 zastrixarundell

I'm also encountering the same issue.

andrewn617 avatar Feb 06 '24 17:02 andrewn617