Docker Community Forums

Share and learn in the Docker community.

Unable to run any self built application on busybox


(Eva0147) #1

Hello everyone,

I’m new to Docker, so it might be a very basic problem.

The board I’m using to run Docker is with arm64 cpu.

First I run and attach a container with busybox by:
docker run -it arm64v8/busybox

And on the host, I copy the lighttpd which I built somewhere else into the container.(This lighttpd functions well on the host device.)
docker cp lighttpd blissful_mayer:/

Inside the container, I can see the lighttpd exists by ls -l
/ # ls -l
total 204
drwxr-xr-x 2 root root 26168 Oct 1 22:13 bin
drwxr-xr-x 5 root root 0 Nov 5 03:05 dev
drwxr-xr-x 3 root root 760 Nov 5 03:05 etc
drwxr-xr-x 2 nobody nogroup 160 Oct 1 22:14 home
-rwxr-xr-x 1 root root 206968 Nov 2 06:03 lighttpd
dr-xr-xr-x 172 root root 0 Nov 5 03:05 proc
drwx------ 2 root root 232 Nov 5 03:08 root
dr-xr-xr-x 12 root root 0 Nov 5 03:05 sys
drwxrwxrwt 2 root root 160 Oct 1 22:13 tmp
drwxr-xr-x 3 root root 224 Oct 1 22:14 usr
drwxr-xr-x 4 root root 288 Oct 1 22:14 var

So I run lighttpd by either /lighttpd or ./lighttpd, both of them show
/ # /lighttpd
sh: /lighttpd: not found
or
/ # ./lighttpd
sh: ./lighttpd: not found

I have totally no idea what’s going on, cuz this lighttpd works well on host device. Since host and docker share the same cpu, the result doesn’t make sense to me.