asked on
Help with an error building a Docker image - failed to read dockerfile: open /var/lib/ ...
I am learning Docker and trying to follow along a tutorial, but getting the following error when I try to build a docker image.
=> [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 2B 0.0s failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount251726823/Dockerfile: no such file or directory
PS C:\Users\drfah\OneDrive\Documents\WPF\nodejs-app-starting-setup>
I am sure that I have correctly named the docker file as Dockerfile and the docker file is in the main project folder. I would appreciate help.
Might be someone can glance at the tutorial + mention how to fix the problem you're seeing.
Note the path in question, listing error, is using the Linux "/" separator rather than Windows "\" separator.
I only use Linux + OSX, so unsure how paths might be normalized using Linux Docker config files on Windows.
Tip: Docker... is by no means a trivial system to learn...
If you're learning Docker to increase your income, best use a Linux system for learning.
Windows != Linux
Trying to run Docker or LXD on Windows...
Can it be done? Yes!
Will your Windows Docker Adventure leave you curled up in a fetal position... in a dark corner... contemplating eating your gun? Probably.
If you're learning Docker as a lark, Windows is fine.
If you'd like to boost your income by being a Docker expert, lease a public Linux server for your work.
Take a look at OVH/SoYouStart/KimSifu... all the same company... Price points from $5/USD/month to $1000s/USD/month.
Another tip... Work on Docker/LXD in BASH on the command line, as GUIs tend to obfuscate errors... where you have to go digging through logs, whereas BASH vomits everything to STDOUT/STDERR... so usually... when problems occur, the reason is clear.