How can I link files in Dockerfile?
docker, ruby-on-rails
Solution
I have tried to use the command you run and it tries to make `/dev/fs/fs`
Try the following to create the symlink in `/dev/`
RUN ln -sf /proc/self/fd /dev/
Problem
I'm trying to create a Dockerfile that will deploy rails app but my problem is ruby wont install if I use a docker file. it says /dev/fd is missing. On a normal machine all I have to do is type in the command `ln -sf /proc/self/fd /dev/fd` and all is fixed. However when I put that command in my Dockerfile it doesn't link to /dev/fd. Here is my Dockerfile: ``` # Select ubuntu as the base image FROM ubuntu # Install nginx, nodejs and curl RUN apt-get update -q RUN apt-get install -qy nginx RUN apt-get install -qy curl RUN apt-get install -qy nodejs RUN echo "daemon off;" >> /etc/nginx/nginx.conf # Install rvm, ruby, bundler RUN curl -sSL https://get.rvm.io | bash -s stable RUN ln -sf /proc/self/fd /dev/fd RUN echo "source /usr/local/rvm/scripts/rvm" >> /etc/bash.bashrc RUN /bin/bash -l -c "rvm requirements" RUN /bin/bash -l -c "rvm install 2.1.2" ``` I would get an error something like /dev/fd: missing file or folder or something like that. If I omit the last line, everything successfully builds but when I log in to the image I just built and cd into /dev/fd it says no such file or directory. How come it successfully builds but does not link the files I tell it to?