devcontainers / images

Repository for pre-built dev container images published under mcr.microsoft.com/devcontainers
https://containers.dev
MIT License
1.23k stars 454 forks source link

Remove Node Feature and directly install 'nvm' wherever necessary #424

Open samruddhikhandale opened 1 year ago

samruddhikhandale commented 1 year ago

Node is optional. it's not necessary for a python project. Therefore, ESLint should be optional too. I propose removing node features from Python and Miniconda images. Users should add them to their devcontainer.json if they need them.

It is annoying to uninstall ESLint to see them again every time I rebuild the image. ESLint wasn't included previously in the image.

Originally posted by @Uguudei in https://github.com/devcontainers/images/issues/243#issuecomment-1429032491

samruddhikhandale commented 1 year ago

Given JavaScript front-end web client code written for use in conjunction with a Python back-end often requires the use of Node.js-based utilities to build, this container also includes nvm so that you can easily install Node.js.

For python and miniconda images, highlighting the thought behind installing nvm as mentioned in this doc. Currently, nvm is getting installed via Node Feature (with version:none) which could be avoided.

The end goal is that nvm should be installed in these images, which can be done directly in the dockerfile without using the Node Feature (which will eventually discard installation of eslint extension)

Uguudei commented 1 year ago

It became an issue after the image started to build with the devcontainer.json config. It also aligns with an effort to remove unnecessary tools from images, as I see in this pull request (removing bandit, yapf etc...).

Given JavaScript front-end web client code written for use in conjunction with a Python back-end often requires the use of Node.js-based utilities to build, this container also includes nvm so that you can easily install Node.js.

I don't know which tools need to be in the same container. If it's about the front-end connecting to the back-end via API, it's better to be in separate containers and run as docker-compose. Even if someone wants to run them together, there is already a separate Node feature. So they can install/add it easily.

For the rest of the python developers who are in the field of data science or back-end API development, Node is not necessary.

Finally, having bloatware(ESLint) is no good.