Skip to content

Build a containerized version of OpenSprinkler for the Raspberry Pi

Notifications You must be signed in to change notification settings

MNicks/OpenSprinkler-RPi-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Thanks to John who does main work providing a OpenSprinkler RPi enabled Dockerfile

OpenSprinkler-RPi-docker

Build a containerized version of OpenSprinkler for the Raspberry Pi

Building the container

  1. Check this repo
  2. From this directory, create the image:
$ docker build -t opensprinkler .

Notes:

This requires a version of Docker that supports multi-stage builds (i.e., version >= 17.06). The container is built for the armhf architecture.

Getting the pre-build container from Docker Hub

docker pull johnstrunk/opensprinkler-rpi

Running the container

Once the container is built, it can be started via:

$ mkdir ~/opensprinkler
$ docker run -d \
  --name opensprinkler \   # Give it a handy name
  --privileged \           # Privileged because we need access to devices
  --publish 8080:8080 \    # Make the web interface accessible
  --restart always \       # Auto restart on crash/exit
  --volume /dev:/dev \     # Provide access to /dev
  --volume ~/opensprinkler:/data \  # Where to save NVM & logs
  opensprinkler            # The image (from above)

The persistent data generated by OS is written to the volume mounted at /data within the container. This includes the NVM files, IFTTT key file, and log directory. In the above sample command line, these files will end up in the user's home directory (${HOME}/opensprinkler).

Other options, including using a docker data volume are possible.

NOTE: If you don't specify a volume or dir to mount here, your OpenSprinkler configuration will not persist across restarts of the container.

About

Build a containerized version of OpenSprinkler for the Raspberry Pi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published