What role does CMD play here?
ENTRYPOINT ["python", "app.py"] CMD ["--port", "8080"]
- It replaces the ENTRYPOINT
- It runs before the ENTRYPOINT
- It only runs during the build
- 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 ▸