Answer the question
In order to leave comments, you need to log in
How to use environment in Dockerfile?
Hello!
Is it possible to use environment variables in Dockerfile using docker-compose?
For example I have docker-compose.yml
app:
build: ./
env_file: dc.env
MY_VAR="my_var"
FROM ubuntu
RUN echo "$MY_VAR"
my_var
how to be? Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question