Docker and CI/CD · Middle · Question 30 of 75
What does exec "$@" do at the end of an entrypoint script?
- ✓Correct answer: Replaces the shell with the command, so it becomes PID 1
- 2Runs the command in the background and exits the script
- 3Prints every argument passed to the container
Explanation
Entrypoint scripts often prepare config, then hand over. Without exec, the shell stays PID 1 and signals may never reach the app.