This commit is contained in:
Christoffer Müller Madsen 2017-06-16 00:02:23 +02:00
parent 8d5e703059
commit c904134098
4 changed files with 27 additions and 8 deletions

View File

@ -2,18 +2,31 @@ FROM ubuntu:xenial
# Install tools # Install tools
RUN apt-get update RUN apt-get update
RUN apt-get install -y emacs-nox openssh-server 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 RUN apt-get install -y ruby ruby-dev build-essential libsqlite3-dev sqlite3
RUN gem install bundler
RUN mkdir /var/run/sshd # 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 # 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 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 Emacs related files
COPY tmp/eshell /usr/bin/ COPY tmp/eshell /usr/bin/
COPY tmp/site-start.el /usr/local/share/emacs/site-lisp/site-start.el
# Install Ruby gems # Install Ruby gems
RUN gem install bundler
COPY tmp/Gemfile* /tmp/ COPY tmp/Gemfile* /tmp/
WORKDIR /tmp WORKDIR /tmp
RUN bundle install RUN bundle install
@ -24,7 +37,7 @@ RUN bundle install
# TeX Live # TeX Live
ENV TEX /tex ENV TEX /tex
RUN mkdir $TEX RUN mkdir $TEX
COPY tmp/texlive $TEX #COPY tmp/texlive $TEX
RUN echo 'export PATH=$PATH:/tex/bin/x86_64-linux' > /etc/profile.d/texlive.sh RUN echo 'export PATH=$PATH:/tex/bin/x86_64-linux' > /etc/profile.d/texlive.sh
# Copy run_server # Copy run_server

View File

@ -6,6 +6,7 @@ cp ../init_passwd.rb ./tmp/
cp ../run_server.sh ./tmp/ cp ../run_server.sh ./tmp/
cp ../eshell ./tmp/ cp ../eshell ./tmp/
cp ../Gemfile* ./tmp/ cp ../Gemfile* ./tmp/
cp ../site-start.el ./tmp/
# TeX Live # TeX Live
#if [ "$(uname)" == "Darwin" ]; then #if [ "$(uname)" == "Darwin" ]; then
@ -14,9 +15,9 @@ cp ../Gemfile* ./tmp/
# cd texlive/bin/x86_64-linux # cd texlive/bin/x86_64-linux
#fi #fi
#./tlmgr update --all #./tlmgr update --all
cd $ORIG_DIR #cd $ORIG_DIR
cp -r texlive ./tmp/ #cp -r texlive ./tmp/
rm -r tmp/texlive/bin/x86_64-darwin #rm -r tmp/texlive/bin/x86_64-darwin
docker build -t emacs-collab:latest . docker build -t emacs-collab:latest .
rm -R tmp rm -R tmp

1
eshell
View File

@ -1,6 +1,7 @@
#!/bin/sh #!/bin/sh
. /etc/profile . /etc/profile
if [ -z $EMACS ]; then if [ -z $EMACS ]; then
export EMACS=25
emacs --daemon emacs --daemon
/usr/bin/emacsclient -t /usr/bin/emacsclient -t
else else

4
site-start.el Normal file
View File

@ -0,0 +1,4 @@
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)