Public Repository

Last pushed: 9 months ago
Short Description
A simple http based API for controlling your Sonos system. Build to run on an Raspberry Pi (RPI).
Full Description

Contributes to https://github.com/jishi/node-sonos-http-api. Look there for further details.

This is the Dockerfile which is used for cross-build on a Mac and based on a proper nodejs image (look at https://hub.docker.com/r/fgabriel/rpi-nodejs/) which is again based on a proper debian testing image (for further details look at repository https://hub.docker.com/r/fgabriel/rpi-armv7hf-debian-qemu/):

FROM fgabriel/rpi-nodejs
MAINTAINER Ferdinand Gabriel <f.gabriel@gidea.at>

RUN [ "cross-build-start" ]

RUN mkdir /usr/src/app && mkdir /root/.sonos-http-api

ADD package.json /usr/src/app

WORKDIR /usr/src/app

RUN npm install --production

EXPOSE 3500 5005

ADD . /usr/src/app

VOLUME /root/.sonos-http-api

RUN ln -s /root/.sonos-http-api/settings.json settings.json

CMD [ "npm", "start" ]```

RUN [ "cross-build-end" ]

Please note:
Before building the docker image, you have to download the current package.json from https://github.com/jishi/node-sonos-http-api. It is copied to the image and needed for installation of the packages.

This container has to be run with this command

docker run -d --name sonos-http-api --net=host --restart=always -v /etc/localtime:/etc/localtime:ro -v /[mount volume]:/root/.sonos-http-api:rw fgabriel/rpi-node-sonos-http-api:latest

whereby mount volume can store the settings.json file. E.g. if you want to use the text-to-speed function and you have to define your API-key for voicerss.org in the settings.json.

Docker Pull Command
Owner
fgabriel