From 5888cc30c761789f223a2591442e42c997ec9623 Mon Sep 17 00:00:00 2001 From: valentinab25 <30239069+valentinab25@users.noreply.github.com> Date: Fri, 8 Jul 2022 18:46:26 +0300 Subject: [PATCH] Add key persistence documentation --- Readme.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Readme.md b/Readme.md index 5dec849..197bb06 100644 --- a/Readme.md +++ b/Readme.md @@ -28,6 +28,15 @@ Start client to pack and sync every night: Copy the client SSH public key printed found in console +### SSH key persistence + +To use the same generated keys on docker container re-creation, you need to persist the key directory ( `/root/.ssh` ) in a Docker volume. On first start the keys will be created, and then, on all subsequent starts they will be re-used. + +For example, you can use a volume called `ssh-key` like this: + + $ docker run --name=rsync_client -v ssh-key:/root/.ssh -v client_vol_to_sync:/data + eeacms/rsync client + ### Server setup Start server on `foo.bar.com`