I am on a mac (El Capitan, stable, 10.11.6) with Docker for Mac stable installed.
Dockerfile looks like:
FROM node WORKDIR /usr/local/src
And here’s the
version: '2' services: web: container_name: myproject_dev build: . command: npm run development ports: - "1234:8000" - "1235:8080" - "80:80" volumes: - ./my-project:/usr/local/src
docker-compose up starts everything normally:
myproject_dev | http://localhost:8080/webpack-dev-server/ myproject_dev | webpack result is served from /assets/ myproject_dev | content is served from /usr/local/src
docker ps shows that the ports are mapped:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 820694f618b4 myproject_web "npm run development" 20 minutes ago Up 20 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:1234->8000/tcp, 0.0.0.0:1235->8080/tcp myproject_dev
But I am unable to see the project page on the browser (using
localhost:1234). Works fine when I run the project outside the docker. So, an issue with the project is ruled out.
Tried the following:
- use a different
- switch between docker beta and stable versions
- stop all host apache/nginx services
But no luck What am I missing here?