Skip to content

Commit

Permalink
Build binary statically with CGO disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
arekkas committed Nov 6, 2017
1 parent 9e24888 commit 6dd3761
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6dd3761

Please sign in to comment.