Comments (4)
it took me a lot of failures to notice that you put a typo in your command that I just copy pasted
🤦♂️
Thanks for following up. Sorry about that 😄
from ko.
Hey, sorry I've been on vacation 🛳 🇲🇽 🌴 🌮
I'm guessing this is because you need CGO_ENABLED=1
and we default to disabling it: https://github.com/google/ko/blob/1c54dd6b3e5e9821467778f49c208a68ef00b1a5/pkg/build/gobuild.go#L171
The reason we do that is because we default to a base image that doesn't include libc to keep images as small as possible: https://github.com/google/ko/blob/1c54dd6b3e5e9821467778f49c208a68ef00b1a5/pkg/commands/config.go#L76
You can override the base image (try gcr.io/distroless/base
) we use and override CGO_ENABLED by just setting it in your environment:
CGO_ENABLED=1 ko publish ./cmd/websocketsource/
Let me know if that helps, we should probably document this somewhere 😅
from ko.
Nice, thanks I'll look into these as soon as I have the time. Hope you had a great vacation. :)
from ko.
Sorry I took so long, it worked in the end but it took me a lot of failures to notice that you put a typo in your command that I just copy pasted. (Correct version: CGO_ENABLED=1 ko publish ./cmd/websocketsource/
)
To be fair G and C are quite similar. ¯_(ツ)_/¯
from ko.
Related Issues (20)
- Provide write permissions to container FS to golang app running in a distroless container HOT 3
- Push an image with specific version number instead of latest? HOT 2
- feat: custom URL for fetching latest ko binary HOT 2
- option to set image annotations HOT 1
- binary name for v2+ modules HOT 1
- Documentation mistake HOT 3
- Install instructions on website are broken HOT 1
- Non docker desktop support HOT 1
- Skip go build if no files have changed since a previous build HOT 2
- Define enviroment variables for built image HOT 1
- Building KO containers for linux/riscv64 does not work HOT 1
- Unable to run git commands inside container image HOT 7
- What controls the container images CREATED TIME of ko build? HOT 1
- any webui? HOT 2
- Entrypoint, Cmd configuration overrides HOT 1
- OrbStack support on MacOS HOT 2
- intermittent cache? failures running ko apply HOT 10
- x509 cert works locally, but not in ko container HOT 1
- ko doesn't work with toolchain directive in go.mod HOT 6
- [Fly.io] Image does not need to be public HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ko.