Dockerfile: install /etc/mime.types for correct content types for static files

This commit is contained in:
norohind 2023-11-29 17:03:11 +03:00 committed by GitHub
parent f235e5690e
commit 821d127d03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@ ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
COPY requirements.txt .
RUN apt update && apt install -y gcc
RUN apt update && apt install -y gcc media-types # media-types for /etc/mime.types for static files
RUN pip wheel --no-cache-dir --no-deps --wheel-dir /app/wheels -r requirements.txt
FROM python:3.11-slim
@ -15,7 +15,7 @@ ENV PYTHONUNBUFFERED 1
RUN useradd --no-create-home --system user
WORKDIR /app
COPY --from=builder /etc/mime.types /etc/mime.types
COPY --from=builder /app/wheels /wheels
COPY --from=builder /app/requirements.txt .