Sem descrição

dependabot[bot] 43a9e73cc9 Bump docker/setup-buildx-action from 2.0.0 to 2.1.0 (#30) há 2 anos atrás
.github 43a9e73cc9 Bump docker/setup-buildx-action from 2.0.0 to 2.1.0 (#30) há 2 anos atrás
CHANGELOG.md 4e1e6a3337 release v0.1.1 há 3 anos atrás
Dockerfile 6ce4550eb6 Bump alpine from 3.16.1 to 3.16.2 (#27) há 2 anos atrás
Makefile a890c27fad release v0.1.0 há 3 anos atrás
README.md 91f973eab6 added readme há 3 anos atrás
borgbackup-package-log.url 62997f8d5b upgrade borgbackup package from v1.1.17-r2 to v1.2.0-r0 há 2 anos atrás
docker-compose.yml 63445c524a docker-compose: increase memory limit há 3 anos atrás
entrypoint.sh a57c633cdd authorize public keys in env var SSH_CLIENT_PUBLIC_KEYS_APPEND_ONLY in append-only mode há 3 anos atrás
openssh-package-log.url 62997f8d5b upgrade borgbackup package from v1.1.17-r2 to v1.2.0-r0 há 2 anos atrás
openssh-release-notes.url 80a654ad49 upgrade openssh server package v8.6_p1-r{2->3} (CVE-2021-41617) há 3 anos atrás
sshd_config a57c633cdd authorize public keys in env var SSH_CLIENT_PUBLIC_KEYS_APPEND_ONLY in append-only mode há 3 anos atrás

README.md

docker: borgbackup-sshd 💾 🐳 🐙

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).

Docker Compose 🐙

  1. git clone https://github.com/fphammerle/docker-borgbackup-sshd
  2. Add public keys to docker-compose.yml
  3. docker-compose up --build