侧边栏壁纸
博主头像
★街角晚灯★ 博主等级

博观而约取 厚积而薄发

  • 累计撰写 468 篇文章
  • 累计创建 185 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

Dockder Alpine安装telnet

WinJay
2023-07-21 / 0 评论 / 0 点赞 / 76 阅读 / 0 字 / 正在检测是否收录...

Dockder Alpine安装telnet

image-20230721134833798
很多镜像是使用alpine作为基础镜像,体积小,但apline精简了很多基础组件因此调试起来很麻烦,下方总结了常用的alpine组件安装方法:

>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found
 
/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
OK: 9051 distinct packages available
 
/app # apk add busybox-extras
(1/1) Installing busybox-extras (1.27.2-r11)
Executing busybox-extras-1.27.2-r11.post-install
Executing busybox-1.27.2-r7.trigger
OK: 77 MiB in 64 packages
 
/app # busybox-extras telnet localhost 6900
功能 命令
镜像加速 sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories #换源
apk库更新 apk update
安装curl apk add curl
安装telnet apk add busybox-extras
偷懒N合1 sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && apk update && apk add curl && apk add busybox-extras
0
  1. 支付宝打赏

    qrcode alipay
  2. 微信打赏

    qrcode weixin

评论区