0

I am starting with Docker. So as I learned the image is directory with dockerfile which contains docker directives to make docker container...

But if I try to run external image from Docker hub via e.g. docker run wordpress:php7.4 I can not find the destination folder with dockerfile. I found answers like C:/users/public/public documents/Hyper V/Virtual hard disks/ but his folder is empty. There is no folder nor dockerfile. So the question is simple: Where I can find the dockerfile of downloaded images? Thanks a lot.

3
  • You won’t find them in the Windows file system. Try the following command in Command Prompt or PowerShell: wsl --list --verbose. Please provide the output in your question.
    – Daniel B
    Commented Jan 18, 2021 at 10:45
  • wsl --list --verbose result is in the question.
    – Čamo
    Commented Jan 18, 2021 at 11:59
  • Sorry, I misread your question. Still, in case you’re interested: This answer on SO shows where the underlying Hyper-V disk images are located.
    – Daniel B
    Commented Jan 18, 2021 at 12:38

1 Answer 1

1

But if I try to run external image from Docker hub via e.g. docker run wordpress:php7.4 I can not find the destination folder with dockerfile [...]

So the question is simple: Where I can find the dockerfile of downloaded images?

You're mistaken that docker run or docker pull gets you the Dockerfile - they will only pull down the required layers of the image. If you need the Dockerfile, you have to either look for the Dockerfile published on their source code repos.

You could theoretically do a docker inspect <name> and deduce what possibly could have been used to build the image but that's not really a thing for new users and neither will it give you all the details

1
  • Hmm it make sense now. The tutorial youtube.com/watch?v=3c-iBn73dDE shows the examples with docker run and the example with Postrgess:9.6 image requires the password which I can not find where to set up. In video everything works without the problem but not on my PC.
    – Čamo
    Commented Jan 18, 2021 at 12:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .