Skip to content

Commit

Permalink
Add Dockerfile compatible with RPI Zero W / Raspbian Stretch
Browse files Browse the repository at this point in the history
- Also adds variant with pytradfri installed, for easier use as base image for applications
- Fixes #116
  • Loading branch information
tazle committed Nov 17, 2017
1 parent a500e4d commit f2ea0dc
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
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 f2ea0dc

Please sign in to comment.