Hello,
Actually, I’m new for Docker and running now but a lot of uncertainties.
how to make ‘docker run’ works without any options such as -i -t -d?
for example,
docker run -p 3306:3306 moonsyim/amazon-linux-ami-mysql-20150630:0.1
it just goes Exited(0).
but with options like
no option : just Exited(0).
-i : works -> no prompt, but exited by ctrl+C
-t : works -> no prompt, still running by ctrl+C
-d : just Exited (0)
-i -t : goes into the container directly
-i -d : works
-t -d : works
-i -t -d : works
I’d like to make ‘docker run’ without options, would you give me some idea?
does it matter with COMMAND “/bin/bash” in below?
If I do ‘docker run’ with options, then
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e480e7d14212 moonsyim/amazon-linux-ami-mysql-20150630:0.1 “/bin/bash” 7 seconds ago Up 6 seconds 0.0.0.0:3306->3306/tcp jolly_perlman