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

Use ko to build container image #19

Merged
merged 1 commit into from
Aug 19, 2021
Merged

Use ko to build container image #19

merged 1 commit into from
Aug 19, 2021

Commits on Aug 19, 2021

  1. Use ko to build container image

    `ko` is a tool that can build and deploy k8s resources that reference
    go paths which are build and transparently substituted into the
    resulting resources.
    
    ko works by finding `ko://` references in the k8s yaml that point at a
    go compile target, the built binary is placed into the base image and
    pushed to an image registry specified by the KO_DOCKER_REPO env var. A
    digested reference to the pushed image is substituted into the yaml
    replacing the `ko://...` reference.
    
    https://github.com/google/ko
    
    In this case, we can replace direct dependencies on the kubectl and
    docker CLIs and the Docker daemon. ko also makes it much easier to
    produce multi-platform/architecture images for which there is a
    compatible base image (gcr.io/distroless/static:nonroot by default) and
    can be cross compiled by go.
    
    Signed-off-by: Scott Andrews <andrewssc@vmware.com>
    scothis committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    418c364 View commit details
    Browse the repository at this point in the history