This repository has been archived by the owner on Sep 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
/
Dockerfile.remacs
103 lines (92 loc) · 2.27 KB
/
Dockerfile.remacs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
FROM ubuntu:latest
MAINTAINER JAremko <[email protected]>
# Fix "Couldn't register with accessibility bus" error message
ENV NO_AT_BRIDGE=1
ENV DEBIAN_FRONTEND noninteractive
# basic stuff
RUN echo 'APT::Get::Assume-Yes "true";' >> /etc/apt/apt.conf \
&& apt-get update && apt-get install \
bash \
build-essential \
dbus-x11 \
fontconfig \
git \
gzip \
language-pack-en-base \
libgl1-mesa-glx \
make \
sudo \
tar \
unzip \
# su-exec
&& git clone https://github.com/ncopa/su-exec.git /tmp/su-exec \
&& cd /tmp/su-exec \
&& make \
&& chmod 770 su-exec \
&& mv ./su-exec /usr/local/sbin/ \
# Cleanup
&& apt-get purge build-essential \
&& apt-get autoremove \
&& rm -rf /tmp/* /var/lib/apt/lists/* /root/.cache/*
COPY asEnvUser /usr/local/sbin/
# Only for sudoers
RUN chown root /usr/local/sbin/asEnvUser \
&& chmod 700 /usr/local/sbin/asEnvUser
# ^^^^^^^ Those layers are shared ^^^^^^^
# Build Remacs
RUN apt-get update && apt-get install \
build-essential \
curl \
&& curl https://sh.rustup.rs -sSf | sh -s -- -y \
&& /root/.cargo/bin/rustup install nightly \
&& git clone https://github.com/remacs/remacs.git /tmp/remacs-bd \
&& cd /tmp/remacs-bd \
&& export PATH=$PATH:/root/.cargo/bin \
&& rustup override set nightly \
&& apt-get install \
autoconf \
libgif7 \
gnutls-bin \
libgtk-3-0 \
libjpeg8 \
libncurses5 \
libtiff5 \
libxml2 \
libxpm4 \
libgif-dev \
libgnutls-dev \
libgtk-3-dev \
libjpeg-dev \
libncurses5-dev \
libtiff5-dev \
libxml2-dev \
libxpm-dev \
texinfo \
&& ./autogen.sh \
&& ./configure \
&& make \
# Cleanup
&& rustup self uninstall \
&& apt-get purge \
autoconf \
build-essential \
curl \
libgif-dev \
libgnutls-dev \
libgtk-3-dev \
libjpeg-dev \
libncurses5-dev \
libtiff-dev \
libxml2-dev \
libxpm-dev \
&& rm -rf /tmp/* /root/.cargo /var/lib/apt/lists/* /root/.cache/*
ENV UNAME="emacser" \
GNAME="emacs" \
UHOME="/home/emacs" \
UID="1000" \
GID="1000" \
WORKSPACE="/mnt/workspace" \
SHELL="/bin/bash"
WORKDIR "${WORKSPACE}"
ENTRYPOINT ["asEnvUser"]
CMD ["bash", "-c", "emacs; /bin/bash"]