-
-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c8cc088
commit fa5b7db
Showing
1 changed file
with
14 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
||
|