Files
weatherstation-datacollector/Dockerfile
2025-12-21 07:26:30 +00:00

21 lines
452 B
Docker

FROM python:3.13-slim
WORKDIR /workspace
# Install system dependencies for mysql-connector-python and git
RUN apt-get update && apt-get install -y \
default-libmysqlclient-dev \
pkg-config \
git \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Create volume for SQLite database persistence
VOLUME ["/workspace/data"]
EXPOSE 1883 3306
CMD ["python", "datacollector.py"]