美文网首页
docker build中出问题排错方法

docker build中出问题排错方法

作者: Maggie_up | 来源:发表于2018-09-02 15:24 被阅读0次

话不多说,直接上菜

[root@localhost ~]# docker build -t nodetest:1.1 .                                                                           
Sending build context to Docker daemon  445.8MB
Step 1/4 : FROM node:8.9.1
 ---> 1934b0b038d1
Step 2/4 : WORKDIR /app/
Removing intermediate container fc62c23fb109
 ---> 459fc64e4dd0
Step 3/4 : RUN yum install git
 ---> Running in 3ab500393a24
/bin/sh: 1: yum: not found

上面很明显到Step 3这里出问题,如何排错呢?

临时进入上面Step 2成功的image,手动排错
[root@localhost ~]# docker run -it 459fc64e4dd0 /bin/bash

进入容器发现,node是基于Debian系统。所以问题就知道了
root@c248a457ae79:/app/# cat /etc/issue
Debian GNU/Linux 8 \n \l

小知识点,mark下可能会考。

相关文章

网友评论

      本文标题:docker build中出问题排错方法

      本文链接:https://www.haomeiwen.com/subject/mjsmwftx.html