-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile.aarch64
163 lines (150 loc) · 4.99 KB
/
Dockerfile.aarch64
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-noble as buildstage
ARG XRDP_PULSE_VERSION=v0.7
ARG DEBIAN_FRONTEND="noninteractive"
RUN \
echo "**** install build deps ****" && \
sed -i 's/# deb-src/deb-src/g' /etc/apt/sources.list && \
apt-get update && \
apt-get install -y \
build-essential \
devscripts \
dpkg-dev \
git \
libpulse-dev \
meson \
pulseaudio && \
apt build-dep -y \
pulseaudio \
xrdp
RUN \
echo "**** build pulseaudio modules ****" && \
mkdir -p /buildout/var/lib/xrdp-pulseaudio-installer && \
tmp=$(mktemp -d); cd "$tmp" && \
pulseaudio_upstream_version=$(dpkg-query -W -f='${source:Upstream-Version}' pulseaudio) && \
apt-get source pulseaudio && \
cd "pulseaudio-$pulseaudio_upstream_version" && \
meson build && \
cd - && \
git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git && \
cd pulseaudio-module-xrdp && \
git checkout ${XRDP_PULSE_VERSION} && \
./bootstrap && \
./configure PULSE_DIR="$tmp/pulseaudio-$pulseaudio_upstream_version" && \
make && \
install -t "/buildout/var/lib/xrdp-pulseaudio-installer" -D -m 644 src/.libs/*.so
RUN \
echo "**** build xrdp with fuse disabled ****" && \
cd /tmp && \
apt-get source xrdp && \
cd xrdp-* && \
sed -i 's/--enable-fuse/--disable-fuse/g' debian/rules && \
debuild -b -uc -us && \
cp -ax ../xrdp_*.deb /buildout/xrdp.deb
# docker compose
FROM ghcr.io/linuxserver/docker-compose:arm64v8-latest as compose
# runtime stage
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-noble
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"
# copy over libs and installers from build stage
COPY --from=buildstage /buildout/ /
COPY --from=compose /usr/local/bin/docker-compose /usr/local/bin/docker-compose
#Add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker
ENV NVIDIA_DRIVER_CAPABILITIES=all \
HOME=/config
RUN \
echo "**** enable locales ****" && \
sed -i \
'/locale/d' \
/etc/dpkg/dpkg.cfg.d/excludes && \
echo "**** install deps ****" && \
ldconfig && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
dbus-x11 \
fonts-noto-color-emoji \
fonts-noto-core \
gawk \
gnupg2 \
libfuse2 \
libx11-dev \
libxfixes3 \
libxml2 \
libxrandr2 \
locales-all \
mesa-va-drivers \
mesa-vulkan-drivers \
netcat-openbsd \
openbox \
openssh-client \
pulseaudio \
software-properties-common \
sudo \
x11-apps \
x11-xserver-utils \
xfonts-base \
xorgxrdp \
xrdp \
xserver-common \
xserver-xorg-core \
xserver-xorg-video-amdgpu \
xserver-xorg-video-armsoc-endlessm \
xserver-xorg-video-ati \
xserver-xorg-video-nouveau \
xserver-xorg-video-qxl \
xterm \
xutils \
zlib1g && \
dpkg -i /xrdp.deb && \
rm /xrdp.deb && \
echo "**** install docker ****" && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | tee /usr/share/keyrings/docker.asc >/dev/null && \
echo "deb [arch=arm64 signed-by=/usr/share/keyrings/docker.asc] https://download.docker.com/linux/ubuntu noble stable" > /etc/apt/sources.list.d/docker.list && \
apt-get update && \
apt-get install -y --no-install-recommends \
docker-ce-cli && \
echo "**** openbox tweaks ****" && \
sed -i \
-e 's/NLIMC/NLMC/g' \
-e '/debian-menu/d' \
-e 's|</applications>| <application class="*"><maximized>yes</maximized></application>\n</applications>|' \
-e 's|</keyboard>| <keybind key="C-S-d"><action name="ToggleDecorations"/></keybind>\n</keyboard>|' \
/etc/xdg/openbox/rc.xml && \
echo "**** user perms ****" && \
sed -e 's/%sudo ALL=(ALL:ALL) ALL/%sudo ALL=(ALL:ALL) NOPASSWD: ALL/g' \
-i /etc/sudoers && \
echo "abc:abc" | chpasswd && \
usermod -s /bin/bash abc && \
usermod -aG sudo abc && \
echo "**** proot-apps ****" && \
mkdir /proot-apps/ && \
PAPPS_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/proot-apps/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
curl -L https://github.com/linuxserver/proot-apps/releases/download/${PAPPS_RELEASE}/proot-apps-aarch64.tar.gz \
| tar -xzf - -C /proot-apps/ && \
echo "${PAPPS_RELEASE}" > /proot-apps/pversion && \
echo "**** locales ****" && \
for LOCALE in $(curl -sL https://raw.githubusercontent.com/thelamer/lang-stash/master/langs); do \
localedef -i $LOCALE -f UTF-8 $LOCALE.UTF-8; \
done && \
echo "**** theme ****" && \
curl -s https://raw.githubusercontent.com/thelamer/lang-stash/master/theme.tar.gz \
| tar xzvf - -C /usr/share/themes/Clearlooks/openbox-3/ && \
echo "**** cleanup ****" && \
apt-get autoclean && \
rm -rf \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*
# add local files
COPY /root /
# ports and volumes
EXPOSE 3389
VOLUME /config