~fhusson

Building a Docker container in Docker with Kaniko and push it to Proget

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) :

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"
Discuss on Twitter