2020-02-23 09:43:56 -08:00
|
|
|
# Based on https://github.com/JAremko/docker-emacs
|
|
|
|
|
2020-02-22 11:06:20 -08:00
|
|
|
ARG VERSION=latest
|
|
|
|
FROM ubuntu:$VERSION
|
|
|
|
|
|
|
|
# Fix "Couldn't register with accessibility bus" error message
|
|
|
|
ENV NO_AT_BRIDGE=1
|
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
|
|
|
|
# basic stuff
|
|
|
|
RUN echo 'APT::Get::Assume-Yes "true";' >> /etc/apt/apt.conf \
|
|
|
|
&& apt-get update && apt-get install \
|
|
|
|
bash \
|
|
|
|
build-essential \
|
|
|
|
git \
|
|
|
|
gzip \
|
|
|
|
language-pack-en-base \
|
|
|
|
libgl1-mesa-glx \
|
|
|
|
make \
|
|
|
|
sudo \
|
|
|
|
tar \
|
|
|
|
unzip \
|
|
|
|
# Cleanup
|
|
|
|
&& apt-get purge build-essential \
|
|
|
|
&& apt-get autoremove \
|
|
|
|
&& rm -rf /tmp/* /var/lib/apt/lists/* /root/.cache/*
|
|
|
|
|
|
|
|
# Emacs
|
|
|
|
RUN apt-get update && apt-get install software-properties-common \
|
|
|
|
&& apt-add-repository ppa:kelleyk/emacs \
|
2020-03-07 23:12:00 -08:00
|
|
|
&& apt-get update && apt-get install emacs26 \
|
2020-02-22 11:06:20 -08:00
|
|
|
# Cleanup
|
|
|
|
&& apt-get purge software-properties-common \
|
|
|
|
&& rm -rf /tmp/* /var/lib/apt/lists/* /root/.cache/*
|
|
|
|
|
|
|
|
ENV WORKSPACE "/workspace"
|
|
|
|
ENV ELISP_PATH "${WORKSPACE}/_elisp"
|
|
|
|
|
|
|
|
RUN useradd emacser -d $WORKSPACE
|
|
|
|
RUN mkdir -p $ELISP_PATH && chown -R emacser $WORKSPACE
|
|
|
|
USER emacser:emacser
|
|
|
|
|
2020-02-23 09:43:56 -08:00
|
|
|
COPY docker/requirements.el $WORKSPACE
|
|
|
|
RUN emacs --script $WORKSPACE/requirements.el
|
2020-02-22 11:06:20 -08:00
|
|
|
|
|
|
|
COPY _requirements.el $WORKSPACE
|
2020-03-07 23:12:00 -08:00
|
|
|
RUN emacs --script $WORKSPACE/_requirements.el
|
2020-02-22 11:06:20 -08:00
|
|
|
|
2020-02-23 09:43:56 -08:00
|
|
|
COPY --chown=emacser:emacser docker/.emacs $WORKSPACE
|
2020-02-22 11:06:20 -08:00
|
|
|
COPY --chown=emacser:emacser _elisp $ELISP_PATH
|
2020-03-01 16:59:01 -08:00
|
|
|
COPY --chown=emacser:emacser melpazoid/melpazoid.el $ELISP_PATH
|
2020-02-22 11:06:20 -08:00
|
|
|
|
|
|
|
ARG PACKAGE_NAME
|
|
|
|
ENV PACKAGE_NAME "${PACKAGE_NAME}"
|
|
|
|
|
|
|
|
WORKDIR $ELISP_PATH
|
2020-02-25 21:16:18 -08:00
|
|
|
CMD ["/usr/bin/emacs", "--script", "melpazoid.el"]
|