Skip to content

Conversation

@eternal-flame-AD
Copy link
Member

Fixes #17

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
@@ -1,4 +1,4 @@
PROJECT=gotify/build
PROJECT=docker.io/gotify/build
GO_VERSION?=$(shell cat GO_VERSION)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: I'll wait on musl support for the next gotify/server release.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eternal-flame-AD FYI: I'll create a release today, as the new plugin support probably will take some time to fully work.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay!

ENV CGO_ENABLED=1
ENV GOOS=linux
ENV GOARCH=amd64
ENV GO_EXTRA_LDFLAGS="-linkmode external -extldflags '-static'"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a standard Go environment variable correct? I think I'll wait for the gotify/server changes required to make this work. Without the big picture this is difficult to review.

Copy link
Member Author

@eternal-flame-AD eternal-flame-AD Aug 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we have to add this to the Makefile. My testing is simply add this to DOCKER_GO_BUILD and it builds correctly.

If you agree with the plugin transition I think let's just get the plugin issue out of the way first to fix the documentation issue, I tried finding a way to query at runtime whether the program is statically linked it isn't that simple, I don't want to add a permanent magic linker flag to solve a temporary problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Make a statically linked build

3 participants