21 lines
452 B
Docker
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"]
|