Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to have a nodeJs running on top of the jrottenberg image? #363

Open
geosigno opened this issue Feb 17, 2023 · 2 comments
Open

How to have a nodeJs running on top of the jrottenberg image? #363

geosigno opened this issue Feb 17, 2023 · 2 comments

Comments

@geosigno
Copy link

geosigno commented Feb 17, 2023

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
Copy link

ysle commented Feb 26, 2024

got it as :

FROM jrottenberg/ffmpeg:6-alpine AS ffmpeg
FROM node:18-alpine
COPY --from=ffmpeg / /

# + ... npm ci etc

@douglasg14b
Copy link

This seems to mess up the users & groups for the image. node:node is not available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants