install some packages to improve docker building

This commit is contained in:
SrGooglo 2022-11-18 18:44:42 +00:00
parent 2713a19f79
commit 756a2aec7f
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,7 @@
FROM node:16-bullseye
RUN apt update
RUN apt install python -y
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
WORKDIR /home/node/app
@ -13,5 +15,6 @@ COPY --chown=node:node . .
RUN chmod -R 777 /home/node/app
RUN npm install
RUN npm run build
RUN npm rebuild @tensorflow/tfjs-node --build-from-source
CMD ["node", "/home/node/app/dist/index.js"]

View File

@ -1,5 +1,8 @@
FROM node:16-bullseye-slim
RUN apt update
RUN apt install build-essential -y
RUN apt install python3 -y
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
WORKDIR /home/node/app