|
|
@@ -2,6 +2,10 @@
|
|
|
|
|
|
set -eu -o pipefail
|
|
|
|
|
|
+function to_volume {
|
|
|
+ echo "-v $1:/mnt/source${1}:ro"
|
|
|
+}
|
|
|
+
|
|
|
HOSTNAME=$(hostname)
|
|
|
CONTAINER_NAME="borgmatic"
|
|
|
HISTFILE=./data/.bash_history
|
|
|
@@ -9,8 +13,6 @@ SOURCE_DIR=./data/source
|
|
|
|
|
|
touch ${HISTFILE}
|
|
|
|
|
|
-sudo mount --bind /home/ ${SOURCE_DIR}/home
|
|
|
-
|
|
|
# Some of those volumes seem useless, e.g. :
|
|
|
# * the repository (which can be mounted within the container)
|
|
|
# * mounting the data to save on a precise mount point (one could have several..)
|
|
|
@@ -19,7 +21,8 @@ podman run \
|
|
|
--replace \
|
|
|
--detach \
|
|
|
--name ${CONTAINER_NAME} \
|
|
|
- -v ${SOURCE_DIR}:/mnt/source:ro \
|
|
|
+ $(to_volume /home/theenglishway/Documents/cv/) \
|
|
|
+ $(to_volume /home/theenglishway/Documents/formations/5_jours/) \
|
|
|
-v ./data/borgmatic.d:/etc/borgmatic.d/ \
|
|
|
-v /home/theenglishway/.ssh:/root/.ssh \
|
|
|
-v ${HISTFILE}:/root/.bash_history \
|