-
Notifications
You must be signed in to change notification settings - Fork 141
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
Fix docker-compose dexidp startup #316
Conversation
There was some change in the last year to use a non-root user for the Dex image. This causes permission issues when mounting files, since the non-root user cannot access the mount. The workaround is to run as root, which should be fine for development. See dexidp/dex#1649 Signed-off-by: Hayden Blauzvern <[email protected]>
@@ -47,6 +47,7 @@ services: | |||
- ct_server | |||
dex-idp: | |||
image: dexidp/dex:v2.30.0 | |||
user: root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if we change the location of the config file to a tmp directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this out too, I get permission issues with any directory. For example, if I mount ./config/dex to /tmp, the default user can't access /tmp. When I shell into the image without mounting a file, I'm able to access /tmp though, so I assume this is from the docker process that mounts the directory overriding the directory permissions.
@mattmoor Could we get this merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing against the fix, just wish it wasn't required...
I'm also curious if we can find a way to not need this (do we in prod?), but I'm unfamiliar with docker compose to be of any real help. |
In prod, we load the config in directly, i.e
I'll look at making that change. |
There was some change in the last year to use a non-root
user for the Dex image. This causes permission issues
when mounting files, since the non-root user cannot
access the mount. The workaround is to run as root,
which should be fine for development.
See dexidp/dex#1649
Signed-off-by: Hayden Blauzvern [email protected]