Giter Club home page Giter Club logo

Comments (4)

jonjohnsonjr avatar jonjohnsonjr commented on May 18, 2024 1

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.

jonjohnsonjr avatar jonjohnsonjr commented on May 18, 2024

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.

Kuvesz avatar Kuvesz commented on May 18, 2024

Nice, thanks I'll look into these as soon as I have the time. Hope you had a great vacation. :)

from ko.

Kuvesz avatar Kuvesz commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.