microsoft / microsoft/vscode-remote-release

Error: EIO: i/o error, stat '/workspaces/repo'

Open
#6,080 3 comments 0 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Feb 27, 2024.

bug containers upstream
Dominant language
Dockerfile
Stars
4.2k
Forks
470
Avg merge
1d 1h
Merged PRs (30d)
1

Description

  • VSCode Version: 1.63.2
  • Local OS Version: Windows 11 (22000.318)
  • Remote OS Version: Ubuntu 20.04
  • Remote Extension/Connection Type: Docker
  • Docker Desktop Version: 4.3.1
  • Logs:

devcontainer.json:

{
	"name": "azure-management",
	"build": {
		"dockerfile": "Dockerfile",
	},

	// Set *default* container specific settings.json values on container create.
	"settings": {
		"terminal.integrated.shell.linux": "pwsh"
	},

	// Add the IDs of extensions you want installed when the container is created.
	// Note that some extensions may not work in Alpine Linux. See https://aka.ms/vscode-remote/linux.
	"extensions": ["ms-vscode.powershell","ms-vscode.azure-account","ms-dotnettools.dotnet-interactive-vscode","hashicorp.terraform"],

	// Use 'forwardPorts' to make a list of ports inside the container available locally.
	// "forwardPorts": [],

	// Use 'postCreateCommand' to run commands after the container is created.
    //"postCreateCommand": "uname -a",

	"mounts": ["source=${localEnv:USERPROFILE}//.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached","source=c://git//repos,target=/workspaces/repos,type=bind,consistency=cached"],

	// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
	"remoteUser": "vscode"
}

Dockerfile:

FROM mcr.microsoft.com/powershell:7.2.1-ubuntu-focal

RUN apt-get update && apt-get -y upgrade

RUN apt-get update && apt-get install -y \
    wget \
    unzip \
    ca-certificates \
    apt-transport-https \
    lsb-release \
    gnupg \
	curl \
    && rm -rf /var/lib/apt/lists/*

# Prerequisite for .NET Interactive Notebooks: https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.dotnet-interactive-vscode
# https://docs.microsoft.com/en-gb/dotnet/core/install/linux-ubuntu#2004-
RUN wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb
RUN apt-get update && apt-get install -y dotnet-sdk-6.0

# Switch to non-root user:
RUN useradd --create-home vscode
WORKDIR /home/vscode
USER vscode

Steps to Reproduce:

  1. Re-open a folder in a dev container based on the above devcontainer.json and Dockerfile
  2. Try to open a file from a mounted directory under /workspaces, either the custom bind mount or the auto mount point for the directory/repo being re-opened in the container
  3. The following pops up: "Error: EIO: i/o error, stat '/workspaces/repos/test.txt'"

Does this issue occur when you try this locally?: N/A
Does this issue occur when you try this locally and all extensions are disabled?: N/A

I have tried to reproduce on another machine with the same versions as listed above, and I can`t seem to reproduce there. Hence, I am thinking it might be something related to the other machine - which has worked just fine with dev-containers up until now.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.