I was able to use it until the day before, but one day suddenly docker did not start up. (Is it because I updated my PC ??)
The first error I got was something like this
Could not find ancestry-3.1.0 in any of the sources
Run `bundle install` to install missing gems.
The above gem is listed in gemfile.lock, and I thought it was strange that an error would occur, but I tried docker-compose run web bundle install
, but it didn't work with the same error as expected.
When I searched, there was an article like this.
https://teratail.com/questions/291124
When I try docker-compose build --no-cache
, the following error is displayed
db uses an image, skipping
Building web
Traceback (most recent call last):
File "site-packages\docker\utils\build.py", line 96, in create_archive
OSError: [Errno 22] Invalid argument: '\\Directory name\\\ App name\\node_modules\\.bin\\acorn'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "docker-compose", line 3, in <module>
File "compose\cli\main.py", line 67, in main
File "compose\cli\main.py", line 126, in perform_command
File "compose\cli\main.py", line 302, in build
File "compose\project.py", line 468, in build
File "compose\project.py", line 450, in build_service
File "compose\service.py", line 1125, in build
File "site-packages\docker\api\build.py", line 160, in build
File "site-packages\docker\utils\build.py", line 31, in tar
File "site-packages\docker\utils\build.py", line 100, in create_archive
OSError: Can not read file in context: \\?\Directory name\app name\node_modules\.bin\acorn
[24060] Failed to execute script docker-compose
After investigating with the above error, I arrived at this article. https://crieit.net/posts/docker-compose-build-Can-not-read-file As described, if you create .dockerignore and write node_modules, docker-compose build will work!
When I searched for an error, I also found an article about a docker version problem, but it seemed to be different from my version, so the mystery deepened ... I'm glad I solved it safely. https://github.com/docker/compose/issues/5888
The version where the error occurred this time
docker-compose version 1.27.4, build 40524192
Docker version Version: 19.03.13