I have a statically built go binary with cgo deps (wellington/go-libsass) 
which I'm trying to speed up the rebuild time for.

This is run within a docker image because so the statically compiled binary 
will run as it's own base image on docker.

The docker image the build is run within is:
FROM golang:1.8-alpine


# We need g++ for libraries like libsass
RUN apk --no-cache add g++ icu-libs make

This is the build command for the project:
go install -installsuffix docker \
-v --tags netgo --ldflags '-extldflags "-lm -lstdc++ -static"' \
org/project

Running this within the same docker instance first speeds up the build:

go install -installsuffix docker \
-v --tags netgo --ldflags '-extldflags "-lm -lstdc++ -static"' \
github.com/wellington/go-libsass


But running that doesn't speed up the overall build process as  the next 
time I run a new docker container, same folder on the host, and try to 
build the project without changing any files then it takes the full time 
again.

What could cause go install to disregard this separate build done?

Best,
James

-- 
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.

Reply via email to