FROM ubuntu:xenial # Install tools RUN apt-get update RUN apt-get install -y emacs-nox openssh-server RUN apt-get install -y ruby ruby-dev build-essential libsqlite3-dev sqlite3 RUN gem install bundler RUN mkdir /var/run/sshd # SSH login fix. Otherwise user is kicked off after login RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd # Copy Emacs Shell COPY tmp/eshell /usr/bin/ # Install Ruby gems COPY tmp/Gemfile* /tmp/ WORKDIR /tmp RUN bundle install #ENV BUNDLE_PATH /box #ADD ../. $app # TeX Live ENV TEX /tex RUN mkdir $TEX COPY tmp/texlive $TEX RUN echo 'export PATH=$PATH:/tex/bin/x86_64-linux' > /etc/profile.d/texlive.sh # Copy run_server ENV app /app RUN mkdir $app COPY tmp/run_server.sh $app WORKDIR $app VOLUME /home EXPOSE 22 ENTRYPOINT ["/app/run_server.sh"]