liquidsoap.dockerfile 1.08 KB
Newer Older
root's avatar
subdirs  
root committed
1
# LS build container
root's avatar
blaargd  
root committed
2
FROM alpine:3.12 as ls-build
root's avatar
subdirs  
root committed
3 4 5 6 7 8 9 10 11 12 13 14 15

RUN apk --no-cache add \
    opam \
    make \
    m4 \
    ocaml-compiler-libs \
    musl-dev \
    automake \
    autoconf \
    pkgconf \
    pcre-dev \
    libvorbis-dev \
    lame-dev \
root's avatar
blaargd  
root committed
16 17 18
    libmad-dev \
    opus-dev \
    fdk-aac-dev
root's avatar
subdirs  
root committed
19 20 21 22 23 24 25 26 27 28 29 30

RUN addgroup -S appgroup && adduser -S appuser -G appgroup
USER appuser

RUN opam init --disable-sandboxing
RUN test -r /appuser/.opam/opam-init/init.sh && . /appuser/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true

RUN opam update && \
    opam install -y \
        liquidsoap \
        vorbis \
        lame \
root's avatar
blaargd  
root committed
31
        mad \
root's avatar
subdirs  
root committed
32
        opus \
root's avatar
blaargd  
root committed
33 34
        cry \
        fdkaac
root's avatar
subdirs  
root committed
35 36 37


# LS container
root's avatar
blaargd  
root committed
38
FROM alpine:3.12 as liquidsoap
root's avatar
subdirs  
root committed
39 40 41 42

RUN apk --no-cache add \
    pcre \
    lame \
root's avatar
blaargd  
root committed
43
    libmad \
root's avatar
subdirs  
root committed
44
    opus \
root's avatar
blaargd  
root committed
45 46
    libvorbis \
    fdk-aac
root's avatar
subdirs  
root committed
47 48 49 50 51 52 53 54 55 56

RUN addgroup -S appgroup && adduser -S appuser -G appgroup
USER appuser

COPY --from=ls-build /home/appuser/.opam /home/appuser/.opam

WORKDIR /app
COPY notlive.ogg /app/notlive.ogg
COPY playlist.liq .

root's avatar
blaargd  
root committed
57
CMD ["/home/appuser/.opam/default/bin/liquidsoap", "--debug-errors", "playlist.liq"]