melpazoid/docker/Dockerfile

59 lines
1.5 KiB
Text
Raw Normal View History

# 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 \
&& 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
COPY docker/requirements.el $WORKSPACE
RUN emacs --script $WORKSPACE/requirements.el
2020-02-22 11:06:20 -08:00
COPY _requirements.el $WORKSPACE
RUN emacs --script $WORKSPACE/_requirements.el
2020-02-22 11:06:20 -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
CMD ["/usr/bin/emacs", "--script", "melpazoid.el"]