Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

377
Vistas
Docker Build Failing on Travis --> can't find app/build

I am trying to push my images from Travis CI to docker hub.

Here is my Dockerfile

FROM node:alpine as builder 
WORKDIR /app
COPY ./package.json ./
RUN npm install
COPY . .
CMD npm run build


FROM nginx
EXPOSE 3000
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/build /usr/share/nginx/html

My .travis.yml

sudo: required
services:
  - docker

before_install:
  - docker build -t aseel/react-test -f ./client/Dockerfile.dev ./client

script:
  - docker run -e CI=true aseel/react-test npm run test

after_success:
  - docker build -t aseel/multi-client ./client
  - docker build -t aseel/multi-nginx ./nginx
  - docker build -t aseel/multi-server ./server
  - docker build -t aseel/multi-worker ./worker
  - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_ID" --password-stdin
  - docker push aseel/multi-server
  - docker push aseel/multi-nginx
  - docker push aseel/multi-worker
  - docker push aseel/multi-client

The reason the push is failing is because this command

docker build -t aseel/multi-client ./client

is failing on travis (but not locally).

More specifically, I'm getting this error on travis

COPY failed: stat /var/lib/docker/overlay2/135282513e177be132b6978986f878ba61f3b89914b6b2f7030cbafa0d33f629/merged/app/build: no such file or directory

Any idea why this is happening?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I needed to switch CMD to RUN -- It was a pretty silly mistake

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda