The Alpine image uses busybox
, and there is no shell in busybox since it isn't really meant for humans.
For your information replace
CMD ["/setup.sh"]
by:
CMD /bin/busybox ls -al /bin
You get:
lrwxrwxrwx 1 root root 12 Jan 9 19:37 ash -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 base64 -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 bbconfig -> /bin/busybox
-rwxr-xr-x 1 root root 805024 Dec 12 10:42 busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 cat -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 chgrp -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 chmod -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 chown -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 conspy -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 cp -> /bin/busybox
[... snip ...]
lrwxrwxrwx 1 root root 12 Jan 9 19:37 tar -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 touch -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 true -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 umount -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 uname -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 usleep -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 watch -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 zcat -> /bin/busybox
In addition, if you look at /lib
the same way, you'll find that the usual libs aren't there since busybox
uses musl
instead of glibc
.
Typically, whatever is done in your setup.sh
should be done with RUN
instructions in the Dockerfile anyway?
PS: Incidentally,
standard_init_linux.go:195: exec user process caused "no such file or directory"
means that either the executable is not found or one of its required libraries is not found, which makes debugging the Dockerfile quite difficult.
docker run
, notdocker start
(start doesn't even have the option--name
). – Norrius Mar 25 '18 at 17:20