Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Dupe of issue 205, but I could not follow how to fix it. Invalid interpolation format for "environment" option in service "agri-agent" #222

Closed
Eirikur opened this issue Mar 10, 2019 · 8 comments

Comments

@Eirikur
Copy link
Contributor

Eirikur commented Mar 10, 2019

I'm a developer, but new to this, and I've failed to figure this out.
This is what I see when I cd to the docker directory and build.
./manage build

Building agent and wallet containers ...
docker-compose --verbose build agent-wallet-db agri-agent bcreg-agent ministry-finance-agent city-surrey-agent fraser-valley-agent liquor-control-agent worksafe-agent
compose.config.config.find: Using configuration files: ./docker-compose.yml
ERROR: compose.cli.main.main: Invalid interpolation format for "environment" option in service "agri-agent": "${TOB_API_URL:-}"

@Eirikur
Copy link
Contributor Author

Eirikur commented Mar 10, 2019

I could not find the trailing $ that is mentioned in the fix that closed 205, but I have the problem.

@swcurran
Copy link
Collaborator

Odd. I never did figure out what the fix was for 205 - I did not find a trailing space either. What OS are you running this on? We'll see if we can figure it out. We tend to use Windows, Ubuntu 18.04 and Mac and haven't seen this. @esune - please see what you can dig up.

@Eirikur
Copy link
Contributor Author

Eirikur commented Mar 10, 2019

I'm on Linux Mint 19.1, which is based on Ubuntu 18.04.2 they say. This makes it odd that I'm seeing it and you aren't.

@esune
Copy link
Member

esune commented Mar 11, 2019

I'll fire up a Linux box and see what I can find out. It definitely is odd that it would only show up on Linux and not in Git bash...

@swcurran
Copy link
Collaborator

Could it be the ":-" option - is that used elsewhere? It's weird that it's docker-compose that seems to have a problem with something. Should be the same on all platforms.

Perhaps there is an environment variable from the system being referenced that has a trailing "$"?

@WadeBarnes
Copy link
Member

WadeBarnes commented Mar 11, 2019

@Eirikur, Here are a couple of things to try:

  • Remove the :- from the environment variables where no default option is specified. For example ${TOB_API_URL:-}. I believe some flavors of Linux don't like it.
  • The file, at least on my Windows box, has CrLf line endings. You may want to try converting them all to Lf line endings.

Please report findings so we can either investigate further or fix the issue. BTW, PRs are always welcome.

@Eirikur
Copy link
Contributor Author

Eirikur commented Mar 11, 2019

Thanks Wade! That totally did it. If you'd like a PR, I can do that tonight.

@WadeBarnes
Copy link
Member

@Eirikur, You're welcome. Please submit a PR and reference this issue. You did the work, you should get the recognition. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants