因此,我需要在使用 Gitlab CI 运行部署作业时运行 ssh。我使用https://hub.docker.com/r/nmfzone/ssh-client-light/
泊坞窗图像。
但是,我不能。因为抛出了这个错误。
Checking out 32af65e1 as development...
Skipping Git submodules setup
Unknown cipher type 'if [ -x /usr/local/bin/bash ]; then
exec /usr/local/bin/bash
elif [ -x /usr/bin/bash ]; then
exec /usr/bin/bash
elif [ -x /bin/bash ]; then
exec /bin/bash
elif [ -x /usr/local/bin/sh ]; then
exec /usr/local/bin/sh
elif [ -x /usr/bin/sh ]; then
exec /usr/bin/sh
elif [ -x /bin/sh ]; then
exec /bin/sh
else
echo shell not found
exit 1
fi
我如何解决它?
我在构建https://hub.docker.com/r/nmfzone/ssh-client-light/
镜像时在 Dockerfile 中使用了这个配置。
FROM gliderlabs/alpine:3.4
RUN apk update && \
apk add --update bash && \
apk add openssh-client
# Security fix for CVE-2016-0777 and CVE-2016-0778
RUN echo -e 'Host *\nUseRoaming no' >> /etc/ssh/ssh_config
ENTRYPOINT ["ssh"]
要么使用 gitlab 的 ssh 执行器,要么将 docker 的入口点更改为适当的 shell 并在脚本中运行 ssh。Gitlab 的 docker runner 不支持不是 shell 的入口点。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句