Reputation: 12141
What I want is to run bash command docker-machine ip default
put the result in a variable and use that variable in a string and export
that variable to environment variable. But that doesn't work out as I expected.
Here's my Makefile
so far.
IP := $(docker-machine ip default)
export DATABASE_URL := "postgres://postgres@$(IP)/postgres"
test:
echo $(DATABASE_URL)
py.test tests
When I run make test
I get
postgres://postgres@ /postgres
Upvotes: 0
Views: 92
Reputation: 2176
You need to indicate shell command:
IP := $(shell docker-machine ip default)
$(warning IP=$(IP))
Upvotes: 1