-
Notifications
You must be signed in to change notification settings - Fork 56
/
Dockerfile
executable file
·100 lines (75 loc) · 3.37 KB
/
Dockerfile
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
FROM alpine:3.15 AS st-builder
RUN apk add --no-cache make gcc git freetype-dev \
fontconfig-dev musl-dev xproto libx11-dev \
libxft-dev libxext-dev
RUN git clone https://github.com/DenisKramer/st.git /work
WORKDIR /work
RUN make
FROM alpine:3.15 AS xdummy-builder
RUN apk add --no-cache make gcc freetype-dev \
fontconfig-dev musl-dev xproto libx11-dev \
libxft-dev libxext-dev avahi-libs libcrypto3 libssl3 libvncserver libx11 libxdamage libxext libxfixes libxi libxinerama libxrandr libxtst musl samba-winbind
RUN apk add --no-cache linux-headers
RUN apk add x11vnc
RUN Xdummy -install
# ----------------------------------------------------------------------------
FROM ejtrader/pyzmq:dev
USER root
ENV WINEPREFIX=/root/.wine
ENV WINEARCH=win64
ENV DISPLAY :0
ENV USER=root
ENV PASSWORD=root
# Basic init and admin tools
RUN apk --no-cache add supervisor sudo wget \
&& echo "$USER:$PASSWORD" | /usr/sbin/chpasswd \
&& rm -rf /apk /tmp/* /var/cache/apk/*
# Install X11 server and dummy device
RUN apk add --no-cache xorg-server xf86-video-dummy \
&& apk add libressl3.1-libcrypto --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/main/ \
&& apk add libressl3.1-libssl --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/main/ \
&& apk add x11vnc --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/community/ \
&& rm -rf /apk /tmp/* /var/cache/apk/*
COPY --from=xdummy-builder /usr/bin/Xdummy.so /usr/bin/Xdummy.so
COPY assets/xorg.conf /etc/X11/xorg.conf
COPY assets/xorg.conf.d /etc/X11/xorg.conf.d
# Configure init
COPY assets/supervisord.conf /etc/supervisord.conf
# Openbox window manager
RUN apk --no-cache add openbox \
&& rm -rf /apk /tmp/* /var/cache/apk/*
COPY assets/openbox/mayday/mayday-arc /usr/share/themes/mayday-arc
COPY assets/openbox/mayday/mayday-arc-dark /usr/share/themes/mayday-arc-dark
COPY assets/openbox/mayday/mayday-grey /usr/share/themes/mayday-grey
COPY assets/openbox/mayday/mayday-plane /usr/share/themes/mayday-plane
COPY assets/openbox/mayday/thesis /usr/share/themes/thesis
COPY assets/openbox/rc.xml /etc/xdg/openbox/rc.xml
COPY assets/openbox/menu.xml /etc/xdg/openbox/menu.xml
COPY Metatrader /root/Metatrader
# Login Manager
RUN apk --no-cache add slim consolekit \
&& rm -rf /apk /tmp/* /var/cache/apk/*
RUN /usr/bin/dbus-uuidgen --ensure=/etc/machine-id
COPY assets/slim/slim.conf /etc/slim.conf
COPY assets/slim/alpinelinux /usr/share/slim/themes/alpinelinux
# A decent system font
RUN apk add --no-cache font-noto \
&& rm -rf /apk /tmp/* /var/cache/apk/*
COPY assets/fonts.conf /etc/fonts/fonts.conf
# st as terminal
RUN apk add --no-cache freetype fontconfig xproto libx11 libxft libxext ncurses \
&& rm -rf /apk /tmp/* /var/cache/apk/*
COPY --from=st-builder /work/st /usr/bin/st
COPY --from=st-builder /work/st.info /etc/st/st.info
RUN tic -sx /etc/st/st.info
# Some other resources
RUN apk add --no-cache xset \
&& rm -rf /apk /tmp/* /var/cache/apk/*
COPY assets/xinit/Xresources /etc/X11/Xresources
COPY assets/xinit/xinitrc.d /etc/X11/xinit/xinitrc.d
COPY assets/x11vnc-session.sh /root/x11vnc-session.sh
COPY assets/start.sh /root/start.sh
RUN apk update && apk add samba-winbind wine && ln -s /usr/bin/wine64 /usr/bin/wine
WORKDIR /$HOME/
EXPOSE 5900 15555 15556 15557 15558
CMD ["/usr/bin/supervisord","-c","/etc/supervisord.conf"]