23 lines
445 B
Docker
23 lines
445 B
Docker
# Dockerfile
|
|
FROM python:3.11-slim
|
|
|
|
WORKDIR /app/
|
|
|
|
# Install Poetry
|
|
RUN pip install poetry
|
|
|
|
# Copy poetry configuration files
|
|
COPY pyproject.toml poetry.lock* /app/
|
|
|
|
# Configure poetry to not use a virtual environment
|
|
RUN poetry config virtualenvs.create false
|
|
|
|
# Install dependencies
|
|
RUN poetry install --no-dev
|
|
|
|
# Copy application code
|
|
COPY . /app/
|
|
|
|
# Run the application
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|