About Lesson
Hey, there!
There’s a chance that your remote-host image won’t sucessfully build.
Why?
Well, in the course we are using centos:latest, which at that point was centos:7. In September/2019, centos 8 was released, and it’s downloaded instead of the 7 version when you use “latest”
Resolution:
1 – Change the from instruction and point to centos 7
FROM centos:7
2- Keep using centos 8 and modify these lines:
Change this
RUN useradd remote_user && echo "1234" | passwd remote_user --stdin && # Passwd command is deprecated on centos:8 mkdir /home/remote_user/.ssh && chmod 700 /home/remote_user/.ssh
to this:
RUN useradd remote_user && echo "remote_user:1234" | chpasswd && mkdir /home/remote_user/.ssh && chmod 700 /home/remote_user/.ssh
You could also see errors related to sshd-keygen. If so, just change this line from :
RUN /usr/sbin/sshd-keygen
to
RUN ssh-keygen -A
Join the conversation