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

Docker: Extensions are always downloaded again #2227

Closed
alexdima opened this issue Jan 28, 2020 · 1 comment
Closed

Docker: Extensions are always downloaded again #2227

alexdima opened this issue Jan 28, 2020 · 1 comment
Assignees
Labels
containers Issue in vscode-remote containers plan-item A plan item remote Issues in the code server support
Milestone

Comments

@alexdima
Copy link
Member

When using one of the new images, like typescript-node:0-12, and then rebuilding the container, one thing appears to take a lot of time compared to the rest of the steps (2s out of a total of 4s):

[1671 ms] Start: Run in container: cd /root/.vscode-server-insiders/bin/c4b6a6b537de49a734d0eedea06152ea37dfdb6a; export VSCODE_AGENT_FOLDER=/root/.vscode-server-insiders; /root/.vscode-server-insiders/bin/c4b6a6b537de49a734d0eedea06152ea37dfdb6a/server.sh --disable-telemetry --install-extension dbaeumer.vscode-eslint --install-extension ms-vscode.vscode-typescript-tslint-plugin --force
[3538 ms] Installing extensions...
Installing extension 'dbaeumer.vscode-eslint' v2.0.15...
Extension 'dbaeumer.vscode-eslint' v2.0.15 was successfully installed.
Installing extension 'ms-vscode.vscode-typescript-tslint-plugin' v1.2.3...
Extension 'ms-vscode.vscode-typescript-tslint-plugin' v1.2.3 was successfully installed.
[3538 ms] 

Rebuilding the container would be twice as fast if this step would be tweaked to cache things. Perhaps the extension can be downloaded and cached somewhere on the UI side, and then the .vsix files installed via command line inside the container.

@chrmarti chrmarti added containers Issue in vscode-remote containers feature-request Request for new features or functionality remote Issues in the code server support labels Jan 28, 2020
@fsackur
Copy link

fsackur commented Apr 5, 2020

There is a mechanism documented here:
https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild

The constraint is that, if you are running as a non-root user, you need to perform an action in the dockerfile.

@sandy081 sandy081 added this to the April 2020 milestone Apr 6, 2020
@chrmarti chrmarti modified the milestones: April 2020, May 2020 Apr 29, 2020
@chrmarti chrmarti added plan-item A plan item and removed feature-request Request for new features or functionality labels May 12, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
containers Issue in vscode-remote containers plan-item A plan item remote Issues in the code server support
Projects
None yet
Development

No branches or pull requests

4 participants