Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -1
Dockerfile
CHANGED
|
@@ -26,7 +26,16 @@ RUN npm install --save express ws
|
|
| 26 |
|
| 27 |
COPY --chown=pn nginx.conf /etc/nginx/sites-available/default
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
COPY --chown=pn . .
|
| 32 |
|
|
|
|
| 26 |
|
| 27 |
COPY --chown=pn nginx.conf /etc/nginx/sites-available/default
|
| 28 |
|
| 29 |
+
# Create the .ssh directory if it does not exist
|
| 30 |
+
RUN mkdir -p /home/pn/.ssh
|
| 31 |
+
|
| 32 |
+
# Generate SSH key pair non-interactively
|
| 33 |
+
RUN ssh-keygen -t rsa -b 4096 -f /home/pn/.ssh/id_rsa -N ""
|
| 34 |
+
|
| 35 |
+
# Optionally, set permissions for the .ssh directory and keys
|
| 36 |
+
RUN chmod 700 /home/pn/.ssh && \
|
| 37 |
+
chmod 600 /home/pn/.ssh/id_rsa && \
|
| 38 |
+
chmod 644 /home/pn/.ssh/id_rsa.pub
|
| 39 |
|
| 40 |
COPY --chown=pn . .
|
| 41 |
|