$ ./guess_the_languageDevOps
DevOps · medium · #219

What role does CMD play here?

ENTRYPOINT ["python", "app.py"]
CMD ["--port", "8080"]
  1. It replaces the ENTRYPOINT
  2. It runs before the ENTRYPOINT
  3. It only runs during the build
  4. It supplies default arguments
With both in exec form, CMD becomes default arguments to ENTRYPOINT and is overridden by arguments to docker run.
Play DevOps ▸