0

docker-compose.yml

...
args:
  project.version: 1.0.0

Dockerfile

ARG project.version
...
LABEL version=${project.version}

This throws the following error when I try to build the image through docker-compose. failed to build : failed to process "${project.version}": missing ':' in substitution

If I replace project.version with project_version in both files then it fixes the issue. However, I can't do that because I build this image through io.fabric8 docker-maven-plugin too and maven understands project.version and not project_version. Quite a dilemma! Any help is appreciated!

genonymous
  • 1,598
  • 3
  • 18
  • 27

1 Answers1

0

Variables in bash only allow alphanumeric characters and under‐scores.

Please check this answer and this answer.

akathimi
  • 1,393
  • 11