惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 司徒正美
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
美团技术团队
WordPress大学
WordPress大学
罗磊的独立博客
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
MongoDB | Blog
MongoDB | Blog
J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More
H
Help Net Security
S
SegmentFault 最新的问题
C
Check Point Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
腾讯CDC
Engineering at Meta
Engineering at Meta
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
D
DataBreaches.Net
雷峰网
雷峰网
GbyAI
GbyAI
宝玉的分享
宝玉的分享

博客园 - 鄙人取个名字好难

多线程(七)AQS Kafka Rebalance 机制 阿里云百炼实战-Spring AI 连接 AI应用API 阿里云百炼实战-IDEA集成Claude Code AI简介 Java进阶(八)动态代理 Hadoop(一)Linux环境搭建 Hadoop(二)基本概念 Hadoop(三)命令指南 Ubuntu中SVN服务端安装 MySQL实用查询语句 Java进阶(七)布隆过滤器 NIO面试题 TCP/IP面试题 SPRING面试题 SpringBoot(五)原理剖析:Transaction原理 SpringBoot(四)原理剖析:AOP原理 SpringBoot(三)原理剖析:IOC原理 SpringBoot(二)原理剖析:AutoConfiguration原理 SpringBoot(一)原理剖析:SpringApplication启动原理
Docker(六)安装telnet命令
鄙人取个名字好难 · 2021-06-03 · via 博客园 - 鄙人取个名字好难

  在使用docker容器时,有时候需要使用一些其他命令,如ifconfig,telnet等,但是会提示错误:

bash-5.0# telnet 11.161.35.45 27017                                                                                                                                        
bash: telnet: command not found

  这时候需要执行如下命令(apt命令详细参考 Linux之yum&apt):

bash-5.0# apt-get update
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [121 kB]                                  
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]                                                                                                      
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [291 kB]                                                                               
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7907 kB]                                                                                                    
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7907 kB]                                                                                                    
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [10.9 kB]                                                                                            
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [291 kB]                                                                               
Fetched 8297 kB in 2min 37s (53.0 kB/s)                                                                                                                                    
Reading package lists... Done
bash-5.0# 

  然后安装telnet命令:

bash-5.0# apt-get install  telnet                                                                                                                                          
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  telnet
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 70.4 kB of archives.
After this operation, 167 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 telnet amd64 0.17-41.2 [70.4 kB]
Fetched 70.4 kB in 0s (345 kB/s) 
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package telnet.
(Reading database ... 12572 files and directories currently installed.)
Preparing to unpack .../telnet_0.17-41.2_amd64.deb ...
Unpacking telnet (0.17-41.2) ...
Setting up telnet (0.17-41.2) ...
update-alternatives: using /usr/bin/telnet.netkit to provide /usr/bin/telnet (telnet) in auto mode