Merge pull request #6 from FacundoAcevedo/feature/pre-commit
This commit is contained in:
commit
891c0e97c5
|
|
@ -7,4 +7,4 @@ updates:
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
# Check for updates to GitHub Actions every weekday
|
# Check for updates to GitHub Actions every weekday
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v3.2.0
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: check-yaml
|
||||||
|
- id: check-added-large-files
|
||||||
|
- id: check-case-conflict
|
||||||
|
- id: check-executables-have-shebangs
|
||||||
|
- id: check-json
|
||||||
|
- id: pretty-format-json
|
||||||
|
- id: detect-private-key
|
||||||
|
- repo: https://github.com/hadolint/hadolint
|
||||||
|
rev: v2.8.0
|
||||||
|
hooks:
|
||||||
|
- id: hadolint
|
||||||
|
- repo: https://github.com/gruntwork-io/pre-commit
|
||||||
|
rev: v0.1.16
|
||||||
|
hooks:
|
||||||
|
- id: shellcheck
|
||||||
|
exclude: ^(files/manifests/|templates/)
|
||||||
|
|
@ -1,17 +1,21 @@
|
||||||
FROM alpine:latest
|
FROM alpine:3
|
||||||
MAINTAINER b3vis
|
LABEL maintainer="b3vis"
|
||||||
|
|
||||||
#Install Borg & SSH
|
#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 && \
|
RUN adduser -D -u 1000 borg && \
|
||||||
mkdir /backups && \
|
passwd -u borg && \
|
||||||
|
mkdir -m 0700 /backups && \
|
||||||
chown borg.borg /backups && \
|
chown borg.borg /backups && \
|
||||||
sed -i \
|
sed -i \
|
||||||
-e 's/^#PasswordAuthentication yes$/PasswordAuthentication no/g' \
|
-e 's/^#PasswordAuthentication yes$/PasswordAuthentication no/g' \
|
||||||
-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
|
COPY service.sh /usr/local/bin/service.sh
|
||||||
RUN passwd -u borg
|
|
||||||
EXPOSE 22
|
EXPOSE 22
|
||||||
VOLUME /etc/ssh
|
VOLUME /etc/ssh
|
||||||
|
|
||||||
CMD ["/usr/bin/supervisord"]
|
CMD ["/usr/bin/supervisord"]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue