Docker build from private repository

Hi All,

I am creating a docker file where im fetching the image from private registry. is there a way to access the image with credentials inside docker file? How should I do that? I read that there is an option that it can be achieved by access token but I don’t know how.

I’m new to docker. Please help.
Thanks and regards
Dave

There is neither a special argument, nor a Dockerfile instruction. You just need to login to the registry: