diff --git a/docker/Dockerfile b/docker/Dockerfile index 007a790475..de341db9e6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,25 +1,25 @@ -FROM alpine:3.20.2 as base +FROM alpine:3.20.2 AS base WORKDIR /app RUN apk add --no-cache tzdata eudev tini nodejs # Dependencies and build -FROM base as dependencies_and_build +FROM base AS dependencies_and_build COPY package*.json pnpm-lock.yaml tsconfig.json index.js ./ COPY lib ./lib -ENV NODE_ENV production +ENV NODE_ENV=production RUN apk add --no-cache --virtual .buildtools make gcc g++ python3 linux-headers git npm && \ npm install -g pnpm && \ pnpm install --frozen-lockfile --no-optional && \ # Serialport needs to be rebuild for Alpine https://serialport.io/docs/9.x.x/guide-installation#alpine-linux - npm rebuild --build-from-source && \ + # pnpm rebuild --build-from-source && \ apk del .buildtools # Release -FROM base as release +FROM base AS release COPY --from=dependencies_and_build /app/node_modules ./node_modules COPY dist ./dist