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

Permission denied when switch between multiple devcontainers.

Open theokoeldavidson opened this issue 1 year ago • 0 comments
trafficstars

  • VSCode Version: 1.86.1
  • ms-vscode-remote.remote-containers Version: 0.338.1
  • Local OS Version: Ubuntu 22.04.3 LTS

Description

I'm actually trying to setup a microservices projet through Devcontainers. I'm based my project structure like the advenced documentation, to make some test on the performance of this kind of project. I have exactly the same project structure has above, with two images of mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm. And my goal was to F1> Dev Containers: Switch Container between my differents servicies has describe in the docs. But, when I try tu update and save a file from a different devcontainer as launch. I got a Permission denied on the file.

image

Steps to Reproduce:

  1. Clone the project
  2. F1> Dev Containers: Reopen in Container > Gateway
  3. F1> Dev Containers: Switch Container > Auth
  4. Try to edit and save index.ts

Some questions/points to studies.

After some research, I saw some surprising points:

  1. Building of devcontainers: When we run thoses devconatiners, they are not run has the same way. image One is run correcly with the devcontainer config image But the second is like a normal container. image Is supose that is normal. However, I was expecting thoses devconatiners will be update when I switch between us, but is not the case ?

  2. Temporary solution: A temporary solution that I found is to F1> Dev Containers: Rebuild container each time I switch of devcontainer. This cannot be a solution, because I know that in the final version of my project there will be postCreateCommands which will take several minutes, and therefore which cannot be re-executed for each switch.

theokoeldavidson avatar Feb 15 '24 15:02 theokoeldavidson