mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-12-25 07:16:44 +01:00
39 lines
806 B
Docker
39 lines
806 B
Docker
ARG BUILD_FROM=ghcr.io/home-assistant/amd64-base:3.20
|
|
|
|
FROM node:20 AS frontend-builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY frontend/package.json frontend/pnpm-lock.yaml ./
|
|
RUN corepack enable && pnpm install
|
|
|
|
COPY frontend/ .
|
|
|
|
RUN pnpm build
|
|
|
|
FROM node:20 AS backend-builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY backend/package.json backend/pnpm-lock.yaml ./
|
|
RUN corepack enable && pnpm install
|
|
|
|
COPY backend/ .
|
|
|
|
RUN pnpm build
|
|
|
|
FROM $BUILD_FROM
|
|
|
|
COPY rootfs/etc /etc/
|
|
COPY rootfs/usr /usr/
|
|
|
|
RUN apk add --no-cache nodejs-current && mkdir -p /usr/local/sbin/ && ln -s /usr/bin/node /usr/local/sbin/node
|
|
|
|
WORKDIR /opt/nextcloud_backup/
|
|
|
|
COPY backend/package.json backend/pnpm-lock.yaml ./
|
|
|
|
COPY --from=backend-builder /app/dist .
|
|
COPY --from=backend-builder /app/node_modules ./node_modules
|
|
COPY --from=frontend-builder /app/dist ./public
|