I'm trying to setup emacs in a docker image that I am creating. I would like to create the image with a particular melpa package installed.
This is my Dockerfile:
FROM ubuntu
RUN apt-get update
RUN apt-get install -y emacs
COPY setup.el /root/.emacs.d/
WORKDIR /root/.emacs.d/
RUN emacs --script setup.el
This is my setup.el file:
(require 'package)
(package-initialize)
(setq package-archives '(("melpa" . "http://melpa.org/packages/")))
(package-refresh-contents)
(package-install 'racket-mode))
When I go to build the docker image, I get the following error:
Loading /etc/emacs/site-start.d/00debian.el (source)...
Contacting host: melpa.org:80
error in process filter: Could not create connection to melpa.org:443
I looked at the 00debian.el file to see if it had any effect on the docker build.
$ cat /etc/emacs/site-start.d/00debian.el
;; Set the default mail server and news server as specified by Debian
;; policy.
(setq gnus-nntpserver-file "/etc/news/server")
(setq mail-host-address (let ((name (expand-file-name "/etc/mailname")))
(if (not (file-readable-p name))
nil
(with-temp-buffer
(insert-file-contents-literally name)
(while (search-forward "\n" nil t)
(replace-match "" nil t))
(buffer-string)))))
It doesn't seem to have any effect on the package system nor does it seem to be reaching out to Melpa or Elpa.
I made the package-archives point to http Melpa as opposed to https Melpa so that I wouldn't connect on port 443. However, my system still seems to be connecting to Melpa on port 443. I did this because when emacs tries to connect over port 443 it throws an unknown certificate authority error (the certificate authority is R3).
Does anyone have an idea how I might be able to fix the certificate authority error in my docker image or otherwise get Melpa to connect over port 80?