coder / envbuilder

Build development environments from a Dockerfile on Docker, Kubernetes, and OpenShift. Enable developers to modify their development environment quickly.
Apache License 2.0
123 stars 24 forks source link

migrate to upstream kaniko #198

Closed johnstcn closed 2 months ago

johnstcn commented 3 months ago

We are currently on a fork of github.com/GoogleContainerTools/kaniko (github.com/coder/kaniko).

Our fork includes some extra changes that are not included in upstream Kaniko:

mafredri commented 3 months ago

@johnstcn with 43b5b373864247394c3204ac34342ee802d1ce9a, is the only remaining issue the output capture?

Would it be feasible to run Kaniko as an external program and capture the output that way? Or are we tweaking the behavior in a way that can't be adjusted via env/flags?

I think it's still valuable if we can embed Kaniko, but that's quite easily achieved via:

import (
    "os"

    "github.com/GoogleContainerTools/kaniko/cmd/executor/cmd"
)

func main() {
    if err := cmd.RootCmd.Execute(); err != nil {
        os.Exit(1)
    }
}

The benefit of this would be that we can support both modes of operation, external or embedded Kaniko.

johnstcn commented 3 months ago

I believe that's the only reason. I think the change you propose is possible as a refactor.

mafredri commented 3 months ago

Alright, thanks for confirming. OTOH, with #124 we'll be still need to maintain a fork. 😅

johnstcn commented 2 months ago

We'll need to stay on our own fork for the foreseeable future.