VSCode: Cannot connect to Docker container using Remote Development extension

I'm trying to set up VSCode so I can work on a project which resides inside a docker container. There's a recently published extension Remote Development which seems to enable just that.

I followed detailed official instructions on creating .devcontainer/devcontainer.json and setting up remote by running Remote-Containers: Reopen Folder in Container, however, even with official/provided containers and settings I get the error:

Setting up container for folder: /home/ilijas/<path_to>/workspace
Error: (HTTP code 500) server error - linux spec user: unable to find user ilijas: no matching entries in passwd file 
        at /home/ilijas/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.53.0/dist/extension.js:1:151013
        at /home/ilijas/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.53.0/dist/extension.js:1:150976
        at m.buildPayload (/home/ilijas/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.53.0/dist/extension.js:1:150986)
        at IncomingMessage.<anonymous> (/home/ilijas/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.53.0/dist/extension.js:1:150486)
        at IncomingMessage.emit (events.js:187:15)
        at endReadableNT (_stream_readable.js:1090:12)
        at process._tickCallback (internal/process/next_tick.js:63:19)

In my first attempts I tried to mount a local workspace to remote one, however, since I couldn't resolve this user-not-found error, I removed all of the arguments inside docker settings which regarded user, just to make one dummy container work. I had no success. I know this is a fresh extension, but still, I hope someone can help.

1 answer

  • answered 2019-05-21 13:55 makons

    Essentially, removing all the previous docker containers solved the issue.

    Reference GitHub issue:

    The container has a label with the folder as the value, so it can be found again. When you close the window, the container is only stopped, not removed, for later use. (You could have some changes inside the container you want to keep. Also: Reusing an existing container is slightly faster.)