dockerfile.dev
This commit is contained in:
24
Dockerfile.dev
Normal file
24
Dockerfile.dev
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM python:3.11-slim as sde_import
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
RUN python -m pip install --no-cache-dir --upgrade -r requirements.txt
|
||||
COPY --chown=appuser:appuser eveal /app/eveal
|
||||
COPY --chown=appuser:appuser static_eve /app/static_eve
|
||||
COPY --chown=appuser:appuser import_sde.py /app/import_sde.py
|
||||
RUN python import_sde.py
|
||||
|
||||
FROM python:3.11-slim
|
||||
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
RUN adduser -u 5678 --disabled-password --gecos "" appuser
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=sde_import --chown=appuser:appuser /app/sde.db /app/sde.db
|
||||
COPY requirements.txt .
|
||||
RUN python -m pip install --no-cache-dir --upgrade -r requirements.txt
|
||||
COPY --chown=appuser:appuser eveal /app/eveal
|
||||
|
||||
USER appuser
|
||||
CMD ["uvicorn", "eveal.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
Reference in New Issue
Block a user