Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Please add to the readme how to run standalone with just an ssh server #1186

Closed
krasi-georgiev opened this issue Dec 1, 2021 · 1 comment
Labels
question Further information is requested

Comments

@krasi-georgiev
Copy link

krasi-georgiev commented Dec 1, 2021

I am running balena OS and it has a modified version of docker so I am not able to connect to the docker daemon remotely.
Instead, I am thinking to just start a development container with ssh and using the vs-code remote ssh extension to develop on the balena device remotely.

I looked through the docs and tried few commands, but couldn't figure out how to start a ssh server so that vs-code can connect to it remotely.

Also looked at this video, but the sshd service doesn't exist in the images I tried - base:0-debian11, base:0-buster
https://www.youtube.com/watch?v=KuSNpZgDYDs

docker run -it --init --rm mcr.microsoft.com/vscode/devcontainers/base:0-buster
@Chuxel
Copy link
Member

Chuxel commented Dec 1, 2021

SSH is not in any of these images by default and VS Code does not use it to communicate with the container. We have a script you can use to add it. https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/sshd.md

The main thing you'll need to do in this scenario that you do not with VS Code is expose the SSH server port. By default that is on 2222 with this script. You might need to tweak the SSH config to allow connections from things other than localhost. This is not really a scenario we've focused on to date.

docker run -it -p 2222:2222 --init --rm mcr.microsoft.com/vscode/devcontainers/base:0-buster

You may also be interested in the upcoming support for using VS Code Remote - SSH and Remote - Containers together. microsoft/vscode-remote-release#2994

@Chuxel Chuxel added the question Further information is requested label Dec 1, 2021
@Chuxel Chuxel closed this as completed Dec 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants