BACKUP_STOP_CONTAINER_LABEL not stopping container when referencing an env variable #321
-
|
I chose to externalize all of my docker-volume-backup configuration parameters to an external docker env file. My goal is to have a consistent approach to my backups, having only to change one file if I want to make a holistic change. I only need to set This approach works perfectly, save for docker-volume-backup stopping the container. I've tried setting I'm honestly unsure if this is a bug, an unsupported feature, or my understanding docker. Here are the important bits from my configuration files: docker-compose.yaml external.env Any support or suggestions would be much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
|
Do you mount the host's docker socket into the backup container? I.e. does your list of |
Beta Was this translation helpful? Give feedback.
Your assumptions are correct, yes. Even if expanding env vars by default would probably make sense, it's a breaking change I can't easily introduce here (see #80).
I think there should be a workaround for you though. When you use the
conf.dfeature and mount your configuration file into the container, its content will be sourced before the values are passed to the script. I think this should expand the values in your.envfiles and give you what you want, even if it's a bit pell-mell.See
docker-volume-backup/entrypoint.sh
Lines 17 to 22 in 64daf7b