Fabian Peter Hammerle e2725ad4b4 upgrade alpine base image to v3.15.0 including upgrade of borgbackup package to v1.1.17-r1 & openssh-server package to v8.8_p1-r1 (see below) | 2 years ago | |
---|---|---|
.github | 3 years ago | |
CHANGELOG.md | 3 years ago | |
Dockerfile | 2 years ago | |
Makefile | 3 years ago | |
README.md | 3 years ago | |
borgbackup-package-log.url | 2 years ago | |
docker-compose.yml | 3 years ago | |
entrypoint.sh | 3 years ago | |
openssh-package-log.url | 2 years ago | |
openssh-release-notes.url | 3 years ago | |
sshd_config | 3 years ago |
Single-user OpenSSH server restricted to BorgBackup backend
$ sudo docker run --name borgbackup_sshd \
-v ssh_host_keys:/etc/ssh/host_keys:rw \
-v /somewhere:/repository:rw \
--tmpfs /home/borg/.ssh:mode=1777,size=16k \
--tmpfs /tmp:mode=1777,size=1M \
-p 2200:2200 \
-e SSH_CLIENT_PUBLIC_KEYS="$(cat ~/.ssh/id_*.pub)" \
-e SSH_CLIENT_PUBLIC_KEYS_APPEND_ONLY="$(cat optional-append-only-keys.pub)" \
--read-only --security-opt=no-new-privileges --cap-drop=ALL \
docker.io/fphammerle/borgbackup-sshd
$ borg init --encryption=editme ssh://borg@127.0.0.1:2200//repository
$ borg create --stats ssh://borg@127.0.0.1:2200//repository::{hostname}-{utcnow} \
~/documents ~/photos ...
sudo docker
may be replaced with podman
.
Pre-built docker images are available at https://hub.docker.com/r/fphammerle/borgbackup-sshd/tags (mirror: https://quay.io/repository/fphammerle/borgbackup-sshd?tab=tags)
Annotation of signed git tags docker/*
contains docker image digests: https://github.com/fphammerle/docker-borgbackup-sshd/tags
Detached signatures of images are available at https://github.com/fphammerle/container-image-sigstore
(exluding automatically built latest
tag).
git clone https://github.com/fphammerle/docker-borgbackup-sshd
docker-compose up --build