Closed Andreas02-dev closed 1 year ago
Could you try and see if this works?
RUN curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher jorgebucaran/nvm.fish
Could you try and see if this works?
RUN curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher jorgebucaran/nvm.fish
Changing it to the following will build the container correctly:
RUN chsh -s /usr/bin/fish
ENV SHELL=/usr/bin/fish LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
RUN fish --command "curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher jorgebucaran/nvm.fish"
RUN fish --command "fisher -v"
# Install `NPM` and `TailwindCSS`
RUN fish --command "nvm install lts && npm install -g tailwindcss"
However after creation, fisher
, nvm
and npm
will not be available in the devcontainer.
I've managed to circumvent this by mounting the following config.fish
:
# Install the latest NPM and Yarn:
set --universal nvm_default_version lts
set --universal nvm_default_packages yarn
And by running this fish script in the devcontainer.json
's postCreateCommand
:
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
fisher install jorgebucaran/nvm.fish
nvm install lts
npm install -g tailwindcss
While of course the optimal situation would be to be able to install all dependencies in the Dockerfile, I am content with this solution, you can close the issue if you want.
Thanks again for your help!
I'd like to use Fisher to install NVM in a container, however it fails silently.
When executing the following block in my Dockerfile:
Fish will get installed and the shell is changed correctly.
Unfortunately,
RUN curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
fails silently (the build will pass this step, howeverfisher
will not be installed.)This issue only affects running in the Dockerfile itself, when the container is built, running
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
works correctly.The full Dockerfile until & including the first failing step is below, where it will complain about
nvm
not being installed:Thanks for your help and with kind regards,
Andreas