From 68a555fe7e1177ce221250b7f099431fb4dfea75 Mon Sep 17 00:00:00 2001 From: Buster Neece Date: Wed, 13 Dec 2023 06:24:42 -0600 Subject: [PATCH] Move Icecast build to separate step. --- Dockerfile | 9 ++++++++ util/docker/common/prepare.sh | 2 +- util/docker/stations/setup/icecast.sh | 33 ++------------------------- 3 files changed, 12 insertions(+), 32 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9be587f2c..99b8f0305 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,11 @@ FROM mariadb:11.2-jammy AS mariadb # FROM ghcr.io/azuracast/azuracast.com:builtin AS docs +# +# Icecast-KH with AzuraCast customizations build step +# +FROM ghcr.io/azuracast/icecast-kh-ac:latest AS icecast + # # Final build image # @@ -37,6 +42,10 @@ COPY --from=mariadb /usr/local/bin/docker-entrypoint.sh /usr/local/bin/db_entryp COPY --from=mariadb /etc/apt/sources.list.d/mariadb.list /etc/apt/sources.list.d/mariadb.list COPY --from=mariadb /etc/apt/trusted.gpg.d/mariadb.gpg /etc/apt/trusted.gpg.d/mariadb.gpg +# Add Icecast +COPY --from=icecast /usr/local/bin/icecast /usr/local/bin/icecast +COPY --from=icecast /usr/local/share/icecast /usr/local/share/icecast + # Run base build process COPY ./util/docker/common /bd_build/ diff --git a/util/docker/common/prepare.sh b/util/docker/common/prepare.sh index ab7ea2b49..6fcfa7b71 100644 --- a/util/docker/common/prepare.sh +++ b/util/docker/common/prepare.sh @@ -58,7 +58,7 @@ mkdir -p /etc/my_init.d # Install other common scripts. apt-get install -y --no-install-recommends \ - tini gosu curl wget tar zip unzip git rsync tzdata gnupg gpg-agent openssh-client + tini gosu curl wget tar zip unzip xz-utils git rsync tzdata gnupg gpg-agent openssh-client # Add scripts cp -rT /bd_build/scripts/ /usr/local/bin diff --git a/util/docker/stations/setup/icecast.sh b/util/docker/stations/setup/icecast.sh index 302e8ef0d..ef8830760 100644 --- a/util/docker/stations/setup/icecast.sh +++ b/util/docker/stations/setup/icecast.sh @@ -2,35 +2,6 @@ set -e set -x -# Build Icecast from source -apt-get install -q -y --no-install-recommends \ - build-essential libxml2 libxslt1-dev libvorbis-dev libssl-dev libcurl4-openssl-dev openssl +# Icecast is built and imported in its own Docker container. -mkdir -p /bd_build/stations/icecast_build -cd /bd_build/stations/icecast_build - -curl -fsSL https://github.com/karlheyes/icecast-kh/archive/refs/tags/icecast-2.4.0-kh22.tar.gz \ - -o icecast.tar.gz -tar -xvzf icecast.tar.gz --strip-components=1 - -# git clone https://github.com/karlheyes/icecast-kh.git . -# git checkout 5f5564ddd7fed4ee69ee07b96d563a8bebf6e996 - -./configure -make -make install - -# Remove build tools -apt-get remove --purge -y build-essential libxslt1-dev libvorbis-dev libssl-dev libcurl4-openssl-dev - -# Copy AzuraCast Icecast customizations -mkdir -p /bd_build/stations/icecast_customizations -cd /bd_build/stations/icecast_customizations - -# git clone https://github.com/AzuraCast/icecast-kh-custom-files.git . - -curl -fsSL https://github.com/AzuraCast/icecast-kh-custom-files/archive/refs/tags/2023-04-23.tar.gz \ - -o custom-files.tar.gz -tar -xvzf custom-files.tar.gz --strip-components=1 - -cp -r web/* /usr/local/share/icecast/web +apt-get install -q -y --no-install-recommends libxml2 openssl