Eu criei esse script para configurar meu ambiente de homologação e produção com docker e nodejs. Acredito que possa ajudar: https://gist.github.com/jjeanjacques10/bb0ae65f3d16998489bb7c917d949cc7

Para instalar o docker e docker-compose no linux são esses comandos:

echo "======= Install Docker ======="
sudo apt-get update
sudo apt install docker.io
echo "======= Docker version ======="
sudo docker --version
echo "======= Install Docker Compose ======="
sudo curl -L "https://github.com/docker/compose/releases/download/1.28.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
echo "======= Docker Compose version ======="
docker-compose --version