melpazoid/docker/Dockerfile

41 lines
1.5 KiB
Text
Raw Normal View History

2020-08-23 15:11:48 -07:00
FROM ubuntu:20.04
RUN apt-get update \
&& apt-get install -y --no-install-recommends make tar gzip git curl ca-certificates gcc libgnutls28-dev libjansson-dev libncurses-dev \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libxml2-dev \
2020-08-23 15:11:48 -07:00
&& curl -O https://ftp.gnu.org/pub/gnu/emacs/emacs-27.1.tar.gz \
&& tar -xzf emacs-27.1.tar.gz \
&& cd emacs-27.1 \
&& JSON_CFLAGS='-I/usr/include' JSON_LIBS='-ljansson' \
LIBGNUTLS_CFLAGS='-I/usr/include' LIBGNUTLS_LIBS='-lgnutls' \
LIBXML2_CFLAGS='-I/usr/include/libxml2' LIBXML2_LIBS='-lxml2' \
./configure --without-makeinfo --with-modules \
2020-08-23 15:11:48 -07:00
&& make install \
&& apt-get remove -y gcc perl \
&& apt-get autoremove -y \
&& rm -rf /emacs-27.1.tar.gz /emacs-27.1 /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 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
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"]