Re: [go-nuts] Re: VCS Stamping - How To Use It? How to debug failures?

2024-05-13 Thread Adam Kaplan
I forgot to add one more detail - the go-toolset image defaults to running as user "default" (UID 1001). Adding `USER root` right after the `FROM` declaration is another way to work around the issue I described, but from a security perspective I would advise against it. On Mon, May 13, 2024 at 12

Re: [go-nuts] Re: VCS Stamping - How To Use It? How to debug failures?

2024-05-13 Thread Adam Kaplan
Great suggestion Jason - adding `git status` took me in a very unexpected direction, and ultimately a solution. tl;dr if your build's base container image does not use root/uid 0, git commands won't work unless you add the `--chown=` flag to your `COPY` instruction. Go builds need this if you want

[go-nuts] Re: VCS Stamping - How To Use It? How to debug failures?

2024-05-11 Thread Jason E. Aten
> how can developers debug and find the root cause? If it was me, I would start by going into the container (whatever the podman equivalent of docker exec -it containernumber bash) and try to run 'git status' or 'git log' and see why the git query is giving an error. You could also try strace