From 614dc2da8c21368a1510cba4fa76b21474f45113 Mon Sep 17 00:00:00 2001 From: James Barnsley Date: Sun, 21 Apr 2019 14:05:20 +1200 Subject: [PATCH] Getting docker ready for development --- .dockerignore | 1 + Dockerfile | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..b512c09d --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 02a301c0..a2bce2f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ FROM debian:stretch-slim +# Copy the current codebase +COPY . /iris + RUN set -ex \ # Official Mopidy install for Debian/Ubuntu along with some extensions # (see https://docs.mopidy.com/en/latest/installation/debian/ ) @@ -12,6 +15,7 @@ RUN set -ex \ gstreamer1.0-alsa \ gstreamer1.0-plugins-bad \ python-crypto \ + git \ && curl -L https://apt.mopidy.com/mopidy.gpg | apt-key add - \ && curl -L https://apt.mopidy.com/mopidy.list -o /etc/apt/sources.list.d/mopidy.list \ && apt-get update \ @@ -22,19 +26,24 @@ RUN set -ex \ && curl -L https://bootstrap.pypa.io/get-pip.py | python - \ && pip install -U six pyasn1 requests[security] cryptography \ && pip install \ - Mopidy-Iris \ Mopidy-Moped \ Mopidy-GMusic \ Mopidy-Pandora \ Mopidy-YouTube \ pyopenssl \ youtube-dl \ + # Clone Iris from repo and install in development (for hot-loading) + #&& git clone https://github.com/jaedb/Iris.git /var/lib/mopidy/iris \ + && cd /iris \ + && python setup.py develop \ + && cd / \ && mkdir -p /var/lib/mopidy/.config \ && ln -s /config /var/lib/mopidy/.config/mopidy \ # Clean-up && apt-get purge --auto-remove -y \ curl \ gcc \ + git \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache