dockerintellij-idea

IntelliJ Docker plugin use env file


I am trying to execute a Docker run with an env file inside of IntelliJ. Is there a way to run the image with this parameter supplied? When going to the CLI settings it fails to execute by saying --env-file is an invalid parameter.


Solution

  • Under the Docker run configurations, select Dockerfile as the type. Then enter --env foo.env (or equivalent) into the Command line options line. The Command preview should now show the use of the environment file specified previously.