This is the script in Dockerfile. When I directly get into the docker and run the commands manually it is working fine but why not from the Dockerfile.
Dockerfile:
FROM ubuntu:16.04
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN apt-get update
RUN apt-get install -y build-essential libssl-dev
RUN apt-get install -y curl git sudo
RUN curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh -o install_nvm.sh
RUN /bin/sh install_nvm.sh
RUN source ~/.profile
Error:
mesg: ttyname failed: Inappropriate ioctl for device
I have tried few of the solutions found like running it as
RUN /bin/sh -c "source ~/.profile"
and few more but not solving the issue.