Answer the question
In order to leave comments, you need to log in
Docker question from a beginner, how to build an image?
I want to build an image from alpine and install bash there by default, Node version manager, and use it to install nodejs v12.13.1, here is the Dockerfile
FROM alpine
RUN apk update
RUN apk add bash
RUN apk add wget
#RUN export SHELL=/bin/bash
RUN cd ~ && touch .bashrc
RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
SHELL ["/bin/bash", "-c"]
RUN echo $0
RUN nvm install 12.13.1
RUN nvm use 12.13.1
RUN nvm install 12.13.1
with the message /bin/bash: nvm: command not found
#RUN nvm install 12.13.1
#RUN nvm use 12.13.1
docker run -it imagename bash
nvm install 12.13.1
works and installs. nvm use 12.13.1
it crashes with an errorenv: can't execute 'node': No such file or directory
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `nvm use --delete-prefix v12.13.1` to unset it.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question