1

How can I interpolate env vars when using docker-compose . if I have a following vars.env file :

VAR_1=value_1
VAR_2=value_1/value2
VAR_3=value_1/value3

I would like to interpolate using of VAR_1 like this

VAR_1=value_1
VAR_2=${VAR_1}/value2
VAR_3=${VAR_1}/value3

But it is not working. Any idea ?

1 Answer 1

1

This is not supported. You can however use an .env file to set the value of $VAR_1: https://docs.docker.com/compose/env-file/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.