zoukankan      html  css  js  c++  java
  • Docker(六)安装telnet命令

      在使用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
  • 相关阅读:
    Eclipse CDT Linux下内存分析 实战历险
    .Net元编程【Metaprogramming in NET】 序-翻译
    go语言和资料
    代码提交 【转】
    两本有意思的书【代码的未来、淘宝技术这十年】
    C/C++构建系统 GNU autotool
    C/C++构建系统 -工具汇总
    使用Java语言开发微信公众平台(四)——图文消息的发送与响应
    Onsen UI 前端框架(二)
    Maven项目搭建(一):Maven初体验
  • 原文地址:https://www.cnblogs.com/ryjJava/p/14846309.html
Copyright © 2011-2022 走看看