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

Build nonolithic version #21

Open
Yamakasi opened this issue Mar 9, 2022 · 3 comments
Open

Build nonolithic version #21

Yamakasi opened this issue Mar 9, 2022 · 3 comments

Comments

@Yamakasi
Copy link

Yamakasi commented Mar 9, 2022

Hi,

Is there a way to build a monolithic version of this app so you simply can copy over the binary instead of all your code like it's done now in the Dockerfile ?

Would be great to know what can be excluded from /app in that case.

Thanks!

@suquant
Copy link
Owner

suquant commented Mar 16, 2022

Hi, @Yamakasi

Tbh, it is contain only binary files, so in another word, it's already monolithic.

@Yamakasi
Copy link
Author

@suquant When I build it on an Ubuntu machine and copy it over to an Alpine one with go installed I get "... not found" so something is not right. When I build it again in this same Alpine container it's all working fine.

@suquant
Copy link
Owner

suquant commented Nov 9, 2023

Hey @Yamakasi ,

This problem is likely due to the different base libraries used in Ubuntu and Alpine. Alpine uses musl libc instead of the glibc that Ubuntu uses, so a binary compiled on Ubuntu might not be compatible with Alpine's environment.

To solve this, you have a couple of options:

  • Use Pre-built Binaries: You can directly use the binaries from the latest release available on our GitHub page: WGRest Releases. These are compiled to be more universally compatible, so you should be able to deploy them in your Docker image on Alpine without the "not found" error.

  • Build on Alpine: As you've noticed, building the binary directly on Alpine resolves the issue. This ensures that the binary is compatible with the Alpine environment. You can incorporate this step into your Dockerfile for a more seamless deployment process.

Incorporating either of these approaches should resolve the compatibility issue you're facing.

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

No branches or pull requests

2 participants