Dynavera/compose/dev/python/Dockerfile
2025-11-18 21:39:01 +00:00

39 lines
No EOL
779 B
Docker

FROM node:22-alpine AS node
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY src ./src
COPY index.html .
COPY vite.config.* .
COPY tsconfig.* .
RUN npm run build
FROM python:3.14.0-bookworm as python
RUN apt-get update && apt-get install --no-install-recommends -y \
build-essential \
libpq-dev \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir --requirement /requirements.txt
WORKDIR /app
RUN apt-get update && apt-get install --no-install-recommends -y \
sudo git bash-completion nano ssh
COPY . .
COPY --from=node /app/build ./build
COPY ./compose/prod/start /start
RUN sed -i 's/\r$//g' /start
RUN chmod +x /start
ENTRYPOINT ["/start"]