openwrt / docker

Docker containers of the ImageBuilder and SDK
GNU General Public License v2.0
495 stars 78 forks source link

Run external binary #66

Open mjshin opened 4 years ago

mjshin commented 4 years ago

Hello all,

I pulled openwrtorg/rootfs and ran it like this docker run --rm -it -v /home/mjshin/MyCode:/tmp openwrtorg/rootfs

In /tmp, I tried to run my own linux based application but it could not work well. root@ca16d6d79408:/tmp# ls -al hello -rwxrwxr-x 1 1000 1000 16688 Sep 20 03:16 hello root@ca16d6d79408:/tmp# ./hello /bin/ash: ./hello: not found root@ca16d6d79408:/tmp#

What was wrong in my case ?

Thanks, Myungjoon

aparcar commented 4 years ago

OpenWrt uses musl rather than glibc, are you sure you compiled your binary correctly? Generally it is possible to run binaries like that.