I am running docker-compose in Ubuntu.
I have build a “stupid” react application just to get to know docker.
when running the command
docker run -it -p 3000:3000 -v /app/node_modules -v $(pwd):/app 638c43545267
everything works fine.
When I dry to use my docker-compose file like this
docker-compose up --build
I get the following errors:
Recreating frontend_web_1 … done
Attaching to frontend_web_1
**web_1 | **
web_1 | > frontend@0.1.0 start /app
web_1 | > react-scripts start
**web_1 | **
web_1 | 「wds」: Project is running at http://172.23.0.2/
**web_1 | 「wds」: webpack output is served from **
web_1 | 「wds」: Content not from webpack is served from /app/public
web_1 | 「wds」: 404s will fallback to /
web_1 | Starting the development server…
**web_1 | **
frontend_web_1 exited with code 0
the docker-compose config is:
version: ‘3’
services:
web:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- “3000:3000”
volumes:
- /app/node_modules
- .:/app
Does anybody know how to solve it?
Thanks in advance
Mandy