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 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"]
|