The Option -e requires for what?

Hi,
docker run -d -e MYSQL_ROOT_PASSWORD=db_pass123 --name mysql-db mysql

in this command you can see we use “-e” why we used this, and how can we find the available all options list. kindly proved the link for better understanding the options used in docker commands.

Regards,
Zia

@vijin.palazhi kindly help me to understand.

This is used to define environment variables to be made use by the mysql container.

Please see the reference : https://hub.docker.com/_/mysql

https://dev.mysql.com/doc/refman/5.7/en/environment-variables.html

In this example we are setting the MYSQL root password which is expected when the DB starts up.

See the above link for all environment option.

These are specific to the containers and not specific to Docker in general. Hope this helps.

Regards,
Vijin

1 Like

Thanks @vijin.palazhi