Skip to content

Commit

Permalink
fix: apk deps
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Nov 27, 2023
1 parent c8cc088 commit fa5b7db
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,20 @@ WORKDIR /usr/src/app
# STEP: 1 build
FROM base AS build-zui

RUN apk --no-cache add \
jq make gcc g++ python3 linux-headers \
npm=9.6.6-r0

RUN npm install --global [email protected]

COPY package.json yarn.lock .yarnrc.yml ./
COPY .yarn/releases .yarn/releases
RUN \
apk add --no-cache --virtual .build-dependencies \
jq \
build-base \
linux-headers \
python3-dev \
npm=9.6.6-r0 \
\
&& npm install --global [email protected]

ENV YARN_HTTP_TIMEOUT=300000
# set production env install will not install devDependencies
ENV NODE_ENV=production

ENV NODE_OPTIONS="--max-old-space-size=4096"

COPY . .

# if node_modules does not exist, run it, otherwise skip
Expand All @@ -45,8 +44,11 @@ RUN yarn remove $(cat package.json | jq -r '.devDependencies | keys | join(" ")'
build \
package.sh \
src \
api \
static \
docs \
kubernetes \
test \
.yarn \
.github \
.vscode
Expand All @@ -66,6 +68,8 @@ RUN if [ ! -z "$updateDevices" ]; \
node-zwave-js-master/packages/config/config/devices/ ;\
fi

RUN apk del --no-cache --purge .build-dependencies

# STEP: 2 (runtime)
FROM base AS runtime

Expand Down

0 comments on commit fa5b7db

Please sign in to comment.