Dockerfile for this image
- FROM redhat/ubi8
- RUN yum install openssh* -y
- RUN yum install procps-ng net-tools -y
- RUN echo root:redhat | chpasswd
- RUN echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
- RUN echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
- RUN sed -i "s/# StrictHostKeyChecking ask/StrictHostKeyChecking no/g" /etc/ssh/ssh_config
- CMD ["/usr/sbin/init", "&&", "systemctl", "start","sshd" ]
To Launch container of this image:
- docker run -itd --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro --tmpfs /run --name=container-name image:name
Note: This image sets root's password to redhat