Spaces:
Build error
Build error
accplan commited on
Commit ·
9916dc7
1
Parent(s): 0a05646
test
Browse files- Dockerfile +8 -22
- entrypoint.sh +3 -0
Dockerfile
CHANGED
|
@@ -1,23 +1,9 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
RUN
|
| 5 |
-
|
| 6 |
-
RUN
|
| 7 |
-
|
| 8 |
-
RUN echo 'test:test' | chpasswd
|
| 9 |
-
|
| 10 |
-
RUN ls -l /etc/ssh
|
| 11 |
-
|
| 12 |
-
RUN ssh-keygen -A
|
| 13 |
-
|
| 14 |
-
COPY /etc/ssh/ssh_host_dsa_key /etc/ssh
|
| 15 |
-
COPY /etc/ssh/ssh_host_dsa_key.pub /etc/ssh
|
| 16 |
-
|
| 17 |
-
RUN ls -l /etc/ssh
|
| 18 |
-
|
| 19 |
-
RUN service ssh start
|
| 20 |
-
|
| 21 |
EXPOSE 22
|
| 22 |
-
|
| 23 |
-
CMD ["/usr/sbin/sshd","-D"]
|
|
|
|
| 1 |
+
FROM alpine:latest
|
| 2 |
+
LABEL maintainer="victorych"
|
| 3 |
+
RUN apk add --update --no-cache openssh
|
| 4 |
+
RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
|
| 5 |
+
RUN adduser -h /home/victorych -s /bin/sh -D victorych
|
| 6 |
+
RUN echo -n 'victorych:test' | chpasswd
|
| 7 |
+
ENTRYPOINT ["/entrypoint.sh"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
EXPOSE 22
|
| 9 |
+
COPY entrypoint.sh /
|
|
|
entrypoint.sh
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
ssh-keygen -A
|
| 3 |
+
exec /usr/sbin/sshd -D -e "$@"
|