Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
370 views
in Technique[技术] by (71.8m points)

node.js - How to optimize docker build for react-application with lot of node modules

I am using docker to build and deploy the react-application. It takes a lot of time to build the docker almost 20-25 mins.

I tried to find out why it is taking so much time and find out that from step 9 to step 10. It is removing intermediate container and its taking 10 mins to do that.

05:39:57 | Step 9/18 : RUN cd /app/web && yarn install
    05:43:38 | Done in 219.92s.
    05:49:36 | Removing intermediate container 9ffd2edc0daa **TOOK almost 10 minutes to remove intermediate container**
05:49:36 | Step 10/18 : COPY . ./

Any idea/suggestion how to optimize this so it won't take this much time. Thanks


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...