score:0

Accepted answer

i resolved error. need to change workdir /usr/src/app. now my files are like this:

from node:alpine
workdir /usr/src/app
env path="./node_modules/.bin:$path"
copy ./client-app/package*.json .
run npm install
copy ./client-app/ .
run npm run build

version: "3.4"
services:
  app:
    build:
      context: .
      dockerfile: client-app/dockerfile
    volumes:
      - ./:/app
    ports:
      - "3000:3000"
    image: app/react
    container_name: app_container
    command: npm start

score:0

try changing the build context for your client application:

version: "3.4"
services:
  app:
    build:
      context: ./client-app/
      dockerfile: client-app/dockerfile

Related Query

More Query from same tag