xiaomi2mqtt/Dockerfile

25 lines
544 B
Docker
Raw Normal View History

2021-06-16 07:00:43 +01:00
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"]