knative / build-templates

A library of build templates.
Apache License 2.0
184 stars 68 forks source link

Explicitly set DOCKER_CONFIG in the kaniko build template. #87

Closed dlorenc closed 5 years ago

dlorenc commented 5 years ago

This resolves Kaniko issue #392 and knative/build issue #414. At some point, Kaniko started explicitly setting DOCKER_CONFIG so google/go-containerregistry would use the injected credential helpers. This behavior is ideal in some cases, but inside knative we want to use the auto-injected auth token directly.

mattmoor commented 5 years ago

/assign @evankanderson

Does this work for you?

knative-prow-robot commented 5 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dlorenc, ImJasonH

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/knative/build-templates/blob/master/OWNERS)~~ [ImJasonH] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
evankanderson commented 5 years ago

I'll check this tonight, thanks!

evankanderson commented 5 years ago

Yes, adding this env var worked for me. (https://github.com/evankanderson/pyfun/blob/master/packaging/build-template.yaml has a copy of the kaniko build template here, which is what I tested.)