Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes and optimizes the Docker build (#206)
This resolves issue #203 and also optimizes the Dockerfile to use less resources. Also the current version from the Git repo is copied to the Docker container for easy access. I've taken the liberty to also update the DTLSSocket requirement to version 0.1.7 which resolves an issue regarding cython. According to their repo, nothing else has changed [1]. The RPi and RPiW Dockerfiles were not updated because of compatibility reasons. I cannot easily test those files and do not want to break anything. **References** 1. https://git.fslab.de/jkonra2m/tinydtls-cython/commits/master
- Loading branch information
1 parent
506b9e8
commit 685027b
Showing
4 changed files
with
15 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,13 @@ | ||
FROM debian:latest | ||
FROM python:3.7-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-pip git autoconf automake libtool && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* build/ | ||
COPY . /usr/src/app/ | ||
|
||
RUN mkdir -p /usr/src/app /usr/src/build | ||
WORKDIR /usr/src/build | ||
|
||
RUN python3 -m pip install --upgrade pip setuptools wheel cython | ||
|
||
COPY ./script/install-coap-client.sh install-coap-client.sh | ||
RUN ./install-coap-client.sh | ||
|
||
COPY requirements.txt requirements.txt | ||
RUN python3 -m pip install -r requirements.txt | ||
RUN mkdir -p /usr/src/build && \ | ||
cd /usr/src/build && \ | ||
pip3 install --upgrade pip setuptools wheel cython && \ | ||
pip3 install -r /usr/src/app/requirements.txt && \ | ||
/usr/src/app/script/install-coap-client.sh && \ | ||
python /usr/src/app/setup.py install | ||
|
||
WORKDIR /usr/src/app | ||
ENV LANG=C.UTF-8 | ||
CMD /bin/bash | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
aiocoap==0.4a1 | ||
DTLSSocket==0.1.4 | ||
typing>=3,<4 | ||
DTLSSocket==0.1.7 | ||
typing>=3,<4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters