Recently, a new project started with team development, and I did the task of environment construction with Docker. At that time, when I tried to build Docker, I was at a loss because I got an error that I had never seen, `ʻOSError: Can not read file in context ~ ``, so that there is no one to follow the same path. I will share it here.
【environment】
Suddenly, it's a solution. It's that easy. Apparently, when I was reading the error statement, the node_modules directory seemed to be bad, so I created a **. Doctorignore file ** and there I wrote node_modules and rebuilt it and it worked!
.dockerignore
node_modules
Once you create Docker, you can reuse the environment, and in team development, if one person creates it, you can immediately reproduce the exact same environment, so it's insanely convenient! However, due to lack of knowledge, even if you build with another person's Dockerfile Maru Pakuri, it often does not work and you often struggle with errors ... It takes many times longer, isn't it?
If you have any suggestions or impressions, I would appreciate it if you could comment! !!
Recommended Posts