Nikola Voislav
Nikola Voislav

Reputation: 45

VS-code Reopen in container -> ERROR: .PermissionError: [Errno 13] Permission denied

Hi I'm trying to open my container in VS-code.

Info:

  1. OS: Ubuntu 20.04.4 LTS
  2. Docker version 20.10.13
  3. docker-compose version 1.29.2
  4. VS-Code version: 1.65.2

My user has the docker group.

Containers are starting correctly with no issues.

I have tried setting sudo chmod 777 /var/run/docker.sock

I have rebooted and re-installed every signle one of the above software (except for the OS) But when I try to use the Reopen in container vscode (using the remote containers extension) I get the following error: ERROR: .PermissionError: [Errno 13] Permission denied: '/home/<my_user>/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.containerFeatures-1647440854887.yml'

The Dockerfile and other .yml files do not set docker to use a different user. The file is generated by the extension itself with -rw-rw-r-- permissions. Starting the containers outside of vs works flawlessly.

Full command:

docker-compose --project-name <name> -f /home/<my_user>/repos/<my_repo>/.devcontainer/vscode.yml -f /home/<my_user>/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.containerFeatures-1647441870900.yml up -d

Upvotes: 3

Views: 2759

Answers (1)

Nikola Voislav
Nikola Voislav

Reputation: 45

Fixed by reverting Remote - Containers to: 0.211.0.

Upvotes: 1

Related Questions