xiaomi2mqtt/Dockerfile
2021-06-16 15:38:59 +01:00

25 lines
544 B
Docker

FROM python:3.8-slim-buster
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE 1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED 1
RUN apt update
RUN apt install -y gcc libbluetooth-dev bluez bluetooth
RUN apt clean
ADD requirements.txt .
RUN python -m pip install -r requirements.txt
RUN useradd -d /app -m appuser
WORKDIR /app
USER appuser
COPY get_data.py /app
COPY bluetooth_utils /app/bluetooth_utils
COPY entrypoint.sh /app
ENTRYPOINT ["/bin/bash", "/app/entrypoint.sh"]