-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
44 lines (37 loc) · 943 Bytes
/
dockerfile
File metadata and controls
44 lines (37 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM python:3.11-slim-bullseye
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set working directory
WORKDIR /app
# Install system dependencies for GPIO, OLED, and ping support
RUN apt-get update && apt-get install -y \
build-essential \
libjpeg-dev \
zlib1g-dev \
libfreetype6-dev \
libtiff5-dev \
libopenjp2-7 \
libatlas-base-dev \
i2c-tools \
iputils-ping \
tzdata \
libgl1-mesa-dev \
libffi-dev \
libusb-1.0-0-dev \
python3-dev \
libc6-dev \
libgpiod2 \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Copy the app code and bundled historical tuning data
COPY solar.py ./
COPY solarmining_logo.png ./
COPY favicon ./favicon
COPY wait-for-dns.sh ./
COPY solarman_json ./solarman_json
EXPOSE 9000
# Entrypoint
CMD ["python", "solar.py"]