调整开发环境镜像构建
This commit is contained in:
@@ -16,11 +16,9 @@ RUN apt update && \
|
|||||||
apt install -y openssh-server
|
apt install -y openssh-server
|
||||||
|
|
||||||
# 配置SSH服务
|
# 配置SSH服务
|
||||||
RUN mkdir /var/run/sshd && \
|
RUN echo 'root:fcb0102' | chpasswd && \
|
||||||
# 设置root密码,可根据需要修改
|
|
||||||
echo 'root:fcb0102' | chpasswd && \
|
|
||||||
# 允许root登录SSH
|
# 允许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内
|
# 将当前目录内容复制到容器的/app内
|
||||||
#COPY . /app
|
#COPY . /app
|
||||||
|
|||||||
Reference in New Issue
Block a user