docker-compose fails at long paths on windows
See original GitHub issueWhen running docker-compose build
in a project that contains long paths (the path below is exactly 260 chars, the maximum allowed in windows), building fails.
It is related to https://github.com/docker/compose/issues/2473 but it seems the solution lies in this repository, since the stack trace matches with these source files.
Let me know if it should be fixed in another repo.
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "compose\cli\main.py", line 62, in main
File "compose\cli\main.py", line 114, in perform_command
File "compose\cli\main.py", line 835, in up
File "compose\project.py", line 382, in up
File "compose\service.py", line 305, in ensure_image_exists
File "compose\service.py", line 727, in build
File "site-packages\docker\api\build.py", line 55, in build
File "site-packages\docker\utils\utils.py", line 95, in tar
File "tarfile.py", line 2007, in add
File "tarfile.py", line 1879, in gettarinfo
WindowsError: [Error 3] The system cannot find the path specified: 'C:\\Users\\johnd\\dev\\tmp\\foobar\\node_modules\\gulp-clean\\node_modules\\gulp-util\\node_modules\\dateformat\\node_modules\\meow\\node_modules\\normalize-package-data\\node_modules\\validate-npm-package-license\\node_modules\\spdx-correct\\node_modules\\spdx-license-ids\\LICENSE'
docker-compose returned -1
Issue Analytics
- State:
- Created 7 years ago
- Comments:14
Top Results From Across the Web
docker-compose cannot locate the specified Dockerfile
I found it here: docker-compose gives ERROR: Cannot locate specified Dockerfile: Dockerfile. Instead of folder/Dockerfile
Read more >docker-compose using incorrect path - Visual Studio Feedback
Your open channel to Microsoft engineering teams ... I get the following error from docker-compose "build path f:\program files (x86)\Microsoft Visual ...
Read more >Compose file build reference - Docker Documentation
Context path can be absolute or relative, and if so relative path MUST be resolved from Compose file parent folder. As an absolute...
Read more >Windows Container Version Compatibility | Microsoft Learn
docker : Error response from daemon: container ... As of April 16, 2019, the "latest" tag is no longer published or maintained for...
Read more >Docker compose volume syntax valid for Windows and Linux
Yes. Just use ./ for you current directory that the Docker-compose file is in. Your "working directory" for the compose file is just...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
adding
node_modules
to your.dockerignore
can solve this issue too possiblyTrying to run docker-compose and I keep getting this error:
Versions:
I guess this is because of MAX_PATH limit on Windows for which I’ve tried enabling the
Enable Win32 long paths
but I still keeping getting this error.Any ideas on how I can fix this? In the meantime is there an option to tell docker-compose to ignore this file and run the rest of it anyway?