cli icon indicating copy to clipboard operation
cli copied to clipboard

Simplify install process

Open Chuxel opened this issue 3 years ago • 6 comments

Currently this CLI has a native module dependency which drives the need for node-gyp dependencies like Python and C++. This makes installing the CLI far more difficult than intended.

To solve this issue, I'd propose we have a "distro" that is already compiled, and could even bundle Node.js. Installation can then just be an unzip/untar to keep things easy to begin with. We could then keep the npm option around for those that prefer to deal with the dependenceis.

The alternative would be to look into ways to remove the native dependency so that only Node.js is required.

//cc: @chrmarti @bamurtaugh

Chuxel avatar Jun 26 '22 17:06 Chuxel

This would be great for the use case of using devcontainer build in CI/CD pipelines. You could provide a docker image too.

eddiegroves avatar Jun 27 '22 01:06 eddiegroves

I thought I would share my use case. I typically don't install node directly on my host operating system, instead, I create development-focused containers that have node installed. Same with Python. When I need to work with/on a python project, I create a container to house that tool.

I still wanted to install this cli, though, so I used homebrew to get things up and running:

brew install node
brew install python
npm install -g @devcontainers/cli

mscottford avatar Jul 15 '22 21:07 mscottford

Another justification for why this would be good is that one of the values of using a devcontainer is that you minimize the locally installed software, instead, relying on the devcontainer to have the stuff you need for actual development.

Having a hard dependency in which you need to install things like Python means that you now have to have more "stuff" installed on the host machine.

aaronpowell avatar Sep 16 '22 02:09 aaronpowell

why not leave ready-made formulas for each OS?

  • homebrew
  • .deb
  • .rpm
  • ...

avelino avatar Sep 20 '22 13:09 avelino

An image with devcontainers/cli installed along with its dependencies would also go a long way.

MisterTimn avatar Sep 30 '22 09:09 MisterTimn

Note that it can be installed simply by running npm install -g @devcontainers/cli on mcr.microsoft.com/vscode/devcontainers/typescript-node. This is actually used in https://github.com/devcontainers/features/blob/82960fd16b04fb4003a8765b2381bd23553737b5/.devcontainer.json, for example.

eitsupi avatar Sep 30 '22 09:09 eitsupi

I agree with @avelino for having at least deb and rpm packages.

framctr avatar Jun 30 '23 06:06 framctr