lukechilds / dockerpi

A Virtualised Raspberry Pi inside a Docker image
MIT License
1.85k stars 191 forks source link

A regular file was expected by the 'file' driver, but something else was given #17

Open EinSoldiatGott opened 4 years ago

EinSoldiatGott commented 4 years ago

Hi, I have the image lukechilds/dockerpi:vm And the image 2020-08-20-raspios-buster-armhf-lite.img

I'm running the command like this: docker run -it -v 2020-08-20-raspios-buster-armhf-lite.img:/sdcard/filesystem.img lukechilds/dockerpi:vm

But I get this error

C:\Users\usr\Downloads\2020-08-20-raspios-buster-armhf-lite>docker run -it -v 2020-08-20-raspios-buster-armhf-lite.img:/sdcard/filesystem.img lukechilds/dockerpi:vm

Booting QEMU machine "versatilepb" with kernel=/root/qemu-rpi-kernel/kernel-qemu-4.19.50-buster dtb=/root/qemu-rpi-kernel/versatile-pb.dtb
qemu-system-arm: --drive format=raw,file=/sdcard/filesystem.img: A regular file was expected by the 'file' driver, but something else was given

Is my raspbian image so new that is not supported?

Thanks

drewgonzales360 commented 4 years ago

I ran into this issue too. My fix was that when you pass a full path to -v, it'll just do the file and won't try to mount a directory. Try putting the entire absolute path for your image as an argument.

docker run -it -v $(pwd)/2020-08-20-raspios-buster-armhf-lite.img:/sdcard/filesystem.img lukechilds/dockerpi:vm

docker run -it -v /path/from/root/2020-08-20-raspios-buster-armhf-lite.img:/sdcard/filesystem.img lukechilds/dockerpi:vm

duganth commented 3 years ago

@drewgonzales360 thanks for the tip worked well!