Docker module not found

I am trying to deploy my node js web app. this contains one python file which I am calling from node using ‘child-process’. I tried to deploy this in docker environment because some dependencies required by python is not present in python environment.

So, the project has been deployed successfully but when I tried to send the request where I need that python file to run, I am getting error as no module found…

I already installed all the libraries using docker, still getting error.

Is there anyone know how to fix this ?

The docker code is :-

Stage 1: Python build

FROM python:3.9 AS python_builder

Set the working directory

WORKDIR /app

Copy the Python dependencies files to the working directory

COPY requirements.txt ./

Install Python dependencies

RUN pip install --no-cache-dir -r requirements.txt

Copy the rest of the project files to the working directory

COPY . .

Stage 2: Node.js runtime

FROM node:14

Set the working directory

WORKDIR /app

Copy the built Python application from the previous stage

COPY --from=python_builder . .

Copy the package.json and package-lock.json files to the working directory

COPY package*.json ./

Install npm dependencies

RUN npm install

Expose the port on which your Express application runs (replace 3000 with your desired port)

EXPOSE 8000

Specify the command to run your application

CMD [ “npm”, “start” ]

Hi,

I’ve responded to the ticket you also created. Let’s keep the conversation in one place (on the ticket) and you can update this post when we get to the solution.

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.