FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
software-properties-common \
git \
curl
# node
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash && \
. ~/.profile && \
nvm install 0.12.5 && \
nvm use 0.12.5
But I got following error
Step 3/7 : RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash && . ~/.profile && nvm install 0.12.5 && nvm use 0.12.5
---> Running in 419f35839793
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12819 100 12819 0 0 38363 0 --:--:-- --:--:-- --:--:-- 38380
=> Downloading nvm from git to '/root/.nvm'
=> Cloning into '/root/.nvm'...
=> Compressing and cleaning up git repository
=> Appending nvm source string to /root/.bashrc
=> Appending bash_completion source string to /root/.bashrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
mesg: ttyname failed: Inappropriate ioctl for device
/bin/sh: 1: nvm: not found
ERROR: Service 'nomp' failed to build: The command '/bin/sh -c curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash && . ~/.profile && nvm install 0.12.5 && nvm use 0.12.5' returned a non-zero code: 127
I created following Dockerfile
But I got following error