oliverbusk
oliverbusk11mo 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.
7 Replies
rubenf
rubenf11mo 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
oliverbuskOP11mo ago
@rubenf thanks for the fast reply, Ruben. I get the exact same error using INIT_SCRIPT="apt-get install poppler-utils"
rubenf
rubenf11mo ago
it's probably not the same error no
oliverbusk
oliverbuskOP11mo 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
rubenf11mo ago
you should try with bash scripts to check your content, but also, this is pretty surprising, it should work
oliverbusk
oliverbuskOP11mo 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
M.dot
M.dot4w ago
hey everyone, is the issue solution for the poppler install. i been going on 5 days trying to get it installed to use Zerox OCR. Ived build it the container using Poppler in an Alpine base image. copy all the files from the Copy pdftoppm and all shared libraries from the builder stage. i tried the says as above .. install binaries using the INIT_SCRIPT in my docker-compose yml . im newer to containers and cant put my finger on whats going wrong. thanks in advance for any help

Did you find this page helpful?