-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
49 lines (40 loc) · 1.25 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
FROM ubuntu:focal
LABEL maintainer="Kirill Plotnikov <[email protected]>" \
github="https://github.com/pltnk/docker-liquidsoap"
ENV DEBIAN_FRONTEND=noninteractive
# install liquidsoap dependencies
RUN apt update && apt upgrade -y && \
apt install -y \
opam \
gcc \
libmad0-dev \
libmp3lame-dev \
libogg-dev \
libpcre3-dev \
libsamplerate0-dev \
libtag1-dev \
libvorbis-dev \
m4 \
make \
pkg-config \
zlib1g-dev && \
apt autoremove && apt clean && \
rm -rf /var/lib/apt/lists/*
# add user for liquidsoap and create necessary directories
RUN groupadd -g 999 radio && \
useradd -m -r -u 999 -s /bin/bash -g radio radio && \
mkdir /etc/liquidsoap /music && \
chown -R radio /etc/liquidsoap /music
ARG LIQUIDSOAP_VERSION
ARG OPAM_PACKAGES="liquidsoap${LIQUIDSOAP_VERSION:+.$LIQUIDSOAP_VERSION} taglib mad lame vorbis cry samplerate"
USER radio
# setup opam
RUN opam init -a -y --disable-sandboxing && \
eval $(opam env) && \
opam install -y depext
# install liquidsoap
RUN opam depext -y ${OPAM_PACKAGES} && \
opam install -y ${OPAM_PACKAGES} && \
eval $(opam env) && \
opam clean -acryv --logs --unused-repositories
CMD eval $(opam env) && liquidsoap /etc/liquidsoap/script.liq