You need a command (and optionally arguments) after the image name, which I didn’t see you supply.
So docker ran your image and exited immediately. That’s why you get the "3ffb91885051 ubuntu “/bin/bash” 9 seconds ago Exited (0) 9 seconds ago " message.
@runeasgar, I agree with @erictsang, the standard ubuntu image doesn’t run any applications, you need to tell it what to run. You could try this instead:
$ docker run -i -t ubuntu /bin/bash
This will run the bash shell inside the container (and not run in the background). This has little practical purpose other than to help you look inside the container to see how things work.
Thanks guys! I managed to figure this out through trial and error, and I definitely understand the need for /bin/bash now (although I went with a start.sh script that does service apache2 start then /bin/bash), but I don’t fully understand the -it. I guess it has something to do with making /bin/bash run in the foreground persistently.
It seems like there should be a better way than /bin/bash to keep a machine running??