sách gpt4 ai đã đi

docker - ssh-keygen : command not found in Docker

In lại 作者:行者123 更新时间:2023-12-05 02:06:00 28 4
mua khóa gpt4 Nike

我正在尝试在 docker 容器中运行以下命令(centos 7 作为基础镜像)

ssh-keygen -t rsa -N ""

我得到这个错误:

ssh-keygen: command not found

这是我用来构建容器的Dockerfile

FROM centos:7

ENV VER "0.12.9"

RUN yum update -y && yum install wget -y && yum install unzip -y
RUN yum install epel-release -y && yum install ansible -y

RUN wget https://releases.hashicorp.com/terraform/${VER}/terraform_${VER}_linux_amd64.zip
RUN unzip terraform_${VER}_linux_amd64.zip
RUN mv terraform /usr/local/bin/
RUN rm -rf terraform_${VER}_linux_amd64.zip

有人可以帮帮我吗?

1 Câu trả lời

ssh-keygen是OpenSSH提供的命令,需要安装。

Sẽ yum install openssh-clients -y 添加到您的 Dockerfile。

FROM centos:7

ENV VER "0.12.9"

RUN yum update -y && yum install wget -y && yum install unzip -y
RUN yum install epel-release -y && yum install ansible -y && yum install openssh-clients -y

RUN wget https://releases.hashicorp.com/terraform/${VER}/terraform_${VER}_linux_amd64.zip
RUN unzip terraform_${VER}_linux_amd64.zip
RUN mv terraform /usr/local/bin/
RUN rm -rf terraform_${VER}_linux_amd64.zip

关于docker - ssh-keygen : command not found in Docker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63042314/

28 4 0
行者123
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com