From ab579e7b7c831fbec6cfbd0f8a61281b31df89f9 Mon Sep 17 00:00:00 2001 From: Patrick van Zweden Date: Mon, 3 Aug 2026 11:12:57 +0200 Subject: [PATCH] Dockerfile for running minion as a docker container --- Dockerfile | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a5c7857 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,41 @@ +FROM python:3.11-slim + +# Prevent Python from buffering stdout/stderr +ENV PYTHONUNBUFFERED=1 \ + PYTHONDONTWRITEBYTECODE=1 + +# Configure the base url and optional the max no turns +# and polling +ENV MINION_BASE_URL=http:///v1 \ + MINION_API_KEY=nokey \ + MINION_BASH_POLL_SECONDS=3 \ + MINION_MAX_MODEL_TURNS=300 + +# Install git (if cloning during build) and any build tools +RUN apt-get update && apt-get install -y --no-install-recommends \ + git \ + build-essential \ + curl \ + procps \ + golang \ + tini \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /app + +# Clone the repository +RUN git clone https://github.com/Sentdex/minion.git . + +# Install dependencies +RUN if [ -f requirements.txt ]; then \ + pip install --no-cache-dir -r requirements.txt; \ + elif [ -f pyproject.toml ]; then \ + pip install --no-cache-dir .; \ + fi + +#Entry point tiny to prevent zombies +ENTRYPOINT ["tini", "--"] + +# Default command (adjust if necessary) +#CMD ["python", "minion.py"] +CMD ["bash"]