Docker Community Forums

Share and learn in the Docker community.

Strange problem in using node server docker image


I have created a node back-end server. that has nearly 20 API services. Everything is working fine in local system. Problems starts when using docker image. I can able to create docker image successfully using below docker file setup.
FROM node:12-alpine
RUN apk update && apk add python make g++ && rm -rf /var/cache/apk/*
RUN mkdir -p /home/FACE_RECOGNITION_SOFTWARE/backend/node_modules && chown -R node:node /home/FACE_RECOGNITION_SOFTWARE/backend
COPY package.json ./*
USER node
RUN npm install --only=production
COPY --chown=node:node . .
ENTRYPOINT [ “node”, “server.js”]

Docker image is running in container as usual. but when i am making api requests from postman, only specific APIs are giving proper response but remaining APIs are giving empty response. I have tried running docker image in both local system and aws ec2 instance. same issue is coming. But without using docker image, all the APIs are giving proper response when i am running it locally without docker image.

Kindly help me out to sort out this issue.