-
-
Notifications
You must be signed in to change notification settings - Fork 757
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
docker-slim build causes "Could not find a suitable TLS CA certificate bundle" in Python requests #101
Comments
Thank you for opening the issue @nottrobin ! Sorry for the headaches! Let me try to repro the condition to investigate this a bit more... |
For what its worth, I am getting a similar issue trying to minify
I was really glad to see someone else with an SSL error, cause this one might be hard to reproduce. :) NOTE: I did "docker exec" into the container while it was sitting on the "Press " prompt, and ran several commands that would have connected to the same "appliance" and validated the SSL certificate. |
Please let me know if there's any way I could help dig into this further. |
I am wondering if you are logging into your container while it is in "build" mode and running it thorough its different options or whatever. I am not sure exactly how it works, but I assume it is watching to see what files are opened by the running app. I am starting to believe that it doesn't work to "docker exec" into it :-/ |
@nottrobin Sorry, didn't get a chance to respond sooner (was traveling at the time). Some application stacks might require additional coverage when the http probe in
If you have a lot of extra http probe commands or if you prefer using a config file you can also use the I'll add an example to the |
@TJM , @nottrobin |
One of the future enhancements will allow |
@nottrobin added an example for your app image here: https://github.com/docker-slim/examples/tree/master/3rdparty/ubuntu-com Note that I also needed to add a couple of extra directories with static web artifacts ( |
@TJM I'm trying to repro your condition... and there's a WIP example for it here: https://github.com/docker-slim/examples/tree/master/3rdparty/morpheus-cli I'm not an expert with morpheus and its cli though. What would be a good set of morpheus cli commands to execute? We can put those cli commands in a shell script, mount running the What are the command line parameters you used trying to minify your morpheus-cli container image? This is what I used for my single command example: P.S. |
@kcq If At a minimum, I think we would need to add all the CA certs. If there is some way to detect when python/ruby/go/etc is opening CA certs, and load all of them, it would probably be a more complete solution. Tommy |
@TJM |
@kcq Right, that works as expected. but this is a CLI tool that could be used to connect to any other morpheus appliance. That only will work if your appliance's cert was signed by that specific CA. However, if it is using the global system certs, perhaps it is as simple as ensuring everything in /etc/ssl is included? ~tommy |
@TJM It's not always enough to include |
Ah yes... its stuff like that where it feels like you still need intimate knowledge of the underlying container OS. The |
I know nothing about
docker-slim
, I don't have a clue how it works, but it looks exciting so I'm giving it a try on our Dockerfile for ubuntu.com.I build the original image as follows:
Then I run
docker-slim
, which appears to succed, and does indeed more than halve the size of the image:But now if I run the site from the new image:
Then I browse to http://127.0.0.1:8222/blog, the "blog" feed fails to load, and I see these errors in the image output:
The container is using requests to query a wordpress API at https://admin.insights.ubuntu.com/wp-json/wp/v2/posts, and it works in the original
ubuntu-com:latest
image. Something about the slimming process appears to be removing something the Requests library needs to verify HTTPS certificates, or something.The text was updated successfully, but these errors were encountered: