2

I'm experimenting with Dockerizing some GUI applications after being inspired by an excellent blog post on the topic. I'm working on getting spacemacs up and running, because spacemacs is awesome. But for some reason Docker doesn't seem to be cloning the spacemacs repo as expected.

My Dockerfile is:

# Run spacemacs in a contianer
#
# sudo docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY garry-cairns/spacemacs
#
FROM ubuntu:14.04
MAINTAINER Garry Cairns
ENV REFRESHED_AT 2015-06-29

# get base components
RUN ["apt-get", "-y", "install", "emacs", "git"]

# move into our working directory
# ADD must be after chown see http://stackoverflow.com/a/26145444/1281947
RUN ["groupadd", "spacemacs"]
RUN ["useradd", "spacemacs", "-s", "/bin/bash", "-m", "-g", "spacemacs", "-G", "spacemacs"]
ENV HOME /home/spacemacs
WORKDIR /home/spacemacs
RUN ["chown", "-R", "spacemacs:spacemacs", "/home/spacemacs"]

# install emacs and spacemacs extensions
RUN ["git", "clone", "--recursive", "https://github.com/syl20bnr/spacemacs", "~/.emacs.d"]

# add local setup
ADD ./spacemacs .spacemacs

USER spacemacs:spacemacs
ENTRYPOINT ["emacs"]

As it says in the comment at the top of the file I run that with:

sudo docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY --name spacemacs garry-cairns/spacemacs

That brings up a stock emacs on my display. If I look for files I can see a .emacs.d directory in ~/emacs but there's nothing in it hence no spacemacs extensions.

I've also tried just ADDing my own .emacs.d right where I add the .spacemacs file. Interestingly that brings up the spacemacs start screen I'd expect, with my preferred theme, but evil-mode isn't running. I expect other modes probably aren't running either but they're much harder to check than evil mode.

Can anyone suggest what more I could do to get this working?

Garry Cairns
  • 3,005
  • 1
  • 18
  • 33

0 Answers0