Docker secrets no longer work because the container does not run as root #9788
Replies: 5 comments
-
I have upgraded to 6.2.4 from 6.1.25 and getting the same error.
The container user is no longer
|
Beta Was this translation helpful? Give feedback.
-
Hey, thanks for opening an issue! I see tikis is some kind of Docker limitation. I'll see if I can work around it. Cheers, James |
Beta Was this translation helpful? Give feedback.
-
https://forums.docker.com/t/only-root-user-has-access-to-the-secret/102774 Let me know if this works. Firefly III runs under the |
Beta Was this translation helpful? Give feedback.
-
EDIT: Silly me, the forum linked above has the same solution. I'm still including my original response here for the record.
Unfortunately, these settings do not work in Podman v4.3.1. I get the following errors when setting the secret's
SolutionWhat did work for me was to change the permission of the secret's source file. For example, if you have secrets:
firefly-db-pass:
file: ./db-pass.txt The permissions of chmod 644 ./db-pass.txt The secret should now be mounted with the new permissions within the container the next time they are launched with |
Beta Was this translation helpful? Give feedback.
-
I've expanded the text in the documentation to account for these things. |
Beta Was this translation helpful? Give feedback.
-
Support guidelines
I've found a bug and checked that ...
Description
After the upgrade from 6.1.25 to 6.2.* it gives the following error when starting up the docker container:
For so far I have tried to get to the bottom of the cause, I believe it has to do with the change to the user in the container not being root anymore.
I make use of docker secrets for the passwords with the environment variables set to:
/run/secrets/firefly_iii_db_password
Those secret files are owned by root and have only user r+w permissions.
This would explain why the error states that password is not used, because it cannot open the file anymore.
Debug information
see above.
Expected behaviour
No response
Steps to reproduce
No response
Additional info
No response
Beta Was this translation helpful? Give feedback.
All reactions