You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FROM centos:7
RUN yum install -y initscripts openssh-server vim
RUN echo 'root:pass' | chpasswd
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/#Port 22/Port 22/' /etc/ssh/sshd_config
RUN service ssh start ; sleep infinity
EXPOSE 22
I install initscripts follow with this instruction for service command but not work anymore while building. Like below.
Error output when building image
Step 6/7 : RUN service ssh start ; sleep infinity
---> Running in b3a8b35f13b6
Redirecting to /bin/systemctl start ssh.service
Failed to get D-Bus connection: Operation not permitted
I know that systemd can't run on docker. But, how to solve this?
Thank you!
The text was updated successfully, but these errors were encountered:
This is my Dockerfile
I install initscripts follow with this instruction for service command but not work anymore while building. Like below.
Error output when building image
I know that systemd can't run on docker. But, how to solve this?
Thank you!
The text was updated successfully, but these errors were encountered: