appsody / controller

Appsody controller running in the development container. This repo will be archived soon.
https://appsody.dev
Apache License 2.0
2 stars 12 forks source link

Build process should set CGO_ENABLED=0 #45

Closed chilanti closed 5 years ago

chilanti commented 5 years ago

Describe the bug Travis builds on Linux, and set CGO_ENABLED=1 by default. This makes the controller non-runnable on several popular Linux Docker images, such as alpine and busybox.

To Reproduce Steps to reproduce the behavior: See: https://github.com/appsody/appsody/issues/531

chilanti commented 5 years ago
.PHONY: build
build: ## Build binary for linux stores it in the build/ dir
    GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o $(BUILD_PATH)/$(COMMAND) -ldflags "-X main.VERSION=$(VERSION)"

Adding CGO_ENABLED=0 should suffice.