Skip to content

Commit

Permalink
Merge branch 'master' into add_ffmpeg
Browse files Browse the repository at this point in the history
  • Loading branch information
loics2 committed May 9, 2020
2 parents 3e10e48 + 3fdcdca commit 905108c
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 27 deletions.
30 changes: 16 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
#
# Base image
#
FROM ubuntu:bionic AS base
FROM ubuntu:focal AS base

# Set time zone
ENV TZ="UTC"

# Add source for libopus from Ubuntu 19.04
#COPY ./disco.list /etc/apt/sources.list.d/disco.list
#COPY ./disco /etc/apt/preferences.d/disco

# Run base build process
COPY ./build/ /bd_build

Expand All @@ -23,7 +19,7 @@ RUN chmod a+x /bd_build/*.sh \
#
# Icecast build stage (for later copy)
#
FROM azuracast/icecast-kh-ac:2.4.0-kh10-ac4 AS icecast
FROM azuracast/icecast-kh-ac:2.4.0-kh14-ac1 AS icecast

#
# Liquidsoap build stage
Expand All @@ -34,18 +30,24 @@ FROM base AS liquidsoap
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends \
build-essential libssl-dev libcurl4-openssl-dev bubblewrap unzip m4 software-properties-common \
&& add-apt-repository -y ppa:avsm/ppa \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends ocaml opam
ocaml opam \
autoconf automake

USER azuracast

RUN opam init --disable-sandboxing -a --bare && opam switch create 4.08.0

ARG opam_packages="ffmpeg.0.4.1 samplerate.0.1.4 taglib.0.3.3 mad.0.4.5 faad.0.4.0 fdkaac.0.3.1 lame.0.3.3 vorbis.0.7.1 cry.0.6.1 flac.0.1.5 opus.0.1.3 duppy.0.8.0 ssl liquidsoap.1.4.2"

ARG opam_packages="ffmpeg.0.4.1 samplerate.0.1.4 taglib.0.3.3 mad.0.4.5 faad.0.4.0 fdkaac.0.3.1 lame.0.3.3 vorbis.0.7.1 cry.0.6.1 flac.0.1.5 opus.0.1.3 duppy.0.8.0 ssl liquidsoap.1.4.1"
RUN opam init --disable-sandboxing -a --bare && opam switch create ocaml-system.4.08.1
RUN opam install -y ${opam_packages}

# Keep in case it's needed later:
# Pin specific commit of Liquidsoap
# RUN cd ~/ \
# && git clone --recursive https://github.com/savonet/liquidsoap.git \
# && cd liquidsoap \
# && git checkout 1.4.2 \
# && opam install -y .

#
# Main image
#
Expand All @@ -56,9 +58,9 @@ COPY --from=icecast /usr/local/bin/icecast /usr/local/bin/icecast
COPY --from=icecast /usr/local/share/icecast /usr/local/share/icecast

# Import Liquidsoap from build container
COPY --from=liquidsoap --chown=azuracast:azuracast /var/azuracast/.opam/4.08.0 /var/azuracast/.opam/4.08.0
COPY --from=liquidsoap --chown=azuracast:azuracast /var/azuracast/.opam/ocaml-system.4.08.1 /var/azuracast/.opam/ocaml-system.4.08.1

RUN ln -s /var/azuracast/.opam/4.08.0/bin/liquidsoap /usr/local/bin/liquidsoap
RUN ln -s /var/azuracast/.opam/ocaml-system.4.08.1/bin/liquidsoap /usr/local/bin/liquidsoap

EXPOSE 9001
EXPOSE 8000-8999
Expand Down
3 changes: 3 additions & 0 deletions build/add_user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ set -x

$minimal_apt_get_install sudo

# Workaround for sudo errors in containers, see: https://github.com/sudo-project/sudo/issues/42
echo "Set disable_coredump false" >> /etc/sudo.conf

mkdir -p /var/azuracast/servers/shoutcast2 /var/azuracast/stations /var/azuracast/www_tmp

adduser --home /var/azuracast --disabled-password --gecos "" azuracast
Expand Down
4 changes: 4 additions & 0 deletions build/setup/supervisor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ set -e
source /bd_build/buildconfig
set -x

# $minimal_apt_get_install python3-minimal python3-pip
# pip3 install setuptools supervisor

$minimal_apt_get_install supervisor

# mkdir -p /etc/supervisor
cp /bd_build/supervisor/supervisord.conf /etc/supervisor/supervisord.conf
11 changes: 0 additions & 11 deletions disco

This file was deleted.

2 changes: 0 additions & 2 deletions disco.list

This file was deleted.

0 comments on commit 905108c

Please sign in to comment.