FROM python:3.12.10-slim

WORKDIR /application

RUN python -m venv /application/.venv && \
    /application/.venv/bin/pip install --upgrade pip setuptools && \
    /application/.venv/bin/pip install poetry

COPY . .

RUN /application/.venv/bin/poetry install --no-cache 

# Check the content of the image
# RUN ls -al .
# RUN tree ./application

# EXPOSE 9150

# CMD ["/application/.venv/bin/python", "src/axmp_openapi_mcp_server/runner/container.py"]
# BUG: container could not find the env when the container uses the .venv/bin/python
CMD ["/application/.venv/bin/axmp-container-openapi-mcp-server"]
