[fix] Docker: Alpine Linux - /bin/sh: bash: not found

Docker Alpine Linux bash not found

If you have installed Alpine Linux image using Docker and you get, /bin/sh: bash: not found, the reason is that you do not get bash shell installed on with this image, you only get sh shell.

You should make use of sh instead to keep the footprint, if you still want to install bash, use command RUN apk add --no-cache bash

You can also, run the command apk add bash after you run alpine Linux,

# apk add bash
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/aarch64/APKINDEX.tar.gz
(1/4) Installing ncurses-terminfo-base (6.3_p20211120-r0)
(2/4) Installing ncurses-libs (6.3_p20211120-r0)
(3/4) Installing readline (8.1.1-r0)
(4/4) Installing bash (5.1.16-r0)
Executing bash-5.1.16-r0.post-install
Executing busybox-1.34.1-r5.trigger
OK: 8 MiB in 18 packages
Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap