Created
September 24, 2019 02:06
-
-
Save 140am/01b4c39b11c6c1ea3e37efb431479a4f to your computer and use it in GitHub Desktop.
emacs in docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
MAINTAINER Manuel Kreutz <manuel@140.am> | |
RUN apt-get update && \ | |
apt-get install -y curl git software-properties-common build-essential && \ | |
apt-get clean | |
# install emacs 26 from ppa | |
RUN add-apt-repository ppa:kelleyk/emacs && \ | |
apt-get update && \ | |
apt-get install -y emacs26-nox && \ | |
apt-get clean | |
RUN curl -OL http://golang.org/dl/go1.12.7.linux-amd64.tar.gz && \ | |
tar -C /usr/local -xzf go1.12.7.linux-amd64.tar.gz && \ | |
rm go1.12.7.linux-amd64.tar.gz | |
ENV PATH $PATH:/usr/local/go/bin:/workspace/bin | |
RUN mkdir -p /workspace/bin /workspace/pkg /workspace/src | |
ENV GOPATH /workspace | |
ENV GOROOT /usr/local/go | |
# install go packages | |
RUN go get -u golang.org/x/tools/cmd/goimports && \ | |
go get -u golang.org/x/lint/golint && \ | |
go get -u github.com/nsf/gocode && \ | |
go get -u github.com/rogpeppe/godef && \ | |
go get -u github.com/smartystreets/goconvey | |
# container user | |
RUN groupadd -f -g 100 dummy && \ | |
useradd -s /bin/bash -u 1000 -g users dummy && \ | |
mkdir -p /home/dummy && \ | |
chown -R dummy:dummy /home/dummy /workspace | |
# clone emacs configuration | |
RUN git clone --recursive https://github.com/140am/.emacs.d /home/dummy/.emacs.d && \ | |
cd /home/dummy/.emacs.d && \ | |
chown -R dummy:dummy /home/dummy | |
RUN sed -i 's/(concat (getenv "GOPATH") "\/src\/github.com\/golang\/lint\/misc\/emacs")/"\/workspace\/src\/golang.org\/x\/lint\/misc\/emacs"/g' /home/dummy/.emacs.d/settings/editing-go.el | |
USER dummy | |
ENV TERM=xterm-256color |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment