Skip to content

Dev Run lib with Docker

Pawel edited this page Aug 23, 2022 · 2 revisions

Dockerfile:

FROM ubuntu:latest

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
  && apt-get install -y python3-pip python3-dev \
  && cd /usr/local/bin \
  && ln -s /usr/bin/python3 python \
  && pip3 install --upgrade pip && pip3 install bosch-thermostat-client
ENTRYPOINT ["python3", "-m", "bosch_thermostat_client.bosch_cli"]
CMD ["--help"]

Running lib:

  1. Create directory named eg bosch_test
  2. cd bosch_test
  3. create file name Dockerfile and paste above content
  4. docker build -t test .
  5. docker run -it test -> you should see help message of bosch_cli

run: single query: docker run -it test query --host=HOST --token=TOKEN --password=PASSWORD --protocol XMPP --device EASYCONTROL -p "/gateway/uuid" scan:

docker run -it test scan -i --host=HOST --token=TOKEN --password=PASSWORD --protocol XMPP --device EASYCONTROL