-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example building a docker image with Kaniko #312
Conversation
* | ||
* You need to create a jenkins-docker-cfg secret with your docker config | ||
* as described in | ||
* https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-secret-in-the-cluster-that-holds-your-authorization-token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those instructions are specifically for pulling images used by a pod
- not for pushing to a registry. I had to use the following secret
configuration to make sure the Docker credentials were placed in ~/.docker/config.json
:
...
volumeMounts:
- name: jenkins-docker-cfg
mountPath: /root/.docker
volumes:
- name: jenkins-docker-cfg
secret:
secretName: jenkins-docker-cfg
items:
- key: .dockerconfigjson
path: config.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tried, but I assumed it was the same format, will take a look.
This I have tried GoogleContainerTools/kaniko#129
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Figured it out, the docker-registry secret type crates a .dockercfg file that needs to be put in root
It does not create the new .docker/config.json format
The docker-registry secret type crates a .dockercfg file that needs to be put in root It does not create the new .docker/config.json format
spec: | ||
containers: | ||
- name: kaniko | ||
image: csanchez/kaniko:jenkins # we need a patched version of kaniko for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carlossg Is this because of GoogleContainerTools/kaniko#129 or something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, need cat and nohup in the image https://github.com/carlossg/kaniko/blob/jenkins/deploy/Dockerfile_jenkins
Are you sure that
|
coreutils contents show nohup in
|
fixed and image is building in dockerhub |
The docker-registry secret type crates a .dockercfg file that needs to be put in root It does not create the new .docker/config.json format
The docker-registry secret type crates a .dockercfg file that needs to be put in root It does not create the new .docker/config.json format
The docker-registry secret type crates a .dockercfg file that needs to be put in root It does not create the new .docker/config.json format
No description provided.