Spaces:
Build error
Build error
accplan
commited on
Commit
•
3d34266
1
Parent(s):
ea2e3f6
test
Browse files- Dockerfile +17 -7
- Dockerfile_old → Dockerfile_new +7 -17
Dockerfile
CHANGED
@@ -1,24 +1,34 @@
|
|
1 |
-
# Instruction for Dockerfile to create a new image on top of the base image (nvidia/cuda:11.0-base)
|
2 |
FROM alpine:latest
|
|
|
3 |
RUN apk add --update --no-cache openssh
|
4 |
-
RUN mkdir /var/run/sshd
|
5 |
-
RUN echo "root:root" | chpasswd
|
6 |
-
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
|
7 |
-
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
|
8 |
RUN echo 'ListenAddress 0.0.0.0' >> /etc/ssh/sshd_config
|
9 |
RUN echo 'Port 7860' >> /etc/ssh/sshd_config
|
10 |
-
RUN echo '
|
11 |
-
|
12 |
RUN echo 'PubkeyAuthentication yes' >> /etc/ssh/sshd_config
|
13 |
RUN echo 'AllowTcpForwarding yes' >> /etc/ssh/sshd_config
|
14 |
RUN echo 'PermitTunnel yes' >> /etc/ssh/sshd_config
|
15 |
RUN echo 'GatewayPorts yes' >> /etc/ssh/sshd_config
|
|
|
|
|
|
|
16 |
|
17 |
RUN adduser -h /home/user -s /bin/sh -D user
|
|
|
18 |
USER user
|
19 |
ENV HOME=/home/user \
|
20 |
PATH=/home/user/.local/bin:$PATH
|
21 |
|
|
|
|
|
|
|
|
|
22 |
EXPOSE 7860
|
|
|
|
|
|
|
|
|
|
|
23 |
CMD ssh-keygen -t ed25519 -f $HOME/.ssh/id_ed25519 && \
|
24 |
/usr/sbin/sshd -h $HOME/.ssh/id_ed25519 -D -e "$@"
|
|
|
|
|
|
1 |
FROM alpine:latest
|
2 |
+
LABEL maintainer="victorych"
|
3 |
RUN apk add --update --no-cache openssh
|
|
|
|
|
|
|
|
|
4 |
RUN echo 'ListenAddress 0.0.0.0' >> /etc/ssh/sshd_config
|
5 |
RUN echo 'Port 7860' >> /etc/ssh/sshd_config
|
6 |
+
RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
|
7 |
+
RUN echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
|
8 |
RUN echo 'PubkeyAuthentication yes' >> /etc/ssh/sshd_config
|
9 |
RUN echo 'AllowTcpForwarding yes' >> /etc/ssh/sshd_config
|
10 |
RUN echo 'PermitTunnel yes' >> /etc/ssh/sshd_config
|
11 |
RUN echo 'GatewayPorts yes' >> /etc/ssh/sshd_config
|
12 |
+
RUN echo 'PidFile /home/user/ssh.pid' >> /etc/ssh/sshd_config
|
13 |
+
|
14 |
+
RUN cat /etc/ssh/sshd_config
|
15 |
|
16 |
RUN adduser -h /home/user -s /bin/sh -D user
|
17 |
+
RUN echo -n 'user:test' | chpasswd
|
18 |
USER user
|
19 |
ENV HOME=/home/user \
|
20 |
PATH=/home/user/.local/bin:$PATH
|
21 |
|
22 |
+
RUN mkdir $HOME/app
|
23 |
+
|
24 |
+
WORKDIR $HOME/app
|
25 |
+
|
26 |
EXPOSE 7860
|
27 |
+
|
28 |
+
USER root
|
29 |
+
|
30 |
+
RUN exit 1
|
31 |
+
|
32 |
CMD ssh-keygen -t ed25519 -f $HOME/.ssh/id_ed25519 && \
|
33 |
/usr/sbin/sshd -h $HOME/.ssh/id_ed25519 -D -e "$@"
|
34 |
+
# -D
|
Dockerfile_old → Dockerfile_new
RENAMED
@@ -1,34 +1,24 @@
|
|
|
|
1 |
FROM alpine:latest
|
2 |
-
LABEL maintainer="victorych"
|
3 |
RUN apk add --update --no-cache openssh
|
|
|
|
|
|
|
|
|
4 |
RUN echo 'ListenAddress 0.0.0.0' >> /etc/ssh/sshd_config
|
5 |
RUN echo 'Port 7860' >> /etc/ssh/sshd_config
|
6 |
-
RUN echo '
|
7 |
-
|
8 |
RUN echo 'PubkeyAuthentication yes' >> /etc/ssh/sshd_config
|
9 |
RUN echo 'AllowTcpForwarding yes' >> /etc/ssh/sshd_config
|
10 |
RUN echo 'PermitTunnel yes' >> /etc/ssh/sshd_config
|
11 |
RUN echo 'GatewayPorts yes' >> /etc/ssh/sshd_config
|
12 |
-
RUN echo 'PidFile /home/user/ssh.pid' >> /etc/ssh/sshd_config
|
13 |
-
|
14 |
-
RUN cat /etc/ssh/sshd_config
|
15 |
|
16 |
RUN adduser -h /home/user -s /bin/sh -D user
|
17 |
-
RUN echo -n 'user:test' | chpasswd
|
18 |
USER user
|
19 |
ENV HOME=/home/user \
|
20 |
PATH=/home/user/.local/bin:$PATH
|
21 |
|
22 |
-
RUN mkdir $HOME/app
|
23 |
-
|
24 |
-
WORKDIR $HOME/app
|
25 |
-
|
26 |
EXPOSE 7860
|
27 |
-
|
28 |
-
USER root
|
29 |
-
|
30 |
-
RUN exit 1
|
31 |
-
|
32 |
CMD ssh-keygen -t ed25519 -f $HOME/.ssh/id_ed25519 && \
|
33 |
/usr/sbin/sshd -h $HOME/.ssh/id_ed25519 -D -e "$@"
|
34 |
-
# -D
|
|
|
1 |
+
# Instruction for Dockerfile to create a new image on top of the base image (nvidia/cuda:11.0-base)
|
2 |
FROM alpine:latest
|
|
|
3 |
RUN apk add --update --no-cache openssh
|
4 |
+
RUN mkdir /var/run/sshd
|
5 |
+
RUN echo "root:root" | chpasswd
|
6 |
+
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
|
7 |
+
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
|
8 |
RUN echo 'ListenAddress 0.0.0.0' >> /etc/ssh/sshd_config
|
9 |
RUN echo 'Port 7860' >> /etc/ssh/sshd_config
|
10 |
+
RUN echo 'PidFile /home/user/ssh.pid' >> /etc/ssh/sshd_config
|
11 |
+
|
12 |
RUN echo 'PubkeyAuthentication yes' >> /etc/ssh/sshd_config
|
13 |
RUN echo 'AllowTcpForwarding yes' >> /etc/ssh/sshd_config
|
14 |
RUN echo 'PermitTunnel yes' >> /etc/ssh/sshd_config
|
15 |
RUN echo 'GatewayPorts yes' >> /etc/ssh/sshd_config
|
|
|
|
|
|
|
16 |
|
17 |
RUN adduser -h /home/user -s /bin/sh -D user
|
|
|
18 |
USER user
|
19 |
ENV HOME=/home/user \
|
20 |
PATH=/home/user/.local/bin:$PATH
|
21 |
|
|
|
|
|
|
|
|
|
22 |
EXPOSE 7860
|
|
|
|
|
|
|
|
|
|
|
23 |
CMD ssh-keygen -t ed25519 -f $HOME/.ssh/id_ed25519 && \
|
24 |
/usr/sbin/sshd -h $HOME/.ssh/id_ed25519 -D -e "$@"
|
|