vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

Let us install VS Code Server from an offline media when connecting to a remote container

Open Nefcanto opened this issue 3 years ago • 9 comments

Right now when we use the Dev Containers extension, and we Attach to Running Container ..., it installs VS Code Server.

Sometimes the installation is smooth and fast. But most of the time it's a pain and many times it gets stuck.

Since we constantly destroy and create containers, we need to improve this step.

Please let us download the latest version of VS Code Server, put it somewhere on our development machine, and configure the Dev Containers extension to use that for installation.

Nefcanto avatar Nov 24 '22 14:11 Nefcanto

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 10 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vscodenpa avatar Nov 28 '22 23:11 vscodenpa

I would like to see some official support for this also - not only would it be faster for certain types of iteration, it would be very helpful in air-gapped dev environments or other networks that are blocked in some way from allowing any old download from the internet.

Until then, I am using the somewhat hacky workaround of pre-installing vscode server/extensions in the container image. Obviously not ideal since you need to have it in your image ahead of time, you have to keep it up to date with changing vscode/extension versions, and you would have to put it into your production container image to be able to connect and debug them.

cseelye avatar Nov 29 '22 17:11 cseelye

@cseelye can you please tell me how you do that?

Until we get this feature, that's very useful for us. We searched and didn't find an article about it.

How to install VS Code in a docker image (Dockerfile)? Does VS Code know it's installed when we use that image in our containers? Where should we put it or its configuration?

Nefcanto avatar Nov 30 '22 02:11 Nefcanto

:slightly_smiling_face: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vscodenpa avatar Nov 30 '22 02:11 vscodenpa

@cseelye can you please tell me how you do that?

Until we get this feature, that's very useful for us. We searched and didn't find an article about it.

How to install VS Code in a docker image (Dockerfile)? Does VS Code know it's installed when we use that image in our containers? Where should we put it or its configuration?

Just to be clear, I have been installing code-server into a dev container, so I can use the container with a desktop install of VS Code. VS Code will connect to the container and see the server already installed and not try to download/add it to the container. Normally Code will use its own SHA to download and install a matching code-server into the container. That makes it a little awkward when you are trying to preinstall code-server since you don't know what version of Code you will be running against. To make it smoother for my own containers as well as the team I work with professionally, I've been pre-installing the latest couple versions of code-server as well as the extensions we commonly use, so it covers the people running the latest as well as those who are slower to upgrade. Here's the script I wrote to do the install: https://github.com/cseelye/ubuntu-base/blob/main/vscode.sh and using it in the Dockerfile: https://github.com/cseelye/ubuntu-base/blob/main/Dockerfile#L96. I'm sure this script could be simplified/improved. It's handling two different ubuntu LTS versions as well as ARM and x86 architectures, and installing the Live Share prerequisites as well as code-server and a list of extensions. Feel free to open an issue or question over there (or a pull request haha)

cseelye avatar Nov 30 '22 15:11 cseelye

@cseelye I saw your scripts. That's the true nature of a programmer. Solving problems. I enjoyed your code and your viewpoint.

We have a rule at our company, that we all should setup our machines using the same configuration

And we develop inside containers.

Thus we can simplify your script since we are all Ubuntu 22.04 LTS and amd64 architecture.

Thank you for this valuable script.

Nefcanto avatar Dec 03 '22 05:12 Nefcanto

I'd prefer a setting to change the URL of the vscode server download location. This should still work for local offline file installs with file:// URIs.

fhriley avatar Feb 07 '23 21:02 fhriley

Do You have any workaround for this? I have offline computers, but still want to use vscode with devcontainers for developing purposes. Is it possible?

ralwing avatar Sep 14 '23 12:09 ralwing

Hi I work on offline or on low-bandwidth-network computers and updating vscode server is really a pain :disappointed_relieved: I do not find a setting to avoid updating the server.

Cyrille37 avatar Jun 13 '24 10:06 Cyrille37

Any updates on this issue? It was posted almost two years ago. Its a painful DX to wait for downloading the VS Code Server.

Nefcanto avatar Jan 22 '25 06:01 Nefcanto