forked from JAremko/docker-emacs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.alpine
55 lines (48 loc) · 1.32 KB
/
Dockerfile.alpine
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
ARG VERSION=edge
FROM alpine:$VERSION
MAINTAINER JAremko <[email protected]>
# Fix "Couldn't register with accessibility bus" error message
ENV NO_AT_BRIDGE=1
COPY asEnvUser /usr/local/sbin/
RUN echo "http://nl.alpinelinux.org/alpine/edge/main" \
>> /etc/apk/repositories \
&& echo "http://nl.alpinelinux.org/alpine/edge/testing" \
>> /etc/apk/repositories \
&& echo "http://nl.alpinelinux.org/alpine/edge/community" \
>> /etc/apk/repositories \
# basic stuff
&& apk --update add bash \
build-base \
dbus-x11 \
fontconfig \
git \
gzip \
mesa-gl \
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/ \
# Only for sudoers
&& chown root /usr/local/sbin/asEnvUser \
&& chmod 700 /usr/local/sbin/asEnvUser \
# Emacs
&& apk --update add emacs-x11 \
# Cleanup
&& apk del build-base \
&& rm -rf /var/cache/* /tmp/* /var/log/* ~/.cache \
&& mkdir -p /var/cache/apk
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"]