mattmoor/mink

better kaniko default context

jstrachan opened this issue · 1 comments

right now the kaniko context is hard coded as the root dir

- --context=/workspace

if you had a repo with a few different microservices with their own Dockerfile....

/workspace/
  hello-nodejs/
    Dockerfile
  hello-go/
    Dockerfile

and those dockerfiles did the usual COPY *.json somewhere type commands they won't find anything, as the context is /workspace not where the Dockerfile is at /workspace/hello-nodejs

Setting the --context to the folder containing the Dockerfile feels like a better OOTB default to me.

Maybe the default behaviour should be, if there is a provided --context argument for kaniko use that - otherwise default to the same dir as the Dockerfile (e.g. /workspace/$(params.path)) . Then folks can specify --context /workspace if they really want that behavior; or can specify --context /workspace/something if needed; otherwise default to the context folks would probably expect (the dir containing the Dockerfile)

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.