Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devcontainers #2

Open
Weissnix4711 opened this issue Sep 2, 2022 · 4 comments
Open

Devcontainers #2

Weissnix4711 opened this issue Sep 2, 2022 · 4 comments

Comments

@Weissnix4711
Copy link

Hello,

Can this be used for devcontainers? If so, how?

I wish to use devcontainers with VSCodium, however the official remote containers extension fails during container creation, at the installation of the code server within the container.

Can this extension help? Or have I completely misunderstood the purpose of it?

Thanks,
Thomas Aldrian

@xaberus
Copy link
Owner

xaberus commented Sep 2, 2022

This extension will not download & run the remote extension host (REH) for you like the Microsoft one does. You have to download it yourself from the VSCodium release page.
I have not tested it but in theory it should work with containers:

  • spin up a container and set up a port forwarding from an internal remote port the REH will listen on to a local port on the host that VSCodium will connect to
  • run a shell in the container, download the REH and unpack it somewhere (make sure it is exactly the same release as the one on your host or it will fail with "authentication" errors)
  • start the REH in the container
  • connect using this extension to the local port

EDIT: I was thinking about real hosts, in the case of containers it is probably enough just to expose the internal port to the host and connect to it.

@Validark
Copy link

Do you think instructions (with commands) for how to do this could be added to the README?

@xaberus
Copy link
Owner

xaberus commented Oct 20, 2022

Sure! I am short on time at the moment & have no too much experience with containers right now, so somebody would have to a pull request 😉.

@notpushkin
Copy link

I've looked into it and it seems to be doable in principle.

I've got an extension running (forked from vscode-remote-oss, with some bits from Open Remote - WSL) that starts a container with devcontainer up and runs VSCodium server inside as a “feature” (a devcontainer addon). After it starts, we can connect to it as usual (open new window, resolve the authority and connect to the exposed server).

It is very flaky though:

Overall, the dev containers CLI seems to be an afterthought, so the experience would likely still be pretty bad. I'll publish my code after I clean up a bit, but I don't think it's worth continuing this approach until the issues with the CLI are resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants