docker - 如何在容器内的 debian:stretch 类型的映像中安装 open-ssh 客户端和服务器?
问题描述
我需要安装 ssh 才能运行以下命令:
git+ssh://git@github.com/some_org/some_repo#egg=some_egg
这失败并出现以下错误:
Collecting athena from git+ssh://git@github.com/some_org/some_repo-py#egg=some_egg (from -r /requirements/athena.txt (line 2))
Cloning ssh://git@github.com/some_org/some_repo to /tmp/pip-build-jx3xzcel/athena
error: cannot run ssh: No such file or directory
fatal: unable to fork
Command "git clone -q ssh://git@github.com/some_org/some_repo /tmp/pip-build-jx3xzcel/athena" failed with error code 128 in None
You are using pip version 9.0.3, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
The command '/bin/sh -c pip3 install -r /requirements/athena.txt' returned a non-zero code: 1
Makefile:109: recipe for target 'build' failed
似乎我没有在容器中安装 ssh,因此尝试安装它。
我已经尝试使用各个页面上可用的命令在 Debian 上安装 ssh,但没有一个有效。这些命令包括安装openssh-server
和openssh-client
通过apt-get
RUN apt-get install -yqq openssh-server
我希望安装 ssh 并且 dockerfile 中的这一步是成功的,但相反,我收到以下错误:
Step 20/38 : RUN apt-get install openssh-server
---> Running in e63d8d044b88
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package openssh-server
The command '/bin/sh -c apt-get install openssh-server' returned a non-zero code: 100
make: *** [dev] Error 100
解决方案
推荐阅读
- javascript - 控制台中的 laravel vue 缩进问题
- amazon-web-services - en-core-web-sm 模块错误 - 无服务器部署 AWS Lambda
- python - 如何通过 API 读取/写入 Excel Online 而无需企业或学校帐户租户
- javascript - 如何将 div 放置在另一个 div 中,并使用现有内容作为背景?z索引问题?
- swift - 如何在 iOS Swift 4.2 中从范围获取子字符串
- angular - 嵌套表单组件在 ng-untouched 上抛出 ExpressionChangedAfterItHasBeenCheckedError
- python - 为什么我的 IF 语句之一在 Python 中不起作用?
- java - 规避基于图块的游戏的频繁重绘()调用
- node.js - 当代理响应包含“连接:关闭”标头时如何处理 ECONNRESET?
- batch-file - mkdir 在预期位置和桌面上制作文件