/ go Public
cmd/go: document .lock files in the module cache #51121
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
.lock files in the go modules cache are a frequent source of issues for us. Take the following common use case for example: when running go in a Docker container that has had dependencies installed into it as part of building the Docker image, these dependencies are naturally owned by
rootwith 755 permissions.
However, when running
go buildin the container, naturally, the user is no longer root at this time, and one sees frequent issues in the form of:
because the root-owned file is obviously not writable to the user.
I was very surprised to see there was no documentation of this type of file available anywhere. I would like to suggest that, for example this page would explain the purpose and functioning of these files, to provide insight into errors such as these, so they can be resolved. Alternatively, I would also welcome a suggested workflow change, to make these files no longer a problem, such that they can stay implementation details that can be disregarded by the user.
The text was updated successfully, but these errors were encountered: