8 views
docker run -i -t alpine /bin/bash

This is showing error because, the alphine Linux does not come with a bash shell, by default,

[root@askdevops ~]# docker run -it alpine /bin/bash
Unable to find image 'alpine:latest' locally
Trying to pull repository docker.io/library/alpine ...
latest: Pulling from docker.io/library/alpine
050382585609: Pull complete
Digest: sha256:6a92cd1fcdc8d8cdec60f33dda4db2cb1fcdcacf3410a8e05b3741f44a9b5998
Status: Downloaded newer image for docker.io/alpine:latest
/usr/bin/docker-current: Error response from daemon: oci runtime error: container_linux.go:235: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory".
[root@askdevops ~]#

If you are looking for a shell, you may use inbuild sh:

[root@askdevops ~]# docker run -it alpine /bin/sh
/ #
/ #
/ # cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.10.1
PRETTY_NAME="Alpine Linux v3.10"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"
/ # exit
[root@askdevops ~]#
Sep 23, 2018 by | 8 views
Articles for DevOps Geeks
MobaXterm Customization
CHMOD Explained!
Bash history powerful tips
Ubuntu bash from Windows
..