how to execute docker command in shell script

C++
echo -n "enter type compose command ? "
read type

[[ "$type" ]] && docker-compose $type;
Source

Also in C++: