Would it be possible to run the Mender client inside a docker container that runs in privileged mode ? The container could access /dev and other requirements. Mender would on an x86 board with grub as bootloader and in standalone mode.
Hi @Dewey, I’m not aware of anyone having tried this but as long as the client has block-level access to the device nodes, proper mounts of /usr/share/mender, and the ability to run fw_printenv and fw_setenv, I see no reason it wouldn’t work. Please let us know if you try it, and what requirements the container must have if there are more than listed above.
Drew
However, when calling “./mender”, I get the following error:
bash: ./mender: No such file or directory
To get the mender binary, I simply copied it from the host device to the docker filesystem, may it be the problem ? Should I recompile the client from sources ?
Yes, I did it that way (inside the container) and it did not resolve the problem:
root@1152740f5ef8:/usr/bin# chmod +x mender
root@1152740f5ef8:/usr/bin# ls -lash mender
7.8M -rwxr-xr-x 1 root root 7.8M Jun 25 11:21 mender
root@1152740f5ef8:/usr/bin# ./mender
bash: ./mender: No such file or directory
Running strace does not provide more information:
root@1152740f5ef8:/usr/bin# strace ./mender
execve("./mender", ["./mender"], 0x7fff3b10c3d0 /* 9 vars */) = -1 ENOENT (No such file or directory)
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
write(2, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
) = 40
getpid() = 58
exit_group(1) = ?
+++ exited with 1 +++