/bin/bash: Command not found in alpine docker
use the package manager, named apk, this way:
% docker run --rm -it alpine /bin/sh/ #/ # apk add --no-cache bashfetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gzfetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz(1/5) Installing ncurses-terminfo-base (6.0-r8)(2/5) Installing ncurses-terminfo (6.0-r8)(3/5) Installing ncurses-libs (6.0-r8)(4/5) Installing readline (6.3.008-r4)(5/5) Installing bash (4.3.46-r5)Executing bash-4.3.46-r5.post-installExecuting busybox-1.25.1-r0.triggerOK: 12 MiB in 16 packages/ # which -a bash/bin/bash
There is no /bin/bash
in alpine:
$ docker run -i -t alpine/ # ls /bin/bashls: /bin/bash: No such file or directory
Note that there is no make
or go
neither. So, either you checked their existence in your host instead of in alpine, or you are not using vanilla alpine.