CS FundamentalsModerateProduct-company MCQ pattern
A Dockerfile ends with CMD ["python", "app.py"]. The container is started with docker run myimage python test.py. What runs?
- A. python app.py
- B. python app.py python test.py
- C. python test.py
- D. The container fails to start
Correct answer: C. python test.py
Arguments after the image name replace CMD entirely. Had the Dockerfile used ENTRYPOINT ["python"] with CMD ["app.py"], the extra arguments would have replaced only the CMD part.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- Which practice is the defining feature of Kanban rather than Scrum?
- Java's I/O library lets you write new BufferedReader(new InputStreamReader(socket.getInputStream())), each wrapper adding behaviour to the…
- An age field accepts integers from 18 to 60 inclusive. Using equivalence partitioning only, what is the minimum number of test values…
- Counting each simple condition in a compound boolean expression as a separate decision, what is the cyclomatic complexity of this…
- A program's control flow graph has two separate connected components (for example, main and one called function drawn separately), with 14…
- How many of the following statements about cyclomatic complexity are correct? 1. It equals the number of linearly independent paths…