Mongodb is not started. How to write in Dockerfile to start mongodb
Dockerfile
It is only used to build a mirror image, and eventually it needs to pass throughdocker run
To start the container, otherwise it will not run automatically.In addition, look at your screenshot, you also did not put
mongodb
Connection of container tonode.js
In the container (I don’t know if you put these two programs in a container inside), I suggest you take a look.docker run
hit the target--link
This parameter is related to the introduction.