I’m trying to run an angular app inside a docker container. The docker container exits shortly after the command “ng serve –host 0.0.0.0” is executed.
docker-compose.yml:
services
frontend:
build:
context: .
dockerfile: ./docker/Dockerfile-frontend
command: sh -c "cd public; npm install && npm run start"
container_name: frontend-mol
environment:
- PORT=4200
networks:
- fullstack
ports:
- 4200:4200
volumes:
- ./:/app
working_dir: /app
networks:
fullstack:
driver: bridge
package.json:
"scripts" : {
"start": "ng serve --host 0.0.0.0"
}
I did not alter the angular.json file. This is a fresh installation of Angular 17, I’m just trying to make a “hello world” app running in the container. What am I missing here?