run docker command line with our sudo
, after add current linux user into docker group, use below command to make it take effect
newgrp docker
docker container run -d -it -p 8080:80 httpd
docker contianer ps / docker ps
docker container run -d -p 8080:80 -v $(pwd)://usr/local/apache2/htdocs -name my-httpd-with-customized-index-html httpd
docker container exec -it my-httpd bash
https://docs.docker.com/v18.09/engine/reference/commandline/container_run/#options
--interactive , -i Keep STDIN open even if not attached
--tty , -t Allocate a pseudo-TTY