Upgrading to Bookworm

- Also incorporating Mopidy-Spotify changes from @PureTryOut in #946
This commit is contained in:
James Barnsley
2024-03-18 20:11:57 +13:00
parent 161c771d56
commit a4705267e6
2 changed files with 22 additions and 24 deletions

View File

@ -1,5 +1,5 @@
# --- Build Node --- # --- Build Node ---
FROM rust:slim-bullseye AS Builder FROM rust:slim-bookworm AS Builder
LABEL org.opencontainers.image.authors="https://github.com/seppi91" LABEL org.opencontainers.image.authors="https://github.com/seppi91"
ARG TARGETPLATFORM ARG TARGETPLATFORM
ARG TARGETARCH ARG TARGETARCH
@ -23,16 +23,16 @@ RUN apt update \
libgstreamer-plugins-base1.0-dev \ libgstreamer-plugins-base1.0-dev \
libgstreamer1.0-dev \ libgstreamer1.0-dev \
libcsound64-dev \ libcsound64-dev \
libclang-11-dev \ libclang-14-dev \
libpango1.0-dev \ libpango1.0-dev \
libdav1d-dev \ libdav1d-dev \
# libgtk-4-dev \ Only in bookworm libgtk-4-dev \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/gst-plugins-rs WORKDIR /usr/src/gst-plugins-rs
# Clone source of gst-plugins-rs to workdir # Clone source of gst-plugins-rs to workdir
ARG GST_PLUGINS_RS_TAG=0.10.5 ARG GST_PLUGINS_RS_TAG=0.12.2
RUN git clone -c advice.detachedHead=false \ RUN git clone -c advice.detachedHead=false \
--single-branch --depth 1 \ --single-branch --depth 1 \
--branch ${GST_PLUGINS_RS_TAG} \ --branch ${GST_PLUGINS_RS_TAG} \
@ -53,7 +53,7 @@ RUN export CSOUND_LIB_DIR="/usr/lib/$(uname -m)-linux-gnu" \
# --- Release Node --- # --- Release Node ---
FROM debian:bullseye-slim as Release FROM debian:bookworm-slim as Release
# Switch to the root user while we do our changes # Switch to the root user while we do our changes
USER root USER root
@ -79,6 +79,7 @@ RUN apt-get update \
python3-gst-1.0 \ python3-gst-1.0 \
python3-setuptools \ python3-setuptools \
python3-pip \ python3-pip \
python3-venv \
# GStreamer (Plugins) # GStreamer (Plugins)
gstreamer1.0-plugins-good \ gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \ gstreamer1.0-plugins-bad \
@ -87,12 +88,15 @@ RUN apt-get update \
gstreamer1.0-pulseaudio \ gstreamer1.0-pulseaudio \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Allow pip to install over system packages
ENV PIP_BREAK_SYSTEM_PACKAGES 1
# Copy builded target data from Builder DEST_DIR to root # Copy builded target data from Builder DEST_DIR to root
# Note: target directory tree links directly to $GST_PLUGIN_PATH # Note: target directory tree links directly to $GST_PLUGIN_PATH
COPY --from=Builder /target/gst-plugins-rs/ / COPY --from=Builder /target/gst-plugins-rs/ /
# Install Node, to build Iris JS application # Install Node, to build Iris JS application
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - && \ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs apt-get install -y nodejs
# Install mopidy and (optional) DLNA-server dleyna from apt.mopidy.com # Install mopidy and (optional) DLNA-server dleyna from apt.mopidy.com
@ -101,14 +105,9 @@ RUN mkdir -p /etc/apt/keyrings \
&& wget -q -O /etc/apt/keyrings/mopidy-archive-keyring.gpg https://apt.mopidy.com/mopidy.gpg \ && wget -q -O /etc/apt/keyrings/mopidy-archive-keyring.gpg https://apt.mopidy.com/mopidy.gpg \
&& wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/bullseye.list \ && wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/bullseye.list \
&& apt-get update \ && apt-get update \
&& apt-get install -y \ && apt-get install -y mopidy \
mopidy \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Upgrade Python package manager pip
# https://pypi.org/project/pip/
RUN python3 -m pip install --upgrade pip
# Clone Iris from the repository and install in development mode. # Clone Iris from the repository and install in development mode.
# This allows a binding at "/iris" to map to your local folder for development, rather than # This allows a binding at "/iris" to map to your local folder for development, rather than
# installing using pip. # installing using pip.
@ -117,8 +116,9 @@ ADD https://api.github.com/repos/jaedb/Iris/git/refs/heads/master version.json
ENV IRIS_VERSION=develop ENV IRIS_VERSION=develop
RUN git clone --depth 1 --single-branch -b ${IRIS_VERSION} https://github.com/jaedb/Iris.git /iris \ RUN git clone --depth 1 --single-branch -b ${IRIS_VERSION} https://github.com/jaedb/Iris.git /iris \
&& cd /iris \ && cd /iris \
&& npm install \ && npm install -g yarn \
&& npm run prod \ && yarn install \
&& yarn run prod \
&& python3 setup.py develop \ && python3 setup.py develop \
&& mkdir -p /var/lib/mopidy/.config \ && mkdir -p /var/lib/mopidy/.config \
&& ln -s /config /var/lib/mopidy/.config/mopidy \ && ln -s /config /var/lib/mopidy/.config/mopidy \
@ -129,13 +129,12 @@ RUN git clone --depth 1 --single-branch -b ${IRIS_VERSION} https://github.com/ja
# Copy Version file # Copy Version file
&& cp /iris/VERSION / && cp /iris/VERSION /
# Install mopidy-spotify-gstspotify (Hack, not released yet!) # Install Mopidy Spotify
# (https://github.com/kingosticks/mopidy-spotify/tree/gstspotifysrc-hack) ARG MOPIDY_SPOTIFY_TAG=v5.0.0a1
RUN git clone --depth 1 https://github.com/mopidy/mopidy-spotify.git mopidy-spotify \ RUN git clone -c advice.detachedHead=false \
&& cd mopidy-spotify \ --single-branch --depth 1 \
&& python3 setup.py install \ --branch ${MOPIDY_SPOTIFY_TAG} \
&& cd .. \ https://github.com/mopidy/mopidy-spotify.git mopidy-spotify \
&& rm -rf mopidy-spotify
# Install additional mopidy extensions and Python dependencies via pip # Install additional mopidy extensions and Python dependencies via pip
COPY docker/requirements.txt . COPY docker/requirements.txt .

View File

@ -20,9 +20,8 @@ RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/reposit
# Install Node, to build Iris JS application # Install Node, to build Iris JS application
RUN apk add nodejs npm RUN apk add nodejs npm
# Upgrade Python package manager pip # Allow pip to install over system packages
# https://pypi.org/project/pip/ ENV PIP_BREAK_SYSTEM_PACKAGES 1
RUN python3 -m pip install --upgrade pip
# Clone Iris from the repository and install in development mode. # Clone Iris from the repository and install in development mode.
# This allows a binding at "/iris" to map to your local folder for development, rather than # This allows a binding at "/iris" to map to your local folder for development, rather than