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
/
Copy pathDockerfile.snapshot
64 lines (53 loc) · 1.52 KB
/
Dockerfile.snapshot
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
ARG VERSION=latest
FROM ubuntu:$VERSION
MAINTAINER JAremko <w3techplaygound@gmail.com>
# 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 ^^^^^^^
# Emacs
RUN apt-get update && apt-get install software-properties-common \
&& apt-add-repository ppa:ubuntu-elisp/ppa \
&& apt-get update && apt-get install emacs-snapshot \
# Cleanup
&& apt-get purge software-properties-common \
&& rm -rf /tmp/* /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"]