Pin alpine version to 3
Update deprecated maintainer syntax Pin packages to last version Eneble user in the same RUN that creates it
This commit is contained in:
parent
845bca9e18
commit
63f6ffc5d0
14
Dockerfile
14
Dockerfile
|
|
@ -1,17 +1,21 @@
|
|||
FROM alpine:latest
|
||||
MAINTAINER b3vis
|
||||
FROM alpine:3
|
||||
LABEL maintainer="b3vis"
|
||||
|
||||
#Install Borg & SSH
|
||||
RUN apk add openssh sshfs borgbackup supervisor
|
||||
RUN apk add --no-cache openssh=8.8_p1-r1 sshfs=3.7.2-r0 borgbackup=1.1.17-r2 supervisor=4.2.2-r2
|
||||
RUN adduser -D -u 1000 borg && \
|
||||
mkdir /backups && \
|
||||
passwd -u borg && \
|
||||
mkdir -m 0700 /backups && \
|
||||
chown borg.borg /backups && \
|
||||
sed -i \
|
||||
-e 's/^#PasswordAuthentication yes$/PasswordAuthentication no/g' \
|
||||
-e 's/^PermitRootLogin without-password$/PermitRootLogin no/g' \
|
||||
/etc/ssh/sshd_config
|
||||
|
||||
COPY supervisord.conf /etc/supervisord.conf
|
||||
COPY service.sh /usr/local/bin/service.sh
|
||||
RUN passwd -u borg
|
||||
|
||||
EXPOSE 22
|
||||
VOLUME /etc/ssh
|
||||
|
||||
CMD ["/usr/bin/supervisord"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue