Description
This is the second post in my series called "Demystifying Docker". While having read the first post i... Tagged with beginners, tutorial, devops, docker.
Summary
- This is the second post in my series called "Demystifying Docker".
- A docker image is built from your code and sets up all the dependencies required to run it.
- Now let's analyze this Dockerfile which will help you understand the basic way of writing a Dockerfile.
- To put it in even simpler terms, we don't want to run node server.js when ever we build our image form the Dockerfile instead we want to run node server.js when we start the container, this is where these two keywords RUN and CMD differ in functionality.