![]() The difference between Bind Mounts and Volumes is that by creating volumes, Docker will store the data in a folder it manages, which means it will take care of file permissions and ownership, and it will give you the tools to manage those volumes. The details about the volume will be listed when you run docker inspect on the container name, under “Mounts”: "Mounts": [Ĭan you see "Type": "bind"? That means that we have created a bind mount. Note that the examplenode app does not generate any log in /usr/src/app/logs, it’s just an example and you would need to set that logging up first. ![]() So now we can run our Node app, and any log will be stored in the host computer, rather than inside the Docker container. Docker run -d -p 80:3000 -v ~/logs:/usr/src/app/logs -name node-app examplenode
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |