From a0aaada0c89c122ab1e18171999037334bc05f2a Mon Sep 17 00:00:00 2001 From: James Barnsley Date: Mon, 2 Jan 2023 21:43:45 +1300 Subject: [PATCH] Dockerfile to *build* assets manually - Cannot safely (and consistently) overwrite PIP-installed package with host volume binding, so is easier to build within Docker - Add `.nvmrc` for consistent buildout --- .nvmrc | 1 + Dockerfile | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..ca3f1e5c --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v14 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 89930082..ad485f1a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,6 +61,10 @@ RUN apt-get update \ libwebp-dev # libgtk-4-dev # Only in bookworm +# Install Node, to build Iris JS application +RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - && \ + apt-get install -y nodejs + # Install gstreamer-spotify (EXPERIMENTAL) # Note: For spotify with upgraded version number of dependency librespot to 0.4.2 #RUN cargo install cargo-c @@ -105,6 +109,7 @@ RUN python3 -m pip install cffi ADD https://api.github.com/repos/jaedb/Iris/git/refs/heads/master version.json RUN git clone --depth 1 --single-branch -b master https://github.com/jaedb/Iris.git /iris \ && cd /iris \ + && npm run prod \ && python3 setup.py develop \ && mkdir -p /var/lib/mopidy/.config \ && ln -s /config /var/lib/mopidy/.config/mopidy \