mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-19 21:29:41 +02:00
Fix docker image build on apple silicon (#165)
* fix node-gyp error on apple silicon * fix typescript compile error
This commit is contained in:
parent
2e065adce6
commit
ce1f7db3d7
2 changed files with 12 additions and 6 deletions
|
@ -1,10 +1,17 @@
|
||||||
# Stage 1 - build
|
# Stage 1 - build
|
||||||
FROM node:16.14.0-alpine3.15 as build
|
FROM node:16.14.0-alpine3.15 as build
|
||||||
|
|
||||||
|
## Install build toolchain, install node deps and compile native add-ons
|
||||||
|
RUN apk add --no-cache python3 make g++
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
COPY package.json yarn.lock ./
|
COPY package.json yarn.lock ./
|
||||||
|
|
||||||
|
RUN yarn install --production
|
||||||
|
|
||||||
|
RUN cp -R node_modules prod_node_modules
|
||||||
|
|
||||||
RUN yarn install
|
RUN yarn install
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
@ -19,9 +26,7 @@ FROM node:16.14.0-alpine3.15
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
COPY package.json yarn.lock ./
|
COPY package.json yarn.lock ./
|
||||||
|
COPY --from=build /usr/src/app/prod_node_modules ./node_modules
|
||||||
RUN yarn install --production
|
|
||||||
|
|
||||||
COPY --from=build /usr/src/app/dist ./dist
|
COPY --from=build /usr/src/app/dist ./dist
|
||||||
COPY --from=build /usr/src/app/public ./public
|
COPY --from=build /usr/src/app/public ./public
|
||||||
|
|
||||||
|
|
|
@ -68,5 +68,6 @@
|
||||||
/* Advanced Options */
|
/* Advanced Options */
|
||||||
"skipLibCheck": true, /* Skip type checking of declaration files. */
|
"skipLibCheck": true, /* Skip type checking of declaration files. */
|
||||||
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
|
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
|
||||||
}
|
},
|
||||||
|
"include": ["src/**/*"]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue