Export all Synology Container Manager or Docker containers' settings as json files to your docker shared folder
The exported json files can later be imported in Synology's Container Manager ui or Docker ui.
The advantage of the exported json files is they are truly portable as each container's mapped volumes are not hard coded to a specific volume. DSM knows what volume each shared folder is located on.
There are 2 options you can set in the script:
# Delete json exports older than X days
DeleteOlder=7
# Specify containers to ignore if you don't want to export their settings
# For example:
# IgnoredContainers=(jitsi_jicofo jitsi_jvb jitsi_prosody jitsi_web synology_docviewer_2)
IgnoredContainers=
See How to run from task scheduler
How to enable SSH and login to DSM via SSH
sudo -s /volume1/scripts/syno_docker_export.sh
Note: Replace /volume1/scripts/ with the path to where the script is located.
If the script won't run check the following:
sudo -s "/volume1/my scripts/syno_docker_export.sh"
sudo chmod +x "/volume1/scripts/syno_docker_export.sh"
Importing the exported json files in Synology's Container Manager ui or Docker ui