我一直在使用MySQLVersion5.7,这是可行的。
Dockerfile (工作)
FROM mysql:5.7
...
RUN yum update -y; yum install -y vim然后我升级到mysql 8,现在我得到了这个错误。
$ gnt build
...
#5 [ 2/12] RUN yum update -y; yum install -y vim
#5 sha256:a564337cc7df72796c4c967652d420ef76ec98034de106834a473bceb4889532
#5 0.325 /bin/sh: yum: command not found
#5 0.326 /bin/sh: yum: command not found
#5 ERROR: executor failed running [/bin/sh -c yum update -y; yum install -y vim]: exit code: 127
------
> [ 2/12] RUN yum update -y; yum install -y vim:
------
executor failed running [/bin/sh -c yum update -y; yum install -y vim]: exit code: 127
> Task :Server-mysql:buildDockerImage FAILED
FAILURE: Build failed with an exception.Dockerfile (不工作)
FROM mysql:8
...
RUN yum update -y; yum install -y vim发布于 2022-07-12 15:39:56
如果您看一下8.0的标记,就会发现这个库使用了不同版本的Oracle linux (8比7)。Yum不是安装在8,而是有一个最小的安装程序(microdnf)。所以这个替代应该适用于你:
microdnf install -y vimhttps://stackoverflow.com/questions/72954869
复制相似问题