mirror of
https://github.com/msoedov/agentic_security.git
synced 2026-06-24 06:09:55 +02:00
update Dockerfile to use Poetry for direct dependency management
This commit is contained in:
+12
-5
@@ -2,15 +2,22 @@ FROM python:3.11-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
RUN curl -sSL https://install.python-poetry.org | python3 -
|
||||
|
||||
# Ensure Poetry is available in PATH
|
||||
ENV PATH="/root/.local/bin:$PATH"
|
||||
|
||||
COPY pyproject.toml poetry.lock ./
|
||||
|
||||
RUN poetry self add "poetry-plugin-export" && \
|
||||
poetry export -f requirements.txt --without-hashes -o requirements.txt && \
|
||||
pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN chmod +x /app/agentic_security.py || true
|
||||
|
||||
EXPOSE 8718
|
||||
|
||||
# Run the initialization command first, then start the application
|
||||
CMD ["sh", "-c", "python -m agentic_security i && python -m agentic_security s"]
|
||||
# CMD ["sh", "-c", "python -m agentic_security i && python -m agentic_security s"]
|
||||
|
||||
Reference in New Issue
Block a user