Add the two files below to a new testing directory.
To build the image, use the following.
docker build . -t this_one
To enter the image, use the following.
docker run --rm -it this:one
FROM silex/emacs | |
ADD .emacs.d /root/.emacs.d | |
RUN emacs -batch -l ~/.emacs.d/init.el | |
WORKDIR /root/ | |
CMD "bash" |
;; .emacs.d/init.el | |
(setq package-archives | |
'(("gnu" . "https://elpa.gnu.org/packages/") | |
("melpa" . "https://melpa.org/packages/"))) | |
(package-initialize) | |
(unless package-archive-contents | |
(package-refresh-contents)) | |
(mapc 'package-install | |
(seq-remove 'package-installed-p '(magit auctex))) |