This commit is contained in:
2024-06-27 04:02:36 +02:00
parent 9581a3ce2c
commit 345666cb2e
11 changed files with 213 additions and 29 deletions

View File

@@ -1,9 +1,9 @@
FROM python:3.12-alpine3.20 AS build_bluepy
RUN apk add \
bluez \
make \
git \glib-dev \
git \
glib-dev \
gcc \
build-base \
freetype-dev \
@@ -16,20 +16,22 @@ RUN git clone https://github.com/IanHarvey/bluepy.git && \
python3.12 setup.py install
FROM python:3.12-alpine3.20
WORKDIR = /src
COPY python/src/ .
COPY python/requierements.txt .
COPY python/docker_entrypoint.sh /
WORKDIR /src
COPY ./python/src/ .
COPY ./python/requierements.txt .
COPY ./python/docker_entrypoint.sh /
RUN mkdir data
VOLUME data
RUN touch DOCKER
VOLUME /src/data
RUN apk add sudo bluez
RUN apk add --no-cache sudo bluez tzdata
ENV TZ=Europe/Berlin
# Copy bluepy from the bluepy build stage
COPY --from=build_bluepy /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
COPY --from=build_bluepy /usr/local/bin /usr/local/bin
RUN pip3.12 install -r requierements.txt && rm requierements.txt
# RUN echo '@reboot root python3.12 /src/serve_json.py' >> /etc/crontab
ENTRYPOINT sh /docker_entrypoint.sh