-
Notifications
You must be signed in to change notification settings - Fork 184
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
Official docker image need more modules #344
Comments
We cannot and will not add all prerequisites for all 60+ modules to the Docker image, and "popular" would appear to be in the eyes of the beholder, no? |
@jpmens Actually, why not add them all? At worst it makes the Docker build time slightly longer, and the image slightly bigger. Any that you don't use yourself just sit there unused. And they don't interfere with your local Python environment. It might just mean a bit of playing whack-a-mole explicitly listing them all. |
Which ones will work currently? I think email works, but if that is the only one, I am not quite sure what the use of this docker image will be. Please consider adding all if not most. |
Hi there, as #127 will wrap the dependency management into the canonical The "full" flavor could be spawned from the pip level as an "extra" requirement, acting as a driver for the pip-in-docker building we will approach eventually after integrating the "develop" branch. Regarding dockerized setups, we could think about publishing a distinct On the other hand, i am also keen on adding a subcommand to mqttwarn like By combining both tactics, we could get the best out of different worlds, but that's really just my personal two cents. With kind regards, P.S.: When looking at a similar scenario in the Debian ecosystem, we find packages like |
@amotl what is the reason to NOT install all the possible dependencies at once? (Other than taking up disk space.) I'm not a Python dev, so I don't know if it's a compatibility issue or such. |
@tinuva here's what is currently included: https://github.com/jpmens/mqttwarn/blob/master/Dockerfile#L5 What packages do you install? |
shrugs I will accept a PR for the Dockerfile to include more services; I don't think we should over-complicate this and I also don't think building |
@amotl I'd like to not confuse the use of Docker now with the use of Docker with the But I do already have a candidate, which in fact is the one I've been running for the past few months: https://github.com/rgitzel/mqttwarn/blob/docker-pip/Dockerfile |
@rgitzel: Thanks for asking! Not all service plugins have well defined upstream dependencies on PyPI. We were having our times with XMPP for example. While i definitively want to approach a wash & go "full setup", i am as conservative as @jpmens here until we got everything rock solid. When turning into that direction, we will probably come across having to decide whether we should publish own stable forks of specific service plugin dependencies to PyPI. It's just a story of turtles all the way down and will probably require quite some amount of tedious homework. I don't want to push this that fast but i am confident everything will converge at some time in the future. mqttwarn-ng from #127 will include the most important subset of dependencies anyway. For example, every service plugin calling out the HTTP APIs using the fine Don't get me wrong: There should be some convenient way to perform a thing which might be called "full setup", this will also help an expanding #332 when running on CI through That said, i want to add that i really like the growing interest around mqttwarn from all of you. @jpmens and me might just have specific hats on but as you can recognize, we are really cheering the growing developer community around mqttwarn and will do our best to keep this flowing. So: Further suggestions about these topics will always be received with gratitude. Thanks for your efforts, you know who you are. |
Hey Guys, I think going down the path of having ALL the modules installed on an image would be somewhat troublesome as it would increase the image size exponentially. Also, Using a tag to define the modules would also be difficult if there is more than one module requirement. How would you be able to use Pushbullet and MySQL and hipchat all in the one image? @amotl is on the money though with having a command that you can run to install them, as you’d be able to use your own dockerfile to specify the modules you want if need be. Failing that, could you use arguments to install the plugins on first run? That way when you use ‘docker run’ you will be able to pass arguments for the module installation at the end of the command. |
I did an experiment to create a Docker image which includes as many dependencies as I could find reading through the README: https://github.com/rgitzel/mqttwarn/blob/docker-dependencies/Dockerfile#L5 With all those dependencies added, the Docker image is 420Mb With very few dependencies, the "official" image built yesterday is 356Mb So basically installing all the extra libraries results in no appreciable difference in size. Then I modified it to use Alpine as the base OS, which reduced the image to 117Mb That's indeed smaller, but frankly I don't think it's worth the work sorting out all the picky library bits that are missing from Alpine (indeed, the Azure library would be painful). 420Mb isn't anything out of the ordinary, particularly for a server application. CAVEAT: I haven't tested either of these images beyond running them on the command-line:
Because Python is interpreted, the app probably won't fail for a given plugin until it's run. But at least those many dependencies installed without any apparent conflict. @tinuva could you give one or both of the new images a try? And if anyone notices any dependency I missed (other than the Mac-dependent ones), let me know and I'll add them. |
@rgitzel tested both and both work for me at least. Which is smtp+pushbullet+slack Going to leave it on the Alpine image, which is what I prefer where possible. My docker-compose snippet:
|
I may be coming late to this. But as someone that a, uses mqttwarn in docker, and b, has a couple of services that for various reasons, wont be incorporated. I would like to see a way of adding custom services to the docker image. To enable this system, I end up building my own docker images....but I also build arm32v7, arm64v8 and amd64 images all at once. What about a solution where there's a main "services" folder with the pre-built, tested, and selected services. Controlled via the repository. And then via a config option a "user_services" folder, where any .py files in here can be added to the running set. I believe this method would satisfy the requirement of keeping the installed set of services down, and allowing users to add to extras (from the repository) and/or home built. |
I think @rgitzel 's experiment is doing well. See the most popular mqttwarn container on hub.docker.com.... That said, I will be perfectly happy with a base mqttwarn image that is able to install additional dependencies on demand. |
@tinuva Holy smokes!!! That's fantastic. :-) Ironically I don't use my own image, I use the "official" one. Perhaps will need to take mine down and somehow point to the official one... or perhaps a new release of the latter might incentivize people? @jpmens Anyway... Docker images aren't really meant to be "extendable" (or even "configurable") once they are built; typically you fork and modify an existing But thoughts about other ways to accomplish some customization...
With the latter, there might be a way to stop and restart that particular container, so as not to lose all your changes. Hmm. The thing to remember is that a |
Dear @tinuva, @rgitzel, @tomhoover, @egadgetjnr, @psyciknz and all Docker lovers, #127 and #336 have come pretty far that we might think about improving the Dockerization once more.
Service plugins can now be installed selectively by using With kind regards, |
Just for the records...@rgitzel asked on Oct 30, 2018:
@tinuva has a nice Dockerfile with some extended dependencies for serving more service plugins out of the box. @amotl commented on Oct 30, 2018:
|
Hi again, I believe we resolved this per #506. Please let us know about your experiences with those images and feel free to reopen this issue if you feel some details would need more attention. Keep up the spirit and with kind regards, [1] https://github.com/users/jpmens/packages/container/package/mqttwarn-full |
I have been following issue 341 and is really excited to be able to use it, however I think it needs some of the prerequisites added to the Dockerfile.
For example the following log entries work on my standalone install:
On the normal install I am able to install the dependencies, but the docker image mean I need to build my own for my specific needs unless you could add some of the popular ones at least.
Many thanks in advance!
The text was updated successfully, but these errors were encountered: