With centos in a docker container, I just type 'docker attach container ID' and it takes me to the shell prompt, where i can install and configure nginx.
This one is easier: docker.com dockerfile/nginx You just run the file and everything is installed and configured.
but i can't figure out how to get in and access the files.
In my case the standard bash didn't exist. Using /bin/sh helped me:
docker run -it -p 80:80 dockerfile/nginx /bin/sh