Open salaboy opened 1 year ago
This can also be solved by extending the task with the DOCKER_CONFIG parameter.. which allows us to set up the path for the .docker/config.json file, still we will need to rename the file to config.json
What is the status here? How's this not solved yet?
It has not been solved yet because of maintainers time. Essentially, the idea would be to bump the Task
to a 0.2 and use scripts to do something similar to what we do here.
For what is worth, I created a Task
that is an "evolution" of the ko
Task present here : https://github.com/shortbrain/golang-tasks/tree/main/go-ko-image.
Similar issue with creating vaultstaticsecret type .dockerconfigjson does not allow key config.json
but only supports .dockerconfigjson.
I tried the above manipulation in the task to rename to config.json but it does not validate auth while pushing.
Expected Behavior
The
ko
task should use the.dockerconfigjson
to set credentials forko
When creating a secret with:
You get a secret with
spec.data
->.dockerconfigjson
notconfig.json
. This causesko
to not know which credentials to use.This requires the tekton
ko
tasks to rename and move the.dockerconfigjson
mounted into a volume to~/.docker/config.json
Actual Behavior
It looks for a
config.json
key inside the secretSteps to Reproduce the Problem
ko
task to publish a container to docker hubAdditional Info
This kind of issues are really frustrating for newbies and also for experienced people .. it is not easy to debug. Related to this issue, is the fact that if any of the credentials have sensitive characters like
$
when creating the secret these characters will not be escaped and they will fail the encoding leading to situations where the credentials sent to docker hub are wrong. It might be good to have some docs around that to save people time.