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!
More Posts related to Docker,
- 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
More Posts:
- Facebook : Warning: Request without access token missing application ID or client token - Facebook
- Java Jackson ObjectMapper Class with Examples - Java
- Eclipse : Workspace was written with an older version of the product and will be updated - Eclipse
- Disabling Spell Check in Android Studio - Android-Studio
- zsh: command not found: cls macOS Big Sur - MacOS
- Unbound classpath container: JRE System Library [JavaSE-1.7] - Java
- How to install Python Specific version (3.8, 3.9 or 3.10) using Brew - Python
- Make Android TextView Clickable like Buttons - Android