wgrest
wgrest copied to clipboard
Build nonolithic version
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!
Hi, @Yamakasi
Tbh, it is contain only binary files, so in another word, it's already monolithic.
@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.
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.