I have a Go program that I need to link against multiple C libraries in order to compile. I am setting the CFLAGS and LDFLAGS through #cgo directives which works nicely. My problem is that I would like to run my go builds (and test, etc...) inside a docker container so I can put the C include/library files in the docker container and make repeatable builds. This approach also enables me to update the C include/library files without having to update each of my build machines. I have written my own custom tool that encapsulates alot of the functionality of go build/test by taking command line arguments, starting the build process inside a docker container and then passing those command line arguments through to go build/test. However this has the drawback of being custom code, bugs, and it will have to be completely re-worked to work with go modules. I know there is a Go docker image at: https://hub.docker.com/_/golang but it looks like that does not play nicely with GOCACHE and I need the GOCACHE to work because my builds are rather large.
Has anyone else had similar problems of trying to build Go applications inside custom docker containers? What were your solutions? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.