Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions 06-demo-application/load-generator-python/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
FROM python:3.12-slim AS generate-requirements
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
RUN curl -sSL https://install.python-poetry.org | python3 -
COPY pyproject.toml poetry.lock ./
RUN /root/.local/bin/poetry export --output requirements.txt

###

FROM python:3.12-slim AS production
COPY --from=generate-requirements /requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["python", "main.py"]
FROM python:3.12-slim
COPY . .
RUN pip install --no-cache-dir .
CMD ["python", "-m", "load_generator_python.main"]
4 changes: 4 additions & 0 deletions 06-demo-application/load-generator-python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ version = "0.1.0"
description = ""
authors = ["sid palas"]

packages = [
{ include = "load_generator_python" }
]

[tool.poetry.dependencies]
python = "^3.9"
requests = "^2.32.2"
Expand Down