How to have a nodeJs running on top of the jrottenberg image?
geosigno opened this issue · 2 comments
geosigno commented
I would need to have my nodejs app runing on top of the jrottenberg image.
Here my docker file:
FROM node:18-alpine as builder
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY . .
RUN yarn build
FROM jrottenberg/ffmpeg:4.4-nvidia AS FFmpeg
RUN chown root:root -R /usr/local
FROM node:18-alpine
COPY --from=FFmpeg /usr/local /usr/local
WORKDIR /usr/src/app
ENV PATH="${PATH}:/usr/local/bin"
COPY package.json yarn.lock ./
RUN yarn install --production --frozen-lockfile
COPY --from=builder /usr/src/app/dist ./dist
EXPOSE 4343
CMD [ "node", "dist/index.js" ]
The image is correctly built but I got this error on my nodejs app
Error: spawn /usr/local/bin/ffprobe ENOENT
The ffprobe binary is in /usr/local/bin/. The PATH includes "/usr/local/bin/".
Even when doing /usr/local/bin/ffprobe [arguments]
directly from my VM it doesn't work.
I don't know what else to check..
ysle commented
got it as :
FROM jrottenberg/ffmpeg:6-alpine AS ffmpeg
FROM node:18-alpine
COPY --from=ffmpeg / /
# + ... npm ci etc