Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
If your goal is small containers though, try google's distroless setup. They're going to be smaller than alpine's and Go is well documented and supported.
There are some subtle things that could be different. For instance I hit this one, where getting the current user without HOME and USER variables being set will fail: https://github.com/golang/go/issues/31949
With CGO_ENABLED=0 you got a staticaly-linked binary (see: https://en.wikipedia.org/wiki/Static_build) so it will run without any external dependencies (you can buld your dockers from 'scratch' image) Like that: https://github.com/s0rg/microapp/blob/master/Dockerfile
Related posts
- What is the point of this pattern where an exported method only directly calls another non-exported method with completely the same signature?
- Building a Playful File Locker with GoFr
- Fastest way to get IPv4 address from string
- We now have crypto/rand back ends that ~never fail
- Go's Error Handling Is Perfect