2017-06-14 22:45:15 +00:00
|
|
|
FROM ubuntu:xenial
|
|
|
|
|
2017-06-15 11:31:29 +00:00
|
|
|
# Install tools
|
2017-06-14 22:45:15 +00:00
|
|
|
RUN apt-get update
|
2017-06-15 22:02:23 +00:00
|
|
|
RUN apt-get install -y locales software-properties-common
|
|
|
|
RUN apt-get install -y openssh-server
|
2017-06-15 00:20:13 +00:00
|
|
|
RUN apt-get install -y ruby ruby-dev build-essential libsqlite3-dev sqlite3
|
2017-06-15 22:02:23 +00:00
|
|
|
|
|
|
|
# Set the locale
|
|
|
|
RUN locale-gen en_US.UTF-8
|
|
|
|
ENV LANG en_US.UTF-8
|
|
|
|
ENV LANGUAGE en_US:en
|
|
|
|
ENV LC_ALL en_US.UTF-8
|
|
|
|
RUN sh -c "echo -e 'LANG=en_US.UTF-8\nLC_ALL=en_US.UTF-8' > /etc/default/locale"
|
|
|
|
|
|
|
|
# Install Emacs
|
|
|
|
RUN add-apt-repository -y ppa:kelleyk/emacs
|
|
|
|
RUN apt-get update; apt-get install -y emacs25-nox
|
2017-06-14 22:45:15 +00:00
|
|
|
|
|
|
|
# SSH login fix. Otherwise user is kicked off after login
|
2017-06-15 22:02:23 +00:00
|
|
|
RUN mkdir /var/run/sshd
|
2017-06-14 22:45:15 +00:00
|
|
|
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
|
|
|
|
|
2017-06-15 22:02:23 +00:00
|
|
|
# Copy Emacs related files
|
2017-06-15 09:26:01 +00:00
|
|
|
COPY tmp/eshell /usr/bin/
|
2017-06-15 22:02:23 +00:00
|
|
|
COPY tmp/site-start.el /usr/local/share/emacs/site-lisp/site-start.el
|
2017-06-14 22:45:15 +00:00
|
|
|
|
2017-06-15 11:31:29 +00:00
|
|
|
# Install Ruby gems
|
2017-06-15 22:02:23 +00:00
|
|
|
RUN gem install bundler
|
2017-06-15 09:26:01 +00:00
|
|
|
COPY tmp/Gemfile* /tmp/
|
2017-06-14 22:45:15 +00:00
|
|
|
WORKDIR /tmp
|
|
|
|
RUN bundle install
|
|
|
|
|
2017-06-15 11:31:29 +00:00
|
|
|
#ENV BUNDLE_PATH /box
|
|
|
|
#ADD ../. $app
|
|
|
|
|
|
|
|
# TeX Live
|
|
|
|
ENV TEX /tex
|
|
|
|
RUN mkdir $TEX
|
2017-06-15 22:02:23 +00:00
|
|
|
#COPY tmp/texlive $TEX
|
2017-06-15 11:31:29 +00:00
|
|
|
RUN echo 'export PATH=$PATH:/tex/bin/x86_64-linux' > /etc/profile.d/texlive.sh
|
|
|
|
|
|
|
|
# Copy run_server
|
2017-06-14 22:45:15 +00:00
|
|
|
ENV app /app
|
|
|
|
RUN mkdir $app
|
2017-06-15 11:31:29 +00:00
|
|
|
COPY tmp/run_server.sh $app
|
2017-06-14 22:45:15 +00:00
|
|
|
WORKDIR $app
|
|
|
|
|
|
|
|
VOLUME /home
|
|
|
|
|
|
|
|
EXPOSE 22
|
2017-06-15 09:26:01 +00:00
|
|
|
ENTRYPOINT ["/app/run_server.sh"]
|