首页 > 其他分享 >docker bash: xxx : command not found

docker bash: xxx : command not found

时间:2023-03-21 10:44:14浏览次数:45  
标签:get xxx apt command && found docker bash

1.现象:

在容器内执行route命令会报错 bash: route: command not found

2.原因

容器内没有安装route命令

3.解决办法

(1)bash: ip: command not found

apt-get update && apt-get install -y iproute2

(2)bash: yum: command not found

apt-get update && apt-get install yum

(3)bash: ping: command not found

apt-get update && apt install iputils-ping

(4)bash: ifconfig: command not found

apt-get update && apt install net-tools

(5)bash: vi: command not found

apt-get update &&  apt-get install vim

(6)bash: route: command not found

apt-get update && apt-get install -y iproute2 && apt-get update && apt install net-tools

(7) bash: netstat: command not found

apt-get update && apt install net-tools

(8)bash: ps: command not found

apt-get update && apt-get install procps

(9)bash: top: command not found

apt-get update && apt-get install procps

 

 

 

 

标签:get,xxx,apt,command,&&,found,docker,bash
From: https://www.cnblogs.com/zxqblogrecord/p/17239117.html

相关文章

  • Jenkins+Docker 实现一键自动化部署项目!步骤齐全,少走坑路
    一、安装docker二、安装Jenkins三、系统配置四、创建任务五、测试六、运行项目本文章实现最简单全面的Jenkins+docker+springboot 一键自动部署项目,步骤齐全,少走......
  • 1、Docker下安装mysql主从复制
    一、新建主服务实例容器挂载日志、数据、配置启动:dockerrun-p3307:3306--namemysql-master\-v/mydata/mysql-master/log:/var/log/mysql\-v/mydata/mysql-mas......
  • docker镜像中所有方法无法使用
    事情的起因是,我在win11的电脑上进行开发,将docker容器打包成镜像,再移植进服务器,再从镜像运行的容器中所有方法和命令都无法使用。最后的原因是,docker版本差别过大,所以应当......
  • Vscode Espressif IDF: ESP-IDF and tools found, configuring the extension 解决办
    VscodeEspressifIDF扩展一直在LOADING原因是Pythonpip源的问题,修改为国内的源!(CMD管理员模式)pipconfigsetglobal.index-urlhttp://mirrors.aliyun.com/pypi/......
  • docker安装minio
    拉取镜像dockerpullminio/minio创建容器dockerrun-d-p9000:9000--nameminio\-p9001:9001\-e'MINIO_ACCESS_KEY=minioadmin'\-e'MINIO_SECRET_KEY=......
  • Dockerfile 构建 dotnet + python 镜像
    1编写DockerfileFROMmcr.microsoft.com/dotnet/aspnet:6.0WORKDIR/rootRUNaptupdate\&&aptinstallwgetbuild-essentialzlib1g-devlibncurses5-devli......
  • golang导出docker镜像
    1.下载镜像//downloadDockerImageimageTagName:="k8s.gcr.io/etcd:3.5.0-0"funcdownloadDockerImage(imageTagNamestring)(string,error){//要执行的命......
  • run mysql server in docker with exist database
    step1:putyourdatabasein$mysql_data_dirfirststep2:putyourmy.confto$mysql_cnf,forexample:thatmy.cnffromalibabacloud[mysqld]pid-file......
  • Docker:docker基本概念
    前言docker必须安装在linux操作系统docker基本概念镜像(image)镜像是一整套【应用+环境】的集合。可以类比为Java的类容器(container)容器是镜像的实例。可以类比为Java......