Skip to content

Commit

Permalink
golang-crossbuild: set the user/group
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Jan 12, 2023
1 parent 3cbbb8a commit b32084d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dev-tools/mage/crossbuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@ func (b GolangCrossBuilder) Build() error {
args = append(args,
"--env", "EXEC_UID="+strconv.Itoa(os.Getuid()),
"--env", "EXEC_GID="+strconv.Itoa(os.Getgid()),
// Force the user/group to match the one from the host
// See https://github.com/elastic/golang-crossbuild/issues/232
"--user", strconv.Itoa(os.Getuid())+":"+strconv.Itoa(os.Getgid()),
)
}
if versionQualified {
Expand Down

0 comments on commit b32084d

Please sign in to comment.