Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create static binary for both amd64 and arm64 #79

Open
jorgebay opened this issue Oct 24, 2022 · 0 comments
Open

Create static binary for both amd64 and arm64 #79

jorgebay opened this issue Oct 24, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@jorgebay
Copy link
Contributor

jorgebay commented Oct 24, 2022

We should provide static binaries of PolarStreams and document how to install it manually on a linux instance.

To support both amd64 and arm64 we could build them inside containers and then copy them using:

docker create --name dummy IMAGE_NAME
docker cp dummy:/path/to/file /dest/to/file
docker rm -f dummy

On amd64, we can just disable CGO_ENABLED:

CGO_ENABLED=0 go build -ldflags '-s -linkmode external -extldflags=-static' .

But arm64 requires musl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant