mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-22 07:51:01 +02:00
build consistent statically linked binary for docker image
* use golang 1.10.1 images everywhere * introduce a `static-linux` target to build a statically linked 64-bit binary only * use that binary for the official image and the circle build and tests * use a multi-stage dockerfile for a consistent build environment
This commit is contained in:
@@ -29,6 +29,10 @@ cross:
|
||||
gox -os '!freebsd !netbsd' -arch '!arm' -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" -ldflags '-X main.Version=${TAG}' ${TARGETS}
|
||||
.PHONY: cross
|
||||
|
||||
static-linux:
|
||||
env CGO_ENABLED=0 gox -osarch="linux/amd64" -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" -ldflags '-X main.Version=${TAG}' ${TARGETS}
|
||||
.PHONY: linux
|
||||
|
||||
clean:
|
||||
rm dist/helmfile_*
|
||||
.PHONY: clean
|
||||
@@ -41,7 +45,7 @@ release: pristine cross
|
||||
@ghr -b ${BODY} -t ${GITHUB_TOKEN} -u ${ORG} -recreate ${TAG} dist
|
||||
.PHONY: release
|
||||
|
||||
image: cross
|
||||
image:
|
||||
docker build -t quay.io/${ORG}/helmfile:${TAG} .
|
||||
|
||||
run: image
|
||||
|
||||
Reference in New Issue
Block a user