Dockerfile执行命令报错"The command '/bin/sh -c apt-get install -y git' returned a non-zero code: 100"解决
2019-02-05 23:10
866 查看
Dockerfile文件中编辑如下内容:
# An example Dockerfile for installing Git on Ubuntu From ubuntu MAINTAINER "urmsone" RUN apt-get install -y git ENTRYPOINT ["git"]
执行
docker build -t test .命令后报错,
The command '/bin/sh -c apt-get install -y git' returned a non-zero code: 100
解决:
在install之前先update,即apt-get update && apt-get install -y xxx
修正后的Dockerfile文件如下:
# An example Dockerfile for installing Git on Ubuntu From ubuntu MAINTAINER "urmsone" RUN apt-get update --fix-missing && apt-get install -y git ENTRYPOINT ["git"]
相关文章推荐
- 执行安装软件命令提示apt-get -f install的解决方法
- 解决执行`sudo apt-get install`命令出现`Could not get lock`错误
- Ubuntu/Debian下 apt-get command not found 命令无法找到的解决方法
- apt-get install 的替换命令及mysql安装问题的解决
- 执行 pod install后提示 -bash: pod: command not found(未找到命令)的解决方法
- Linux(Ubuntu)使用 sudo apt-get install 命令安装软件的目录在哪?(已解决)
- 错误解决:SharePoint Designer 2010编辑后,出现数据源控件未能执行插入命令,data source control failed to execute the insert command
- 关于执行命令:sudo apt-get update后的“E: 无法解析或打开软件包的列表或是状态文件”问题解决
- 借助apt-file命令 可以查找缺少包所依赖的linux文件 然后用 apt-get install 安装所对应的文件
- apt-get install 报 E: Sub-process /usr/bin/dpkg returned an error code (1) 错
- ansible执行shell模块和command模块报错| FAILED | rc=127 >> /bin/sh: lsof: command not found和| rc=2 >> [Errno 2] No such file or directory
- Ubuntu 解决:当执行`sudo apt-get update`命令时 出现的 “apt-get 404 Not Found Package Repository Errors” 问题
- ubuntu sudo apt-get install时遇到问题E: Sub-process /usr/bin/dpkg returned an error code (1)
- Ubuntu 解决:当执行`sudo apt-get update`命令时 出现的 “apt-get 404 Not Found Package Repository Errors” 问题
- 小小成就——解决apt-get install命令的异常问题
- Ubuntu在执行sudo apt-get install ***出现E:Encountered a section with no Package header错误解决方法
- 解决apt-get安装中的E: Sub-process /usr/bin/dpkg returned an error code (1)问题
- ubuntu上pushd命令执行错误(/bin/sh: 1: pushd: not found)解决办法
- 出现命令提示apt-get -f install的解决方法