Hello i created a docker image for a node app :
Dockerfile :
FROM node:10-alpine as build-step
WORKDIR /usr/src/app
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
RUN npm install
RUN npm i -g @babel/core @babel/preset-env babel-loader
COPY . .
EXPOSE 5000
CMD ["npm", "start"]
i buil it then i run using this command :
docker run --publish 5000:5000 nodeApp
it runs normally without errors but when i try to connect to it i can't
my request is : http://127.0.0.1:5000/api/auth/login but i don't have response
result of docker ps
question from:
https://stackoverflow.com/questions/66047321/cant-connect-to-node-inside-docker-container 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…