Dive into Docker Compose with Node.js

Image creation

docker build -t application_image .

Container creation

Container name

application:
--name="application"

Volumes

  • type — mount type
  • source — source path
  • destination — path in the container

Application content

--mount type=bind,source="$(pwd)",destination=/home/node/app

node_modules

--mount type=volume,destination=/home/node/app/node_modules

Container creation

Running

docker start frontend

Simple commands

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store