Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +7 -4
Dockerfile
CHANGED
|
@@ -77,6 +77,12 @@ RUN sed -i 's/Defaults !requiretty/Defaults requiretty/' /etc/sudoers && \
|
|
| 77 |
#RUN ssh-keygen -q -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N "" -y && \
|
| 78 |
# ssh-keygen -q -t ecdsa -b 256 -f /etc/ssh/ssh_host_ecdsa_key -N "" -y && \
|
| 79 |
# ssh-keygen -q -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N "" -y
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
# Secure SSH Configuration
|
| 82 |
RUN sed -i 's/#PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config && \
|
|
@@ -114,11 +120,8 @@ EXPOSE 7860
|
|
| 114 |
|
| 115 |
RUN chmod -R 777 /app
|
| 116 |
|
| 117 |
-
USER admin
|
| 118 |
|
| 119 |
-
RUN yes y | ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N "" && \
|
| 120 |
-
yes y | ssh-keygen -t ecdsa -b 256 -f /etc/ssh/ssh_host_ecdsa_key -N "" && \
|
| 121 |
-
yes y | ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ""
|
| 122 |
|
| 123 |
# Generate SSH keys
|
| 124 |
#RUN ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N "" -y && \
|
|
|
|
| 77 |
#RUN ssh-keygen -q -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N "" -y && \
|
| 78 |
# ssh-keygen -q -t ecdsa -b 256 -f /etc/ssh/ssh_host_ecdsa_key -N "" -y && \
|
| 79 |
# ssh-keygen -q -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N "" -y
|
| 80 |
+
|
| 81 |
+
RUN rm -f /etc/ssh/ssh_host_* && \
|
| 82 |
+
yes y | ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N "" && \
|
| 83 |
+
yes y | ssh-keygen -t ecdsa -b 256 -f /etc/ssh/ssh_host_ecdsa_key -N "" && \
|
| 84 |
+
yes y | ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ""
|
| 85 |
+
|
| 86 |
|
| 87 |
# Secure SSH Configuration
|
| 88 |
RUN sed -i 's/#PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config && \
|
|
|
|
| 120 |
|
| 121 |
RUN chmod -R 777 /app
|
| 122 |
|
| 123 |
+
#USER admin
|
| 124 |
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
# Generate SSH keys
|
| 127 |
#RUN ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N "" -y && \
|