mirror of
https://www.github.com/b3vis/borg-server
synced 2026-08-05 16:12:46 +02:00
make sure ssh-host-keys get created during container start and are not
part of the image
This commit is contained in:
+1
-1
@@ -3,7 +3,6 @@ MAINTAINER b3vis
|
|||||||
#Install Borg & SSH
|
#Install Borg & SSH
|
||||||
RUN apk add openssh sshfs borgbackup supervisor --no-cache
|
RUN apk add openssh sshfs borgbackup supervisor --no-cache
|
||||||
RUN adduser -D -u 1000 borg && \
|
RUN adduser -D -u 1000 borg && \
|
||||||
ssh-keygen -A && \
|
|
||||||
mkdir /backups && \
|
mkdir /backups && \
|
||||||
chown borg.borg /backups && \
|
chown borg.borg /backups && \
|
||||||
sed -i \
|
sed -i \
|
||||||
@@ -11,6 +10,7 @@ RUN adduser -D -u 1000 borg && \
|
|||||||
-e 's/^PermitRootLogin without-password$/PermitRootLogin no/g' \
|
-e 's/^PermitRootLogin without-password$/PermitRootLogin no/g' \
|
||||||
/etc/ssh/sshd_config
|
/etc/ssh/sshd_config
|
||||||
COPY supervisord.conf /etc/supervisord.conf
|
COPY supervisord.conf /etc/supervisord.conf
|
||||||
|
COPY service.sh /usr/local/bin/service.sh
|
||||||
RUN passwd -u borg
|
RUN passwd -u borg
|
||||||
EXPOSE 22
|
EXPOSE 22
|
||||||
CMD ["/usr/bin/supervisord"]
|
CMD ["/usr/bin/supervisord"]
|
||||||
|
|||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
ssh-keygen -A
|
||||||
|
/usr/sbin/sshd -D
|
||||||
+1
-1
@@ -2,4 +2,4 @@
|
|||||||
nodaemon=true
|
nodaemon=true
|
||||||
|
|
||||||
[program:sshd]
|
[program:sshd]
|
||||||
command=/usr/sbin/sshd -D
|
command=/usr/local/bin/service.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user