-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Dockerfile.aarch64
114 lines (101 loc) · 2.96 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
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.20 AS buildstage
############## build stage ##############
# package version
ARG ZNC_RELEASE
ENV MAKEFLAGS="-j4"
RUN \
apk add -U --update --no-cache \
argon2-dev \
autoconf \
automake \
boost-dev\
build-base \
c-ares-dev \
cyrus-sasl-dev \
gettext-dev \
git \
icu-dev \
openssl-dev \
perl-dev \
python3-dev \
swig \
tar \
tcl-dev && \
python3 -m venv /lsiopy && \
pip install -U --no-cache-dir pip setuptools && \
pip install -U --no-cache-dir cmake
RUN \
echo "**** compile znc ****" && \
if [ -z ${ZNC_RELEASE+x} ]; then \
ZNC_RELEASE=$(curl -s https://api.github.com/repos/znc/znc/tags \
| jq -r 'first(.[] | select(.name | test("-rc|-beta|-alpha") | not)) | .name'); \
fi && \
mkdir -p \
/tmp/znc && \
git clone --branch "${ZNC_RELEASE}" --depth 1 \
--recurse-submodules \
https://github.com/znc/znc.git \
/tmp/znc && \
curl -o \
/tmp/playback.tar.gz -L \
https://github.com/jpnurmi/znc-playback/archive/master.tar.gz && \
tar xf \
/tmp/playback.tar.gz -C \
/tmp/znc/modules --strip-components=1 && \
curl -o \
/tmp/znc-push.tar.gz -L \
https://github.com/jreese/znc-push/archive/master.tar.gz && \
tar xf \
/tmp/znc-push.tar.gz -C \
/tmp/znc/modules --strip-components=1 && \
curl -o \
/tmp/znc-clientbuffer.tar.gz -L \
https://github.com/CyberShadow/znc-clientbuffer/archive/master.tar.gz && \
tar xf \
/tmp/znc-clientbuffer.tar.gz -C \
/tmp/znc/modules --strip-components=1 && \
curl -o \
/tmp/znc-palaver.tar.gz -L \
https://github.com/cocodelabs/znc-palaver/archive/master.tar.gz && \
tar xf \
/tmp/znc-palaver.tar.gz -C \
/tmp/znc/modules --strip-components=1 && \
cd /tmp/znc && \
mkdir -p build && \
cd build && \
cmake .. \
-DWANT_PYTHON=yes \
-DWANT_PERL=yes \
-DWANT_TCL=yes && \
make && \
make DESTDIR=/tmp/znc install
RUN \
echo "**** determine runtime packages ****" && \
scanelf --needed --nobanner /tmp/znc/usr/local/bin/znc \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| sort -u \
| xargs -r apk info --installed \
| sort -u \
>> /tmp/znc/packages
############## runtime stage ##############
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.20
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="notaptalca"
# copy files from build stage
COPY --from=buildstage /tmp/znc/usr/ /usr/
COPY --from=buildstage /tmp/znc/packages /packages
RUN \
echo "**** install runtime packages ****" && \
RUNTIME_PACKAGES=$(echo $(cat /packages)) && \
apk add -U --update --no-cache \
${RUNTIME_PACKAGES} && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 6501
VOLUME /config