Automation, Orchestration, and Scripting

An administrator has a docker-compose.yml file in /opt/shop that defines three services. None of the containers have been created yet. The administrator wants to create and start all of them so they keep running after the SSH session is closed. Which command should be run from /opt/shop?

Show the answer

Correct answerC. docker compose up -d

up -d creates the networks and containers, starts every service and returns the prompt by running detached. start only starts containers that already exist, so it does nothing here. Plain up creates them but stays attached to the terminal.