53 lines
1.2 KiB
Docker
53 lines
1.2 KiB
Docker
FROM ubuntu:xenial
|
|
|
|
# Install tools
|
|
RUN apt-get update
|
|
RUN apt-get install -y locales software-properties-common
|
|
RUN apt-get install -y openssh-server
|
|
RUN apt-get install -y ruby ruby-dev build-essential libsqlite3-dev sqlite3
|
|
|
|
# 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
|
|
|
|
# SSH login fix. Otherwise user is kicked off after login
|
|
RUN mkdir /var/run/sshd
|
|
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
|
|
|
|
# Copy Emacs related files
|
|
COPY tmp/eshell /usr/bin/
|
|
COPY tmp/site-start.el /usr/local/share/emacs/site-lisp/site-start.el
|
|
|
|
# Install Ruby gems
|
|
RUN gem install bundler
|
|
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"]
|