How do I enter this dockerfile / nginx container?

peruvian picture peruvian · Sep 24, 2014 · Viewed 18.2k times · Source

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.

Answer

SJX picture SJX · Jul 9, 2019

In my case the standard bash didn't exist. Using /bin/sh helped me:

docker run -it -p 80:80 dockerfile/nginx /bin/sh