3 Replies
Thanks for tagging me @rubenf. I'll look through relevant sources and get back to you shortly.
-----------------------------
While I generate an answer, here are some sources that might be helpful:
* Preinstall Binaries
* Workers and Worker Groups
* Core Concepts
* feature: Improve packaging/distribution of components?
-----------------------------
Answer
To preinstall binaries in Windmill, you have two main approaches: extending the base Docker image or using init scripts.
1. Extending the base Docker image: You can create a custom Docker image by extending the base image provided by Windmill and then use
apt
or other package managers to install the binaries you need. Here’s an example Dockerfile snippet for installing Node.js and npm packages:
(1)
2. Using init scripts: Init scripts are executed at the beginning when the worker starts, allowing you to install binaries or set initial configurations without modifying the base image. You can set these scripts from the Worker Management UI at the worker group level. Here is an example init script for installing Playwright via pip:
(2) (3)
These binaries are then available for use in your Windmill scripts and flows. Remember that the init scripts are executed every time a worker starts, while extending the base Docker image is a one-time setup that persists across worker restarts.Feel free to tag me @Ask Inkeep for any follow-ups. Also appreciate any feedback, it helps me improve.