You did! But just having them launch a shell isn’t very interesting; the shell didn’t have any input and exited successfully (“exited with code 0”).
For a next step I’d recommend reading Docker’s tutorial on writing and running custom images. You can then plug these into your docker-compose.yml
to build up an application built on top of these base Linux distributions.