oliverbusk
oliverbusk7mo ago

Trying to install binaries using the INIT_SCRIPT is not working (apt-get or apk add?)

I am trying to use an init script that install poppler. I add the following to the windmill_worker under the environment section: INIT_SCRIPT="apk update && apk add --no-cache poppler-utils" I get this error: {"message":"ExitCode: 127, last log lines:\n./main.sh: line 2: apk update && apk add --no-cache libmagic poppler-utils glib libgl: command not found","name":"ExecutionErr"} Please note, that I have tried to use apt-get as well. Same error.
6 Replies
rubenf
rubenf7mo ago
windmill uses debian so your command must work on a stock debian I imagine that apk doesn't exist on a stock debian
oliverbusk
oliverbusk7mo ago
@rubenf thanks for the fast reply, Ruben. I get the exact same error using INIT_SCRIPT="apt-get install poppler-utils"
rubenf
rubenf7mo ago
it's probably not the same error no
oliverbusk
oliverbusk7mo ago
@rubenf I get the same:
windmill_worker-3 | 2024-04-06T20:11:07.391145Z ERROR windmill_queue::jobs: job 018eb509-44c2-3cf3-300c-2b736a6a0f6e did not succeed: {"error":{"message":"ExitCode: 127, last log lines:\n./main.sh: line 2: apt-get install poppler-utils: command not found","name":"ExecutionErr"}}
windmill_worker-3 | 2024-04-06T20:11:07.391145Z ERROR windmill_queue::jobs: job 018eb509-44c2-3cf3-300c-2b736a6a0f6e did not succeed: {"error":{"message":"ExitCode: 127, last log lines:\n./main.sh: line 2: apt-get install poppler-utils: command not found","name":"ExecutionErr"}}
This is my windmill_worker environment section:
environment:
- DATABASE_URL=${DATABASE_URL}
- MODE=worker
- WORKER_GROUP=default
- INIT_SCRIPT="apt-get install poppler-utils"
environment:
- DATABASE_URL=${DATABASE_URL}
- MODE=worker
- WORKER_GROUP=default
- INIT_SCRIPT="apt-get install poppler-utils"
rubenf
rubenf7mo ago
you should try with bash scripts to check your content, but also, this is pretty surprising, it should work
oliverbusk
oliverbusk7mo ago
It's pretty weird. If I ssh into the Docker container, I can run apt-get fine on any of the workers.... What do you mean with "try with bash scripts"? @rubenf