That is quite helpful. I got some error message. Interestingly, that did not stop the whole process. I will dig from here.
\ Starting preloader container
\ Fetching application KioskTraceback (most recent call last):
File "/usr/src/app/preload.py", line 774, in <module>
PARTITIONS_CACHE[None] = prepare_global_partitions()
File "/usr/src/app/preload.py", line 76, in prepare_global_partitions
return get_partitions(IMAGE)
File "/usr/src/app/preload.py", line 65, in get_partitions
return {p.label: p for p in PartitionTable(image).partitions if p.label}
File "/usr/src/app/preload.py", line 368, in __init__
sfdisk("--dump", "--json", image).stdout.decode("utf8")
File "/usr/lib/python3.6/site-packages/sh.py", line 1427, in __call__
return RunningCommand(cmd, call_args, stdin, stdout, stderr)
File "/usr/lib/python3.6/site-packages/sh.py", line 774, in __init__
self.wait()
File "/usr/lib/python3.6/site-packages/sh.py", line 792, in wait
self.handle_command_exit_code(exit_code)
File "/usr/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /sbin/sfdisk --dump --json /img/resin.img
STDOUT:
STDERR:
sfdisk: cannot open /img/resin.img: Not a tty
- Cleaning up temporary files
The device type is ARMv7hf, the command was run on Ubuntu x64.
Apologies for the multiple questions. Could you also let us know the current version of Docker that you’re using? We’re trying to ascertain what might be causing these problems so need to keep looking at different components.
Not quite sure about the first resin.img part. PATH_TO_YOUR_IMAGE:/resin.img, what does it mean? I replaced it with my output name (./kiosk.img), and got:
You should use the absolute path to the image, like docker run --rm -v /absolute/path/to/kiosk.img:/resin.img resin/resin-preload sfdisk --dump --json /resin.img
I think I get it. My output image (kiosk.img) was zero sized. If I filled it with some random data, the “not a tty” error was gone. I got “sfdisk: failed to dump partition table: No error information” instead, which apparently related to the image file.
I think preload command requires a working image as input, not as I thought, an image creating tool.
@magicloud, yes you are correct the preloader is not an image creating tool, but rather a tool for injecting docker images into a resinOS images so that they boot on initial provisioning.