2coffee.dev

  • "Dockerizing" a Node.js Application
    • node.js
    • docker

    "Dockerizing" a Node.js Application

    There are many ways to deploy a Node.js application in practice. The simplest one is just running the node index.js command to start it. However, to keep the application running continuously, we need a process management tool, such as pm2. Using pm2, we can initialize a Node process and keep it running until we intentionally stop it. Moreover, it allows us to scale the application from 1 instance to 2, 3, 4... instances, as long as your server can handle it. pm2 also offers many other features that you can explore in its documentation. Recently, the keywords "Dockerize" or "Containerize" have been gaining popularity in the online community. In simple terms, it means "packaging" the application into a single "file" called an Image. After the application is packaged, it can be launched with Docker using just a few commands...

    1 year ago

  • Understanding the layer caching mechanism when building a Docker image for better Dockerfile writing
    • docker

    Understanding the layer caching mechanism when building a Docker image for better Dockerfile writing

    Docker has become increasingly popular in the IT community, with more and more people using it. The frequency of Docker appearing in job descriptions has also increased. My company uses Docker, my projects use Docker, projects that I work on for others also use Docker... Docker has emerged as a valuable "packaging" solution for the automation revolution. However, there has always been a time-consuming issue with building Docker images. The size of a Docker "image" can sometimes reach several gigabytes, making Docker a "hard drive killer"....

    1 year ago

  • Series
    Series on Docker in Practice & Production - Network in Docker
    • docker

    Series on Docker in Practice & Production - Network in Docker

    One of the reasons that Docker has become powerful is its networking system, which allows containers to easily connect with each other, regardless of whether they are running in a Docker environment or on different Docker platforms like Linux, Windows, or MacOS. To understand this in more detail, let's dive into the topic of networking in Docker...

    3 years ago