How to fix The terminal process "/usr/sbin/nologin" failed to launch (exit code: 1) error in VSCode

Issue

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?

Solution

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

Answered By – tomgalpin

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published