Skip to content
Advertisement

How to fix The terminal process “/usr/sbin/nologin” failed to launch (exit code: 1) error in VSCode [closed]

I am running my VSCode on Windows but I have it connected to a remote container. I am trying to start an integrated terminal on VSCode in that container and I get this error:

The terminal process “/usr/sbin/nologin” failed to launch (exit code: 1).

I can enter the container and start a bash terminal with docker exec but the integrated VSCode terminal gives me the error mentioned above.

Any ideas,how can I successfully open the terminal in VSCode?

Advertisement

Answer

See here nologin – Man Page

nologin will always exit non-zero

I expect the user associated with the container has nologin set as their default Shell. Change this to bash or similar and you should be good to go. You could try adding the following to your Dockerfile

ENV SHELL /bin/bash

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement