Explorar o código

Merge pull request #10 from subDesTagesMitExtraKaese/main

get pandas from apt
Christopher Nethercott %!s(int64=2) %!d(string=hai) anos
pai
achega
62514f26b4
Modificáronse 2 ficheiros con 10 adicións e 8 borrados
  1. 10 7
      Dockerfile
  2. 0 1
      requirements.txt

+ 10 - 7
Dockerfile

@@ -1,18 +1,21 @@
-FROM python:3.9-slim-bullseye
+FROM debian:bullseye-slim
 
 LABEL maintainer="Christopher Nethercott" \
     description="PiHole to InfluxDB data bridge"
 
+WORKDIR /app
+
 # Install Python packages
-COPY requirements.txt /
-RUN pip install -r /requirements.txt
+COPY requirements.txt .
+RUN apt-get update && \
+  apt-get install -y --no-install-recommends python3 python3-pip python3-pandas && \
+  python3 -m pip install -r requirements.txt
 
 # Clean up
-RUN apt-get -q -y autoremove
-RUN apt-get -q -y clean
-RUN rm -rf /var/lib/apt/lists/*
+RUN apt-get -q -y autoremove && \
+  apt-get -q -y clean && \
+  rm -rf /var/lib/apt/lists/*
 
 # Final setup & execution
 COPY . /app
-WORKDIR /app
 CMD ["python3", "-u", "main.py"]

+ 0 - 1
requirements.txt

@@ -1,3 +1,2 @@
 influxdb-client
-pandas
 requests