Cannot make host keys available in OpenShift - Stack Overflow

I want to make SSH available in OpenShift. This is my dockerfile:FROM ubuntu:latestRUN apt-get update

I want to make SSH available in OpenShift. This is my dockerfile:

FROM ubuntu:latest

RUN apt-get update && apt-get install -y openssh-server

RUN useradd myuser
RUN chpasswd myuser:pw

RUN mkdir /var/run/sshd

RUN ssh-keygen -A
RUN chown myuser /etc/ssh/*

EXPOSE 22

USER myuser

CMD ["/usr/sbin/sshd", "-D"]

In Docker on my local machine this works perfectly fine. When I push the image to OpenShift and deploy I obtain:

sshd: no hostkeys available -- exiting.

How do I fix this?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744701772a4588818.html

相关推荐

  • Cannot make host keys available in OpenShift - Stack Overflow

    I want to make SSH available in OpenShift. This is my dockerfile:FROM ubuntu:latestRUN apt-get update

    1天前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信