首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >docker新手,安装一个项目的基础镜像时遇到了问题?

docker新手,安装一个项目的基础镜像时遇到了问题?

提问于 2019-10-12 12:12:56
回答 3关注 0查看 4.4K

Ubuntn系统下安装的docker;

apt更新了{sudo apt update},wget也安装了{sudo apt install wget},ssh服务也安装了{sudo apt install ssh};centos也安装了{docker pull centos};

使用dockefile文件时出错了;dockerfile文件内容:

FROM centos

MAINTAINER Yi.Ma <findlymw@gmail.com>

RUN yum -y update

RUN yum install -y passwd openssh-server openssh-clients initscripts net-tool

RUN yum install python-setuptools -y

RUN easy_install superviso

RUN echo 'root:root' | chpasswd

RUN /usr/sbin/sshd-keygen

EXPOSE 22

CMD /usr/sbin/sshd -D

使用root用户切换到对应的目录下面执行:docker build ‐t yi/centos7‐ssh . 命令时报错;报错信息如下:

root@ubuntu:/home/bcl/envdm/jichu/centos7# docker build -t yi/centos7-ssh .

Sending build context to Docker daemon 3.584kB

Step 1/10 : FROM centos

---> 0f3e07c0138f

Step 2/10 : MAINTAINER Yi.Ma <findlymw@gmail.com>

---> Using cache

---> f02274e5139b

Step 3/10 : RUN yum -y update

---> Using cache

---> 5cfa834cb327

Step 4/10 : RUN yum install -y passwd openssh-server openssh-clients initscripts net-tool

---> Running in e80b8930d2ee

Last metadata expiration check: 14:06:22 ago on Fri Oct 11 12:20:20 2019.

No match for argument: net-tool

Error: Unable to find a match

The command '/bin/sh -c yum install -y passwd openssh-server openssh-clients initscripts net-tool' returned a non-zero code: 1

docker新手,不懂参数不匹配是什么意思;该用什么参数;从哪找

相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档