Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

653
Visualizações
How to solve ERR_EMPTY_RESPONSE in docker image?

my docker file:

# Use the official Node.js 10 image.
# https://hub.docker.com/_/node
FROM node:13.12.0-alpine

# set working directory
WORKDIR /app

# add `/app/node_modules/.bin` to $PATH
ENV PATH /app/node_modules/.bin:$PATH

# install app dependencies
COPY package.json ./
RUN npm install
# RUN npm install react-scripts@3.4.3 -g

# add app
COPY . /app


CMD ["npm", "start"]

I buiild:

$ docker build . -t myapp
Sending build context to Docker daemon  2.051MB
Step 1/7 : FROM node:13.12.0-alpine
 ---> 483343d6c5f5
Step 2/7 : WORKDIR /app
 ---> Using cache
 ---> c731f744759f
Step 3/7 : ENV PATH /app/node_modules/.bin:$PATH
 ---> Using cache
 ---> e1f5f853c8c6
Step 4/7 : COPY package.json ./
 ---> Using cache
 ---> f831911acf6c
Step 5/7 : RUN npm install
 ---> Using cache
 ---> c18449857dd2
Step 6/7 : COPY . /app
 ---> Using cache
 ---> 4b99412d4725
Step 7/7 : CMD ["npm", "start"]
 ---> Using cache
 ---> e565a34838d5
Successfully built e565a34838d5
Successfully tagged myapp:latest
SECURITY WARNING: You are building a Docker image from Windows against a non-Win                                       dows Docker host. All files and directories added to build context will have '-r                                       wxr-xr-x' permissions. It is recommended to double check and reset permissions f                                       or sensitive files and directories.

Run:

docker run -p 3000 myapp

> myapp-fe@0.1.0 start /app
> react-scripts start

ℹ 「wds」: Project is running at http://172.17.0.3/
ℹ 「wds」: webpack output is served from
ℹ 「wds」: Content not from webpack is served from /app/public
ℹ 「wds」: 404s will fallback to /
Starting the development server...

Compiled successfully!

You can now view rugvista-fe in the browser.

  Local:            http://localhost:3000
  On Your Network:  http://172.17.0.3:3000

Note that the development build is not optimized.
To create a production build, use npm run build.

Visiting: http://localhost:3000/ gives ERR_EMPTY_RESPONSE

What am I doing wrong?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Add this in your docker file before npm start

EXPOSE 3000/tcp

Modify your COPY . /app to COPY . .

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda