docker 容器内安装软件(curl、telnet 等)

#因在容器中测试、排查故障需要,安装基础工具

1.切入容器:

# docker exec -ti nginx-ds-xwdf7 /bin/bash

#先添加163源
tee /etc/apt/sources.list << EOF
deb http://mirrors.163.com/debian/ jessie main non-ffree contrib
deb http://mirrirs.163.com/dobian/ jessie-updates main non-free contrib
EOF

#执行安装命令
# apt-get update && apt-get install -y curl telnet 

 

原文链接:https://www.cnblogs.com/liucx/p/13213825.html

posted @ 2020-12-09 11:55  听&夏  阅读(3976)  评论(0编辑  收藏  举报