Skip to content

Commit

Permalink
edit: edit DockerFile
Browse files Browse the repository at this point in the history
修改/etc/ssh/sshd_config、/etc/ssh/ssh_host_rsa_key执行权限文件
  • Loading branch information
Zherphy committed Dec 6, 2024
1 parent 7c4d4fd commit e4ea9ab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions DockerFile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ RUN go get github.com/akrylysov/algnhsa && \

FROM openeuler/openeuler:22.03
LABEL maintainer="Zhou Yi [email protected]"
# RUN useradd -s /bin/bash BigFiles
RUN useradd -s /bin/bash BigFiles
USER root
#配置ssh服务
RUN dnf -y update && \
dnf -y install openssh && \
dnf -y install openssh-server && \
dnf -y install openssh-clients && \
dnf -y install sshpass
RUN echo 'root:123456' | chpasswd
RUN echo 'BigFiles:123456' | chpasswd
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config

WORKDIR /etc/ssh
Expand All @@ -28,8 +28,11 @@ COPY --chown=BigFiles:group --from=BUILDER /home/scripts/ssh /
RUN chmod +x /port_forward.sh
RUN chmod +x /start.sh
RUN chmod +x /begin.sh
RUN chmod 305 /etc/ssh/sshd_config
RUN chmod 305 /etc/ssh/ssh_host_rsa_key

WORKDIR /home/BigFiles
USER BigFiles
COPY --chown=BigFiles:group --from=BUILDER /home/main /home/BigFiles/main

EXPOSE 23231
Expand Down

0 comments on commit e4ea9ab

Please sign in to comment.