melpazoid/docker/Dockerfile

34 lines
1,019 B
Text
Raw Normal View History

2020-08-23 15:11:48 -07:00
FROM ubuntu:20.04
# required to silently install libxml2-dev
ENV DEBIAN_FRONTEND=noninteractive
2020-08-23 15:11:48 -07:00
RUN apt-get update \
&& apt-get -y --no-install-recommends install software-properties-common \
&& apt-add-repository -y ppa:kelleyk/emacs \
&& apt-get -y --no-install-recommends install emacs27 \
&& apt-get -y purge software-properties-common \
&& apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/* /root/.cache/*
2020-02-22 11:06:20 -08:00
ENV WORKSPACE "/workspace"
ENV ELISP_PATH "${WORKSPACE}/pkg"
2020-02-22 11:06:20 -08:00
2020-08-23 15:11:48 -07:00
RUN useradd emacser -d $WORKSPACE \
&& mkdir -p $ELISP_PATH \
&& chown -R emacser $WORKSPACE
2020-02-22 11:06:20 -08:00
USER emacser:emacser
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
COPY --chown=emacser:emacser pkg $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_MAIN
ENV PACKAGE_MAIN "${PACKAGE_MAIN}"
2020-02-22 11:06:20 -08:00
WORKDIR $ELISP_PATH
2020-08-23 15:11:48 -07:00
CMD ["emacs", "--script", "melpazoid.el"]