- How to get logs from containers
CONTAINER_NAME="foobar.dev"
CONTAINER_ID=$(docker ps --filter "name=$CONTAINER_NAME" --format "{{.ID}}")
docker logs $CONTAINER_ID;
HOST=127.0.0.1
SERVER_USER=$(whoami)
ssh -T ${SERVER_USER}@${HOST} << EOF
ls
pwd
docker ps > /tmp/foo.log
EOF