Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM arm32v7/ubuntu:latest
MAINTAINER Maik Schwan <maik.schwan@gmail.com>

#Install libpcap-dev
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get install -y nodejs && \
apt-get install -y npm && \
apt-get install -y git && \
apt-get install -y wget && \
apt-get install -y libpcap-dev

#update node
RUN wget http://node-arm.herokuapp.com/node_latest_armhf.deb
RUN dpkg -i node_latest_armhf.deb

#install dasher
RUN cd /root && export GIT_SSL_NO_VERIFY=1 && \
git config --global http.sslVerify false && \
git clone https://github.com/maddox/dasher.git

WORKDIR /root/dasher
RUN cd /root/dasher && npm install

# Interface the environment
VOLUME /root/dasher/config

# Baseimage init process
CMD cd /root/dasher && npm run start
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,45 @@ Starting from a fresh Raspberry Pi Build?
# update /config/config.json with mac address of your button
sudo npm run start

#### Docker
You can run dasher inside a docker container:

# pull the image
docker pull nesurion/dasher
# start the container
docker run --rm --name dasher --volume <path to your config folder here>:/root/dasher/config --net host nesurion/dasher

**Auto Starting**

Advanced information on autostarting Dasher on your Raspberry Pi can be found [here](https://github.com/maddox/dasher/wiki/Running-Dasher-on-a-Raspberry-Pi-at-startup).

**Auto Starting using Docker with systemd**

Create a new service by creating a new file /etc/systemd/system/dasher.service

[Unit]
Description=Dasher
After=docker.service
Requires=docker.service

[Service]
ExecStartPre=-/usr/bin/docker stop dasher
ExecStartPre=-/usr/bin/docker rm dasher
After=docker.service
ExecStartPre=-/usr/bin/docker pull nesuion/dasher
ExecStart=/usr/bin/docker run --rm --name dasher --volume /home/pi/dasher/config:/root/dasher/config --net host dasher
ExecStop=/usr/bin/docker stop dasher
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

Add the new service to systemd:

sudo systemctl enable dasher.service


## Contributions

* fork
Expand Down