mirror of
https://github.com/ViViDboarder/docker-duplicity-cron.git
synced 2024-11-14 17:46:33 +00:00
16 lines
435 B
Bash
Executable File
16 lines
435 B
Bash
Executable File
#! /bin/bash
|
|
|
|
image_name=$1
|
|
tag=$2
|
|
|
|
full_image="${image_name}:${tag}"
|
|
container_name="${image_name}-${tag}"
|
|
|
|
docker run -d -e CRON_SCHEDULE="0 0 12 1 1 ? *" -e SKIP_ON_START=true --name $container_name $full_image
|
|
sleep 2
|
|
docker exec $container_name sh -c "mkdir -p /data && echo Test > /data/test.txt"
|
|
docker exec $container_name /backup.sh
|
|
docker exec $container_name /verify.sh
|
|
docker stop $container_name
|
|
docker rm $container_name
|