Docker and CI/CD · Junior · Question 5 of 75

What is the difference between RUN and CMD?

Explanation

RUN npm ci bakes the result into an image layer. CMD ["node", "server.js"] is only metadata: the default command when a container starts.

Further reading

Problem with a question

Docker and CI/CD · Junior · question 5

Test yourself

Take the Docker and CI/CD · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz