简体   繁体   中英

Docker build hangs indefinitely on windows 10

When i run docker build -t student-app-client. to build the docker image nothings happens for long time. Docker file is fine and it's working fine on Linux

docker version : 19.03.8

Windows version : Windows 10 pro

I realized that during docker build, docker was reading all files in the root directory folder which had lot of files.

I added all these files in .dockerignore . After this build completed with in minute.

Sample .dockerignore file

/node_modules/
/build/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM