为了账号安全,请及时绑定邮箱和手机立即绑定

docker内运行yum install -y无效

docker内运行yum install -y无效

交互式爱情 2018-07-29 11:10:32
docker run -it centos[root@8b601861da05 /]# yum update && yum install wget -y......Total download size: 14 MIs this ok [y/d/N]: 命令里已经yum install -y了,但是还是需要选择Y,N没有自动执行,请问这个要怎么破。PS:我是在Dockerfile里设置,然后进入镜像手动测试,Dockerfile报错如下:Is this ok [y/d/N]: Exiting on user commandYour transaction was saved, rerun it with:yum load-transaction /tmp/yum_save_tx.2018-02-01.02-10.O1ZlZ_.yumtxThe command '/bin/sh -c yum update && yum install telnet -y' returned a non-zero code: 1
查看完整描述

1 回答

?
侃侃尔雅

TA贡献1801条经验 获得超15个赞

建议 docker run -it centos /bin/bash 进入容器,然后运行 yum update && yum install wget -y



查看完整回答
反对 回复 2018-08-25
  • 1 回答
  • 0 关注
  • 2727 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信