KZiovas
KZiovas

Reputation: 4779

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

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?

Upvotes: 4

Views: 4627

Answers (1)

tomgalpin
tomgalpin

Reputation: 2099

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

Upvotes: 8

Related Questions