Docker and CI/CD · Junior · Question 31 of 75

How do you pass an environment variable when starting a container?

Explanation

-e sets one variable and --env-file .env loads many. Configuration from the environment lets the same image run in every environment.

Further reading

Problem with a question

Docker and CI/CD · Junior · question 31

Test yourself

Take the Docker and CI/CD · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz