Initial commit: add Modbus slave simulator

- TCP/RTU/TLS server support with pymodbus
- Configurable data store sizes and initial values
- CLI with argument parsing for port, slave-id, etc.
- GitHub Actions CI/CD for Docker build and push
This commit is contained in:
zihluwang committed 2026-06-10 19:53:55 +08:00
commit 9466936bc3
5 files changed
+295

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
FROM python:3.11-slim
WORKDIR /app
# Install dependencies
COPY pyproject.toml uv.lock ./
RUN pip install uv && uv sync --frozen
# Copy application
COPY main.py ./
# Create non-root user
RUN useradd -m modbus && chown -R modbus:modbus /app
USER modbus
EXPOSE 5020
CMD ["python", "main.py"]