現象
以下のDockerfileがWindowsのDocker環境においてのみ正しく動作しないです。
現象と対処方法が知りたいです。
OS | dokcer version | result |
---|---|---|
Windows | Docker version 18.03.0-ce, build 0520e24302 | ERROR |
Mac OS X | Docker version 18.09.2, build 6247962 | Success |
CentOs | Docker version 18.09.3, build 774a1f4 | Success |
Dockerfile
1FROM ubuntu:16.04 2 3RUN apt-get update && apt-get install -y openssh-server 4RUN mkdir /var/run/sshd 5 6COPY sshd_config /etc/ssh/sshd_config 7 8# SSH login fix. Otherwise user is kicked off after login 9RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd 10 11ENV NOTVISIBLE "in users profile" 12RUN echo "export VISIBLE=now" >> /etc/profile 13 14RUN useradd hoteiebisadmin && echo hoteiebisadmin:test | /usr/sbin/chpasswd 15 16EXPOSE 22 17 18CMD ["/usr/sbin/sshd", "-D"]
エラー内容
ERROR: for env_test_refweb_1 Cannot start service test_refweb: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/usr/sbin/sshd\": stat /usr/sbin/sshd: no such file or directory": unknown ERROR: for test_refweb Cannot start service test_refweb: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/usr/sbin/sshd\": stat /usr/sbin/sshd: no such file or directory": unknown ERROR: Encountered errors while bringing up the project.
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。