I’m attempting to run a docker-compose.yml file in this project, which contains some environment variable interpolation (interpolation docs). For whatever reason its not picking up the var.
There’s a related bug (now closed) in docker-compose. I’ve tried versions 2.20.2 (unstable) and 2.18.1 (23.05) of docker-compose, both are from after the fix for that bug.
What happens:
[bburdette@HOSS:~/op-code/VideoDeduplication]$ echo $BENETECH_DATA_LOCATION
/home/bburdette/thegoods/VideoDeduplication_Files
[bburdette@HOSS:~/op-code/VideoDeduplication]$ docker-compose up -d
parsing /home/bburdette/op-code/VideoDeduplication/docker-compose.yml: invalid interpolation format for services.dedup-app.volumes.[].
You may need to escape any $ with another $.
${BENETECH_DATA_LOCATION:?
Please set "BENETECH_DATA_LOCATION" environment variable to the root folder of your video files.}:/project/data
Q: Is there some perhaps some nixos specific bash behavior that might cause this problem?
I can start building the compose after applying the following patch:
git diff -U1
diff --git a/docker-compose.yml b/docker-compose.yml
index 40fbb133..77c41e10 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -51,3 +51,3 @@ services:
# on your host machine where you placed the source data
- - "${BENETECH_DATA_LOCATION:?\n\nPlease set \"BENETECH_DATA_LOCATION\" environment variable to the root folder of your video files.}:/project/data"
+ - "${BENETECH_DATA_LOCATION:?Please set \"BENETECH_DATA_LOCATION\" environment variable to the root folder of your video files.}:/project/data"
# You can specify BENETECH_FILE_STORAGE_DIRECTORY environment variable to
@@ -95,3 +95,3 @@ services:
# on your host machine where you placed the source data
- - "${BENETECH_DATA_LOCATION:?\n\nPlease set \"BENETECH_DATA_LOCATION\" environment variable to the root folder of your video files.}:/project/data"
+ - "${BENETECH_DATA_LOCATION:?Please set \"BENETECH_DATA_LOCATION\" environment variable to the root folder of your video files.}:/project/data"
# You may want to set BENETECH_TASK_LOGS environment variable to
@@ -132,3 +132,3 @@ services:
# on your host machine where you placed your video files
- - "${BENETECH_DATA_LOCATION:?\n\nPlease set \"BENETECH_DATA_LOCATION\" environment variable to the root folder of your video files.}:/project/data"
+ - "${BENETECH_DATA_LOCATION:?Please set \"BENETECH_DATA_LOCATION\" environment variable to the root folder of your video files.}:/project/data"
# You may want to set BENETECH_TASK_LOGS environment variable to
I canceled the build though:
$ BENETECH_DATA_LOCATION=$(pwd) docker compose build
WARN[0000] The "BENETECH_MODE" variable is not set. Defaulting to a blank string.
WARN[0000] The "BENETECH_MODE" variable is not set. Defaulting to a blank string.
WARN[0000] The "BENETECH_MODE" variable is not set. Defaulting to a blank string.
[+] Building 6.4s (3/3) FINISHED
=> CANCELED [dedup-app internal] booting buildkit 6.4s
=> => pulling image moby/buildkit:buildx-stable-1 6.4s
=> CANCELED [server internal] booting buildkit 6.4s
=> => pulling image moby/buildkit:buildx-stable-1 6.4s
=> CANCELED [celery-worker internal] booting buildkit 6.4s
=> => pulling image moby/buildkit:buildx-stable-1 6.4s
canceled