Skip to content

Commit

Permalink
Add Dockerfiles that work on Raspbian Stretch (#117)
Browse files Browse the repository at this point in the history
* Add Dockerfile compatible with RPI Zero W / Raspbian Stretch
- Also adds variant with pytradfri installed, for easier use as base image for applications
  • Loading branch information
tazle authored and Patrik committed Nov 17, 2017
1 parent d17d68f commit 4ba3f79
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@ dist/
.coverage
.tox

gateway_psk.txt
gateway_psk.txt

# Emacs backup files
*~
22 changes: 22 additions & 0 deletions DockerfileRPIW
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM resin/rpi-raspbian:stretch

# https://community.home-assistant.io/t/ikea-tradfri-gateway-zigbee-very-basic-working-implementation/14788/19?u=balloob
RUN apt-get update -y && \
apt-get install -y python3 python3-dev python3-pip git autoconf automake libtool make && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* build/

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY ./script/install-coap-client.sh install-coap-client.sh
RUN ./install-coap-client.sh

# Cython version must match the version used in DTLSSocket that's in requirements.txt
RUN python3 -m pip install --upgrade pip setuptools wheel
RUN python3 -m pip install Cython==0.27.2

COPY requirements.txt requirements.txt
RUN python3 -m pip install -r requirements.txt

CMD /bin/bash
25 changes: 25 additions & 0 deletions DockerfileRPIW-installed
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM resin/rpi-raspbian:stretch

# https://community.home-assistant.io/t/ikea-tradfri-gateway-zigbee-very-basic-working-implementation/14788/19?u=balloob
RUN apt-get update -y && \
apt-get install -y python3 python3-dev python3-pip git autoconf automake libtool make && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* build/

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY ./script/install-coap-client.sh install-coap-client.sh
RUN ./install-coap-client.sh

# Cython version must match the version used in DTLSSocket that's in requirements.txt
RUN python3 -m pip install --upgrade pip setuptools wheel
RUN python3 -m pip install Cython==0.27.2

COPY requirements.txt requirements.txt
RUN python3 -m pip install -r requirements.txt

COPY ./ /usr/src/app/pytradfri/
RUN cd pytradfri && python3 setup.py install

CMD /bin/bash

0 comments on commit 4ba3f79

Please sign in to comment.