Alpine安装telnet
物理机centos 安装netstat
yum -y install net-tools
Alpine镜像中的telnet在3.7版本后被转移至busybox-extras包中,需要使用apk单独安装。
执行命令
apk update
apk add busybox-extras
出现报错
bash-5.0$ apk update ERROR: Unable to lock database: Permission denied ERROR: Failed to open apk database: Permission denied
用root方式进入容器
bash-5.0# apk update fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz v3.12.1-47-g77e786238c [http://dl-cdn.alpinelinux.org/alpine/v3.12/main] v3.12.1-63-gbb5c05cff7 [http://dl-cdn.alpinelinux.org/alpine/v3.12/community] OK: 12748 distinct packages available
参考
https://www.jb51.net/article/153635.htm