-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 required libraries for sentry-ldap-auth to base Sentry image #882
Comments
I think we just need to add |
After extending the Docker Image with those Dependencies the installation works on my side. I also would love to see this change coming |
Okay tried this locally and it requires the whole build chain ( |
We've gotten it working locally with |
Is it the ldap python module itself that needs to compile? What if it were preinstalled during the Dockerfile creation, and then gcc, etc removed after? (That could be a problem though if the plugin later requires a newer version of the python module...) Would it be reasonable to just absorb the cost of the gcc / dev space in order to also support other plugins in the future? ....Could we add a plugin file that does the apt install? Pinning the version is a requirement, too, though... and I think it would have to do the apt install every run? What if the install.sh process went back to a Dockerfile that just starts with the appropriate FROM and nothing else? Then additional local modifications can be made in place? I've already modified my .env to
And the docker-compose to:
but this gives errors (which can be ignored, but could be confusing) during the install.sh because it tries to fetch my custom image from global docker registry. My dockerfile:
|
My solution is:
It won't inflate the image size too much. By the way, I made a new ldap plugin that based on Banno/getsentry-ldap-auth. It upgraded the dependency Please ref: PMExtra/sentry-auth-ldap and https://pypi.org/project/sentry-auth-ldap/ |
Nice, thanks for sharing @PMExtra! |
Because of the ldap dependencies problem, I have manually rollbacked the docker-compose.yml to build my local image in months. Refer to my above comment. Actually, I'm a supporter of building the local image. But now I'm facing a new problem. In the old docker-compose.yml, sentry-cleanup-local-onpremise is depends on another local image sentry-local-onpremise. But the new docker compose 2.0 will build images parallelly. So building may be failed or incorrectly refer the old base image. refer docker/compose#5228 and docker/compose#6332 So, I think we have just one solution if we don't want a 3rd party tool. Just combine the cron/Dockerfile and sentry/Dockerfile and use multi-stage builds. I will do it anyway, I just hope you'll consider to adopt this solution, this will help me a lot to avoid manually solving conflicts again and again when I pull the updates from official. Please let me know if you approve this, I can make a pull request for it. |
I think this issue is asking for a very specific solution without clearly stating the problem it is trying to solve. Here is what I think is problematic with the current approach of installing dependencies and plugins:
The proposed solution might work for popular or commonly used plugins, but I reckon it is not feasible to include every possible plugin and their dependencies within the base image. Thus, I propose that the solution should allow installation of plugins and dependencies:
|
I strongly disagree with defaulting to building local images but it is clear that we need to find a solution for a bit more customization. Can one not use |
Can you eloborate why? The default |
@spawnia that's mostly what I'm suggesting but without including that |
I don't think there is a way to define What precisely is the issue with building local images? It seems like the most natural way to solve exactly the issue at hand: enhancing the base image with additional functionality and using it for multiple services. |
They are not: https://docs.docker.com/compose/compose-file/build/#consistency-with-image -- That said you would need to override the
We moved away from that approach because it was a maintenance nightmare: #834 (comment) |
Yeah, it looks like I read through #834 and the comments in there. I totally agree that the bulk of the image should come pre-built from the registry. Forgive my stubborness, but how is it problematic for maintenance or administration to have minimal modifications persisted in a locally built image? I fail to come up with a series of steps or a scenario where it would be an issue. It seems to work fine with |
I dislike Anyhow, I think I have some past trauma clouding my judgement at this point and I cannot find rational reasons to refute your points ergo, would you be willing to submit a PR demonstrating your idea and let's see how that works out, and whether the CI likes it? :) |
Summary
Since the Dockerfile is being removed and we can no longer build with these libraries locally, we're hoping they can be added to the base image. We're referencing a comment left by another user on the PR that took out the Sentry Dockerfile: #834 (comment)
Motivation
It allows the use of the ldap plugin for authentication.
Additional Context
N/A
The text was updated successfully, but these errors were encountered: