0

Is there a way to specify a private docker image? I can't seem to find any reference for it.

Dockerfile looking something like:

FROM myprivate_registry/myprivate_image

If not, is the only way to do this by caching the parent image locally first, and then referring to it in the FROM statement?

Update: my question is about specifying a private image in the Dockerfile, not pulling from a private registry.

sargeMonkey
  • 606
  • 1
  • 7
  • 23
  • 2
    Possible duplicate of [User docker-compose to pull images from private repository](https://stackoverflow.com/questions/45567201/user-docker-compose-to-pull-images-from-private-repository) – callmemath Mar 26 '19 at 22:17
  • 2
    Yes that is possible, have you tried it? – Samuel Philipp Mar 26 '19 at 22:19
  • tried it, doesnt work with private images. building the dockerfile just says it cannot find the image, and to make sure Im logged in (which I am). The only way this works is if I refer to a public image in FROM – sargeMonkey Mar 27 '19 at 18:28
  • @sargeMonkey are you using BuildKit? What version of docker? – BMitch Mar 27 '19 at 18:42
  • Docker Desktop on windows, Version 2.0.0.3 (31259). I'm not familiar with BuildKit – sargeMonkey Mar 28 '19 at 09:57

0 Answers0