Move keygen so we can autossh and not care if the pod dies
Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
parent
a8bbb48877
commit
9af04b6208
|
@ -1,6 +1,7 @@
|
|||
FROM library/alpine
|
||||
RUN apk add --no-cache openssh && \
|
||||
sed -i /etc/ssh/sshd_config -e s/'#Port.*'/'Port 2222'/ -e s/'AllowTcpForwarding.*'/'AllowTcpForwarding yes'/
|
||||
sed -i /etc/ssh/sshd_config -e s/'#Port.*'/'Port 2222'/ -e s/'AllowTcpForwarding.*'/'AllowTcpForwarding yes'/ && \
|
||||
ssh-keygen -A
|
||||
RUN adduser -D -s /bin/ash beagle
|
||||
ADD beagle.key /home/beagle/.ssh/authorized_keys
|
||||
RUN passwd -u beagle && \
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
docker build . -t imartyn/ssh
|
||||
docker push imartyn/ssh
|
|
@ -23,7 +23,7 @@ spec:
|
|||
command:
|
||||
- sh
|
||||
- -c
|
||||
- ssh-keygen -A; /usr/sbin/sshd -D -p 22
|
||||
- /usr/sbin/sshd -D -p 22
|
||||
ports:
|
||||
- containerPort: 22
|
||||
name: ssh
|
||||
|
|
Loading…
Reference in New Issue