Build binary statically with CGO disabled
@@ -71,7 +71,7 @@ jobs:
- run: curl -L -s https://github.com/golang/dep/releases/download/v0.3.2/dep-linux-amd64 -o /go/bin/dep && chmod +x /go/bin/dep
- run: go get -u golang.org/x/tools/cmd/goimports
- run: dep ensure -vendor-only
- - run: GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/ory/oathkeeper/cmd.Version=`git describe --tags` -X github.com/ory/oathkeeper/cmd.BuildTime=`TZ=UTC date -u '+%Y-%m-%dT%H:%M:%SZ'` -X github.com/ory/oathkeeper/cmd.GitHash=`git rev-parse HEAD`" -o oathkeeper-docker-bin
+ - run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags "-s -X github.com/ory/oathkeeper/cmd.Version=`git describe --tags` -X github.com/ory/oathkeeper/cmd.BuildTime=`TZ=UTC date -u '+%Y-%m-%dT%H:%M:%SZ'` -X github.com/ory/oathkeeper/cmd.GitHash=`git rev-parse HEAD`" -installsuffix cgo -o oathkeeper-docker-bin
- run: docker build -f Dockerfile -t oryd/oathkeeper:$CIRCLE_TAG .
- run: docker login --username "$DOCKER_USERNAME" --password "$DOCKER_PASSWORD"
- run: docker push oryd/oathkeeper:$CIRCLE_TAG
