xiaomi2mqtt/Dockerfile

26 lines
584 B
Docker
Raw Normal View History

2022-08-09 09:52:36 +01:00
FROM python:3.9-slim-bullseye
2021-06-16 07:00:43 +01:00
# 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 git libbluetooth-dev bluez bluetooth
2021-06-16 07:00:43 +01:00
RUN apt clean
ADD requirements.txt .
RUN python -m pip install -U pip
RUN python -m pip install -Ur requirements.txt
2021-06-16 07:00:43 +01:00
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"]