Browse Source

get pandas from apt

subDesTagesMitExtraKaese 2 years ago
parent
commit
679e28383a
2 changed files with 9 additions and 7 deletions
  1. 9 6
      Dockerfile
  2. 0 1
      requirements.txt

+ 9 - 6
Dockerfile

@@ -3,16 +3,19 @@ FROM python:3.9-slim-bullseye
 LABEL maintainer="Christopher Nethercott" \
 LABEL maintainer="Christopher Nethercott" \
     description="PiHole to InfluxDB data bridge"
     description="PiHole to InfluxDB data bridge"
 
 
+WORKDIR /app
+
 # Install Python packages
 # 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-pandas && \
+  pip install -r requirements.txt
 
 
 # Clean up
 # 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
 # Final setup & execution
 COPY . /app
 COPY . /app
-WORKDIR /app
 CMD ["python3", "-u", "main.py"]
 CMD ["python3", "-u", "main.py"]

+ 0 - 1
requirements.txt

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