Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add environment variable MYSQL_ROOT_PASSWORD_FILE that allows root password to be set from file contents #36

Closed
wants to merge 3 commits into from

Conversation

kaysond
Copy link

@kaysond kaysond commented Sep 18, 2019

linuxserver.io

Addresses #35

Added an environment variable that's used in the container init file to load the root password from a file. It's only loaded if the normal password env var isn't set. Length check is still applied.

This is useful if you don't want the root password present in your docker-compose, or if you're using docker secrets.

Thanks, team linuxserver.io

@kaysond
Copy link
Author

kaysond commented Oct 18, 2019

I discussed this with a couple of LSIO team members on discord a while back, and the big concern is supporting a feature thats mainly helpful for swarm/kubernetes secrets while the team generally doesn't use either.

That being said, I wanted to show another example where setting the root password from a file is a thing :)
https://portainer.readthedocs.io/en/stable/configuration.html#admin-password

@aptalca
Copy link
Member

aptalca commented Oct 18, 2019

We are still looking into it and experimenting with it. Here's a new image PR that incorporates it: linuxserver/docker-openssh-server#2

If we decide to add that feature, it will likely go into other images as well. We need to experiment and figure out the best way to implement first, so when it's done, it is standard throughout other images.

@thelamer
Copy link
Member

I worked this into a larger overhaul, thank you for the code:
#39

Specifically removed the read check as we are running as root in init.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants