-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.svxreflector
39 lines (30 loc) · 1.43 KB
/
Dockerfile.svxreflector
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
FROM debian:11 as builder
LABEL MAINTAINER="[email protected]"
LABEL version="1.0"
LABEL biz.wildsong.biz.name="svxreflector"
# === BUILD STAGE ===
RUN apt-get update && apt-get -y install \
g++ cmake make libsigc++-2.0-dev libgsm1-dev libpopt-dev tcl-dev libgcrypt20-dev \
libspeex-dev libasound2-dev libopus-dev librtlsdr-dev vorbis-tools curl libcurl4-openssl-dev \
git rtl-sdr libcurl4-openssl-dev cmake libjsoncpp-dev
#RUN apt-get -y install alsa-utils vorbis-tools curl
WORKDIR /home/svxlink
RUN git clone https://github.com/sm0svx/svxlink.git
WORKDIR /home/svxlink/svxlink/src/build
RUN cmake -DUSE_QT=OFF -DCMAKE_INSTALL_PREFIX=/usr -DSYSCONF_INSTALL_DIR=/etc -DLOCAL_STATE_DIR=/var -DWITH_SYSTEMD=ON ..
RUN make -j3
# The 'make install' will do a chown so we need the user before doing the installation.
# The gpio group does not exist in the generic Docker --- hmmm can't do that bit
RUN useradd -s /bin/bash svxlink
RUN make install
# == DEPLOY STAGE ==
FROM debian:11
#RUN useradd -s /bin/bash svxlink
RUN apt-get update && apt-get install -y \
libsigc++-2.0-dev libgsm1 libpopt-dev libjsoncpp-dev \
libasound2-dev libopus-dev libspeex-dev
COPY --from=builder /usr/bin/svxreflector /usr/bin/
COPY --from=builder /usr/lib/x86_64-linux-gnu/libasync* /usr/lib/x86_64-linux-gnu/
EXPOSE 5300
WORKDIR /srv
CMD ["/usr/bin/svxreflector", "--config=/srv/svxreflector.conf", "--logfile=/srv/log/svxreflector.log"]