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
COPY frontend/package.json frontend/pnpm-lock.yaml ./
RUN corepack enable
RUN pnpm install
RUN corepack enable && pnpm install
COPY frontend/ .
@ -17,8 +16,7 @@ FROM node:20 AS backend-builder
WORKDIR /app
COPY backend/package.json backend/pnpm-lock.yaml ./
RUN corepack enable
RUN pnpm install
RUN corepack enable && pnpm install
COPY backend/ .
@ -26,17 +24,10 @@ RUN pnpm build
FROM $BUILD_FROM
# Copy root filesystem
COPY rootfs/etc /etc/
COPY rootfs/usr /usr/
# Setup base
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
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/