docker run -it centos[root@8b601861da05 /]# yum update && yum install wget -y......Total download size: 14 MIs this ok [y/d/N]: 命令里已經(jīng)yum install -y了,但是還是需要選擇Y,N沒(méi)有自動(dòng)執(zhí)行,請(qǐng)問(wèn)這個(gè)要怎么破。PS:我是在Dockerfile里設(shè)置,然后進(jìn)入鏡像手動(dòng)測(cè)試,Dockerfile報(bào)錯(cuò)如下: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貢獻(xiàn)1801條經(jīng)驗(yàn) 獲得超16個(gè)贊
建議 docker run -it centos /bin/bash
進(jìn)入容器,然后運(yùn)行 yum update && yum install wget -y
添加回答
舉報(bào)
0/150
提交
取消