You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had searched in the issues and found no similar feature requirement.
Description
When compiling skywalking-rover, add buildvcs=false to prevent compilation failures caused by Git in container environments. Additionally, include the flags -tags osusergo,netgo to achieve fully static compilation, avoiding runtime issues caused by incompatible versions of the glibc library.
For buildvcs=false, could you describe the scenario when it would cause failure? We already use volume mount when building the binary in the container.
For buildvcs=false, could you describe the scenario when it would cause failure? We already use volume mount when building the binary in the container.
Many scenarios could lead to issues, such as the code directory not being set as a safe.directory, a change in the directory owner. Or the presence of a .git directory in a parent directory, or corruption of the .git directory itself. In short, setting this causes no harm and helps avoid unnecessary compilation failures.
Based on my actual execution of the ldd command, it does not appear to be as you described.
If go tags are added, it becomes noticeably different.
$ ldd bin/skywalking-rover-latest-linux-amd64
not a dynamic executable
Setting ENV CGO_ENABLED=0 has no effect on Docker's RUN command. Moreover, if CGO_ENABLED=0 is added to the compilation command, importing "c" will result in a compilation failure.
Many scenarios could lead to issues, such as the code directory not being set as a safe.directory, a change in the directory owner. Or the presence of a .git directory in a parent directory, or corruption of the .git directory itself. In short, setting this causes no harm and helps avoid unnecessary compilation failures.
Make sense to me, please add this parameter.
Setting ENV CGO_ENABLED=0 has no effect on Docker's RUN command. Moreover, if CGO_ENABLED=0 is added to the compilation command, importing "c" will result in a compilation failure.
Then, we should consider why the CGO_ENABLED is not working?
Search before asking
Description
When compiling skywalking-rover, add
buildvcs=false
to prevent compilation failures caused by Git in container environments. Additionally, include the flags-tags osusergo,netgo
to achieve fully static compilation, avoiding runtime issues caused by incompatible versions of the glibc library.For more infomation, see:
Use case
No response
Related issues
No response
Are you willing to submit a pull request to implement this on your own?
Code of Conduct
The text was updated successfully, but these errors were encountered: