Im trying to link two containers to one app, and want to reference those apps hostname/url in an env.
Then the main application can run, but i cannot manage to get the values properly.
Dockerfile of main app contains this
ENV APP1_URL app1
ENV APP2_URL app2
When running
docker run -d -p 22222:3000 --link app1:app1 app2:app2 --name mainapp user/image
Main app needs those env to run, how can i get those values?