trying to fix build error on rpi

This commit is contained in:
Torben Haack 2024-10-10 10:06:16 +02:00
parent 3b6beab3ab
commit a3a50dac8b

View File

@ -1,4 +1,4 @@
FROM node:20-bookworm FROM arm64v8/node:20-bullseye # Use an ARM-compatible Node.js image
# Create application directory # Create application directory
RUN mkdir -p /usr/src/app RUN mkdir -p /usr/src/app
@ -13,6 +13,9 @@ WORKDIR /usr/src/app
COPY package.json /usr/src/app COPY package.json /usr/src/app
COPY pnpm-lock.yaml /usr/src/app COPY pnpm-lock.yaml /usr/src/app
# Install build tools
RUN apt-get update && apt-get install -y build-essential
# Install pnpm # Install pnpm
RUN corepack enable pnpm RUN corepack enable pnpm
@ -31,4 +34,4 @@ RUN pnpm run build
EXPOSE 3000 EXPOSE 3000
# Start the application # Start the application
CMD ["/bin/sh", "-c", "if [ ! -f ./db/sqlite.db ]; then pnpm db; fi && pnpm start"] CMD ["/bin/sh", "-c", "if [ ! -f ./db/sqlite.db ]; then pnpm db; fi && pnpm start"]