How to store the result of a linux command into a variable

myvariable=`docker ps -a | grep mysql | awk ‘{print $1}’`
echo $myvariable