After a bug in Inedo Proget with Kaniko and the auth method, we have opened an issue and they quickly released a fix (Proget v5.2.22) :
- FIX: Docker API treats /v2/ endpoint differently than other endpoints for HTTP Basic authentication
- FIX: ProGet misdetects some Docker auth token requests as anonymous
Here is the doc I wrote to help them reproduce the bug.
Download and run a shell in the kaniko container :
docker run -it --entrypoint=/busybox/sh gcr.io/kaniko-project/executor:debug
In the container’s shell, make a src folder
mkdir /src
cd /src
Create a simple Dockerfile
FROM alpine:3.10
RUN apk --no-cache add bash \
ca-certificates \
git \
openssh-client
Create the file /kaniko/.docker/config.json
with :
{
"auths": {
"myprogetserver": {
"username": "myusername",
"password": "mypassword"
}
}
}
Then run the kaniko command to build and push the container :
/kaniko/executor --context "/src" --dockerfile "/src/Dockerfile" --destination "myprogetserver:443/myfeed/testme:latest"