A simple http based API for controlling your Sonos system. Build to run on an Raspberry Pi (RPI).
7.8K
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 <[email protected]>
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.
Content type
Image
Digest
Size
182.4 MB
Last updated
over 9 years ago
docker pull fgabriel/rpi-node-sonos-http-api