Docker Community Forums

Share and learn in the Docker community.

Maybe total newb question but....?

I am following the tutorial here: Use bind mounts | Docker Documentation

I tried entering this command:

docker run -dp 3000:3000 \
     -w /app -v "$(pwd):/app" \
     node:12-alpine \
     sh -c "yarn install && yarn run dev"

Although I can see see the image on the dashboard - very time I try to start it, it crashes/cuts out and I can’t follow on to the next step.

anyone know why this might be happing.

Hello,

you are mounting the current working directory to container’s directory /app and trying to install some dependencies.
But what is in your current working directory?
Usually you can check with docker logs <containername|containerid> what happened in your container.

1 Like