This repository has been archived by the owner on Apr 25, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Dockerfile.armhf
154 lines (140 loc) · 3.68 KB
/
Dockerfile.armhf
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
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal as builder
ARG GUACD_VERSION=1.1.0
COPY /buildroot /
RUN \
echo "**** install build deps ****" && \
apt-get update && \
apt-get install -qy --no-install-recommends \
autoconf \
automake \
checkinstall \
freerdp2-dev \
g++ \
gcc \
git \
libavcodec-dev \
libavutil-dev \
libcairo2-dev \
libjpeg-turbo8-dev \
libogg-dev \
libossp-uuid-dev \
libpulse-dev \
libssl-dev \
libswscale-dev \
libtool \
libvorbis-dev \
libwebsockets-dev \
libwebp-dev \
make
RUN \
echo "**** prep build ****" && \
mkdir /tmp/guacd && \
git clone https://github.com/apache/guacamole-server.git /tmp/guacd && \
echo "**** build guacd ****" && \
cd /tmp/guacd && \
git checkout ${GUACD_VERSION} && \
autoreconf -fi && \
./configure --prefix=/usr && \
make -j 2 && \
mkdir -p /tmp/out && \
/usr/bin/list-dependencies.sh \
"/tmp/guacd/src/guacd/.libs/guacd" \
$(find /tmp/guacd | grep "so$") \
> /tmp/out/DEPENDENCIES && \
PREFIX=/usr checkinstall \
-y \
-D \
--nodoc \
--pkgname guacd \
--pkgversion "${GUACD_VERSION}" \
--pakdir /tmp \
--exclude "/usr/share/man","/usr/include","/etc" && \
mkdir -p /tmp/out && \
mv \
/tmp/guacd_${GUACD_VERSION}-*.deb \
/tmp/out/guacd_${GUACD_VERSION}.deb
# nodejs builder
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal as nodebuilder
ARG GCLIENT_RELEASE
RUN \
echo "**** install build deps ****" && \
apt-get update && \
apt-get install -y \
gnupg && \
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
> /etc/apt/sources.list.d/nodesource.list && \
apt-get update && \
apt-get install -y \
g++ \
gcc \
libpam0g-dev \
make \
nodejs
RUN \
echo "**** grab source ****" && \
mkdir -p /gclient && \
curl -o \
/tmp/gclient.tar.gz -L \
"https://github.com/linuxserver/gclient/archive/1.1.2.tar.gz" && \
tar xf \
/tmp/gclient.tar.gz -C \
/gclient/ --strip-components=1
RUN \
echo "**** install node modules ****" && \
cd /gclient && \
npm install
# runtime stage
FROM ghcr.io/linuxserver/baseimage-rdesktop:focal
# set version label
ARG BUILD_DATE
ARG VERSION
ARG GUACD_VERSION=1.1.0
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"
# Copy build outputs
COPY --from=builder /tmp/out /tmp/out
COPY --from=nodebuilder /gclient /gclient
RUN \
echo "**** install guacd ****" && \
dpkg --path-include=/usr/share/doc/${PKG_NAME}/* \
-i /tmp/out/guacd_${GUACD_VERSION}.deb && \
echo "**** install packages ****" && \
apt-get update && \
apt-get install -y \
gnupg && \
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
> /etc/apt/sources.list.d/nodesource.list && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y \
ca-certificates \
libfreerdp2-2 \
libfreerdp-client2-2 \
libossp-uuid16 \
nodejs \
obconf \
openbox \
python \
xterm && \
apt-get install -qy --no-install-recommends \
$(cat /tmp/out/DEPENDENCIES) && \
echo "**** grab websocat ****" && \
WEBSOCAT_RELEASE=$(curl -sX GET "https://api.github.com/repos/vi/websocat/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
curl -o \
/usr/bin/websocat -fL \
"https://github.com/vi/websocat/releases/download/${WEBSOCAT_RELEASE}/websocat.arm-unknown-linux-musleabi" && \
chmod +x /usr/bin/websocat && \
echo "**** cleanup ****" && \
apt-get autoclean && \
rm -rf \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*
# add local files
COPY /root /
# ports and volumes
EXPOSE 3000
VOLUME /config