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

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -