问题
I have a Gradle project and I'm using docker in this project. When I execute the command gradlew integrationTestDocker
, I get the error below.
OSError: Can not read file in context: \\?\C:\project\.gradle\6.6.1\executionHistory\executionHistory.lock
回答1:
That was reported before in Oct. 2018 (issue 7043) and Nov. 2019 (issue 11520)
In both cases, the suggestion was to add .gradle
to the .dockerignore
, in order to make sure it is not part of the docker build
context.
Plus this comment:
After few reboots and cleaning a repo described errors wasn't appear anymore.
Seems like it was some local / windows issue
来源:https://stackoverflow.com/questions/64574922/oserror-can-not-read-file-in-context-c-project-gradle-6-6-1-executionhis