Skip to content

Commit

Permalink
u
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Jul 30, 2024
1 parent 750b122 commit 7917407
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 7917407

Please sign in to comment.