hassio-nextcloud-backup/nextcloud_backup/Dockerfile

39 lines
806 B
Docker
Raw Normal View History

ARG BUILD_FROM=ghcr.io/home-assistant/amd64-base:3.20
2024-08-13 13:50:42 +02:00
FROM node:20 AS frontend-builder
2024-08-13 13:23:32 +02:00
WORKDIR /app
COPY frontend/package.json frontend/pnpm-lock.yaml ./
2024-08-13 16:49:18 +02:00
RUN corepack enable && pnpm install
2024-08-13 13:23:32 +02:00
COPY frontend/ .
RUN pnpm build
FROM node:20 AS backend-builder
2024-08-13 13:23:32 +02:00
WORKDIR /app
COPY backend/package.json backend/pnpm-lock.yaml ./
2024-08-13 16:49:18 +02:00
RUN corepack enable && pnpm install
2024-08-13 13:23:32 +02:00
COPY backend/ .
RUN pnpm build
2024-08-13 13:47:22 +02:00
FROM $BUILD_FROM
2019-12-19 15:08:47 +01:00
COPY rootfs/etc /etc/
COPY rootfs/usr /usr/
2019-12-19 15:08:47 +01:00
2024-08-13 16:49:18 +02:00
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/
2024-08-13 13:23:32 +02:00
COPY backend/package.json backend/pnpm-lock.yaml ./
COPY --from=backend-builder /app/dist .
2024-08-13 15:53:02 +02:00
COPY --from=backend-builder /app/node_modules ./node_modules
2024-08-13 13:23:32 +02:00
COPY --from=frontend-builder /app/dist ./public