调整开发环境镜像构建

This commit is contained in:
2025-08-18 13:58:43 +08:00
parent b387db1e08
commit 34344edd29

View File

@@ -16,11 +16,9 @@ RUN apt update && \
apt install -y openssh-server
# 配置SSH服务
RUN mkdir /var/run/sshd && \
# 设置root密码可根据需要修改
echo 'root:fcb0102' | chpasswd && \
RUN echo 'root:fcb0102' | chpasswd && \
# 允许root登录SSH
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
# 将当前目录内容复制到容器的/app内
#COPY . /app