The Alpine Linux Image is ~5MB in size, so it will not contain most of the non-essential packages. To have the size limited you will not get the bash shell either, if you try to run a bash script or command, you will get an error: sh: bash: not found
# bash
sh: bash: not found
Install bash on Alpine Linux using apk

# apk add bash
(1/1) Installing bash (5.1.16-r2)
Executing bash-5.1.16-r2.post-install
Executing busybox-1.35.0-r17.trigger
OK: 58 MiB in 28 packages
Install bash on Dockerfile with Alpine Linux base Image
FROM alpine:latest
RUN apk add bash
CMD bash
Have Questions? Post them here!
- How to docker remove a container when it exits
- Install Python on Alpine Linux - Docker
- How to Rename Docker Image with none TAG and REPOSITORY?
- Remove all stopped containers in Docker using prune command
- [Fix] Docker Error response from daemon: manifest for :latest not found: manifest unknown
- [fix] Error response from daemon: conflict unable to remove repository reference ubuntu container is using its referenced image
- [Docker] Install Python3 on Alpine Linux
- Unable to find image docker latest locally
- How to Stop/Cancel/kill docker image pull
- How to know the Docker Engine Version
- [fix] Docker: OCI runtime exec failed unable to start container process
- [Solution] Alpine Docker apt-get: not found
- Install and Run Cassandra on Docker Desktop
- Install node on Alpine Linux Docker
- How to Copy files from Docker Container to Host System
- Install the minimal Linux on Docker (only 5 mb Alpine Linux)
- How to stop and start a docker container
- Docker - Error response from daemon: You cannot remove a running container
- Open Docker Desktop from macOS Terminal
- How to check installed docker version command
- How to know the Docker Sandbox ID of a Container Network?
- [fix] docker: Error response from daemon: dial unix docker.raw.sock: connect: no such file or directory.
- [Docker] Install Git on Alpine Linux
- Docker MySQL Compose File with Volume Example
- [fix] Docker: Alpine Linux - /bin/sh: bash: not found
- git command to remove/unstage files from staging area - Git
- npm WARN saveError ENOENT: no such file or directory, open /mnt/c/package.json - JavaScript
- Java JDBC Connection with MySQL Driver in VS Code + Troubleshooting - Java
- Read Json File and Convert to Java Object using Jackson - Java
- Add days/weeks/months/years to LocalDate in Java 8 and above examples - Java
- How to display File CR LF Newline Characters in Sublime Text - Sublime-Text
- How to add ruler in Sublime Text tab window - Sublime-Text
- Install Native Java JDK JRE on Apple Silicon M1 Mac - MacOS