Created
March 19, 2026 19:24
-
-
Save jnbdz/3fed3c8f3bf5d46a1bb24cd4f59fc4fe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM python:3.12-slim | |
| WORKDIR /app | |
| # System deps needed by some Python packages | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Poetry (pinned for reproducibility) | |
| RUN pip install --no-cache-dir poetry==1.8.2 | |
| # Copy dependency files first (layer caching) | |
| COPY pyproject.toml poetry.lock ./ | |
| # Install only production deps, no virtualenv needed inside container | |
| RUN poetry config virtualenvs.create false \ | |
| && poetry install --only main --no-interaction --no-ansi | |
| # Copy the rest of the application | |
| COPY . . | |
| # ENTRYPOINT is python — CMD is overridden per Step Functions step | |
| ENTRYPOINT ["python"] | |
| CMD ["main.py"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment