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
Source: stackoverflow.com
Related Query
- Docker compose can't correct build react app
- JavaScript heap out of memory while build react app in docker container
- Unable to run a development build of a React app in a Docker container using node:alpine
- Docker compose not properly copying files to run react app
- How to deploy React app with docker and serve -s build
- React app set proxy not working with docker compose
- Docker fails to build - Create React App + Tailwind /bin/sh: craco: not found
- Not able to figure out why docker compose up is not running my React JS App
- How to share build app directory with nginx directory path with docker compose
- docker react app shuts down after compose
- Docker Compose with Docker Toolbox: Node, Mongo, React. React app not showing in the said adress
- Build the docker with react app throws error
- React app docker container exits/restarts after executing npm run build command
- Create React App fails to build inside docker
- React Native 0.64 won't build iOS app after updating Xcode to 12.5 and iOS to 14.5
- React app exiting in docker container with exit code 0
- Why does my React Native app build successfully despite TypeScript compiler error?
- Docker Create react app hot reload not working
- How to show build datetime on my react web app using create-react-app?
- is there a way to build a react app in a single html file?
- Could not find a required file. Name: index.html in react with docker compose
- Why does production build of React app (with Webpack and Babel) use wrong development env with HMR, which causes errors?
- Build a React App in Elastic Beanstalk
- can't run react app with docker container
- create react app not loading css background images in dev or build
- Cant load a react app after starting server
- Can a React app have components in different JS files without a build system?
- create react app Configuration file after build app
- How to analyze create react app build size and reduce it?
- Build React app generate static files with chunk suffix
More Query from same tag
- Need help on making a nav bar show images from api
- maxDate in Material UI MobileDatePicker doesn't work
- componentDidMount multiple fetch calls best practice?
- How to load a component from a button click in react?
- Jest: Received number of calls: 0
- this.setState is not a function
- Next Js dynamic imports with no SSR not working
- jsx-a11y returning Form label must have associated control when there is an htmlFor
- How to Import CSS Module React and JSX? ( Error )
- Merging state with object from loop react
- Whats the best way to make use of a counter variable in this nested 'map' loop so that each square key or value incremenents up from 1 to 9
- React native List View onEndReached calling multiple times
- React-table in Material UI Dialog causes "Error: Maximum update depth exceeded. " when selecting a row and exporting it via useMountedLayoutEffect
- Getting an error with react-router-dom, that I can't solve
- NPM Bandwidth Usage
- Uploading single File mongoDb
- ES6 import statements that assume .jsx ending in webpack
- How can I pass calculated amount to state in react
- How to redirect to another page with passing data after submitting form in using react-router-dom v6?
- react-dnd DragSource that has child DragSource
- transitionstart event in React component
- Test suite failed to run TypeError: Cannot read property 'hasOwnProperty' of undefined
- How to deploy separated frontend and backend?
- useImperativeHandle hook does not update the value
- How to change default text in input type=โfileโ in reactjs?
- How to set/change Field value from external user action ๐ React Final Form
- Functional Components: Accessing Shared States
- QRCode Not Working with React.Js
- React Calculator: How to prevent multiple decimals in a number using Math-expression-evaluator?
- "Maximum update depth exceeded" on form validation