Clean dockerfile

This commit is contained in:
SebClem 2024-08-13 16:49:18 +02:00
parent 1181d02987
commit cf30578655
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50

View File

@ -5,8 +5,7 @@ FROM node:20 AS frontend-builder
WORKDIR /app WORKDIR /app
COPY frontend/package.json frontend/pnpm-lock.yaml ./ COPY frontend/package.json frontend/pnpm-lock.yaml ./
RUN corepack enable RUN corepack enable && pnpm install
RUN pnpm install
COPY frontend/ . COPY frontend/ .
@ -17,8 +16,7 @@ FROM node:20 AS backend-builder
WORKDIR /app WORKDIR /app
COPY backend/package.json backend/pnpm-lock.yaml ./ COPY backend/package.json backend/pnpm-lock.yaml ./
RUN corepack enable RUN corepack enable && pnpm install
RUN pnpm install
COPY backend/ . COPY backend/ .
@ -26,17 +24,10 @@ RUN pnpm build
FROM $BUILD_FROM FROM $BUILD_FROM
# Copy root filesystem
COPY rootfs/etc /etc/ COPY rootfs/etc /etc/
COPY rootfs/usr /usr/ COPY rootfs/usr /usr/
# Setup base RUN apk add --no-cache nodejs-current && mkdir -p /usr/local/sbin/ && ln -s /usr/bin/node /usr/local/sbin/node
RUN apk add --no-cache nodejs-current
# Fix for arm/v7
RUN mkdir -p /usr/local/sbin/
RUN ln -s /usr/bin/node /usr/local/sbin/node
WORKDIR /opt/nextcloud_backup/ WORKDIR /opt/nextcloud_backup/