ssh登录+jdk+maven+vim+ping+curl
FROM ubuntu:22.04
RUN apt-get update
RUN apt-get install -y \
vim \
inetutils-ping \
openssh-server \
curl \
openjdk-8-jdk \
maven
RUN mkdir /var/run/sshd
RUN echo 'root:root' |chpasswd
RUN sed -ri 's/^#?PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
RUN mkdir /root/.ssh
EXPOSE 22/tcp
CMD ["/usr/sbin/sshd" "-D"]
下一篇:初识 Python