As the title states, I’m trying to run gimp through a Node.js docker image. I have this working locally, however I get the following error trying to run gimp commands while it is being deployed on google cloud run:
GIMP-Warning: The batch interpreter 'plug-in-script-fu-eval' is not available. Batch mode disabled.
The line of code that triggers this error:
exec('gimp --batch-interpreter plug-in-script-fu-eval -i --verbose -d -f -b 'MY COMMAND', {env:process.env})
The odd thing mostly being that it runs completely fine locally.
My dockerfile:
FROM debian:latest
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . .
RUN apt-get update
RUN apt-get install -y gimp --no-install-recommends
RUN apt-get install -y python
RUN rm -rf /var/lib/apt/lists/*
RUN apt-get update
RUN apt-get -qq install curl
RUN apt-get install -y aptitude
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - && apt-get install -y nodejs && aptitude install -y npm
RUN apt-get update
RUN npm install
EXPOSE 8080
CMD ["npm", "start"]
Any idea why it might work locally but not while being deployed?
2
Answers
The fix was to change the cloud run container's Execution environment from "Default" to "Second Generation"
If you don’t specify an interpreter, Gimp uses the default interpreter (which is script-fu), and it works all the same:
(by the way,
--batch-interpreter plug-in-script-fu-eval
doesn’t work in the local container for me…)