Private registry in Dockerfile

199 views
Skip to first unread message

cor...@gmail.com

unread,
Aug 21, 2018, 7:55:34 AM8/21/18
to kaniko-users
Hi,

Is there a way to set a different docker registry to be used when pulling images (while building from a Dockerfile) ?
We have a Dockerfile like this:

FROM ns1/el7base:latest
...

The kaniko executor automatically tries docker.io but I would like to pull this image from a private local registry. I've tried setting auth in .docker/config.json but it doesn't help for image pulls.

Thank you!

Tariq Islam

unread,
Aug 25, 2018, 8:55:21 PM8/25/18
to kaniko-users
Have you tried providing a fully qualified name for the image? Something like FROM gcr.io/my-project/el7base:latest?

You would need to provide kaniko with auth into the registry if it's private via a service account.

Ed

unread,
Nov 1, 2021, 5:19:46 AM11/1/21
to kaniko-users
Hello,
Can you give some example of how to implement auth via sa? Any link with a reference?

thank you
Reply all
Reply to author
Forward
0 new messages