Docker connection refused when started with -ti bash -
i new docker , tried run linuxconfig/lemp-php7 image. worked fine , access nginx web server installed on container. run image used command:
sudo docker run linuxconfig/lemp-php7
when tried run image following command gain access on container through bash couldn't connect nginx , got connection refused error message. command: sudo docker run -ti linuxconfig/lemp-php7 bash
i tried several times i'm pretty sure it's not kind of coincidence.
why happen? problem specific particular image or general problem. , how can gain access shell of container , access web server @ same time?
i'd understand behavior improve general understanding of docker.
docker run runs specified command instead of container run. in case, appears be supervisord, presumably in turn runs web server. you're preventing of happening.
my preferred method (except in cases i'm trying debug cases container won't start properly) following after running container normally:
docker exec -i -t $container_id /bin/bash
Comments
Post a Comment