Answer the question
In order to leave comments, you need to log in
How to pass a command to the application worker process in Docker?
I create a container with flags: docker run -d -it --name Game
A java application - a game - is launched in the container.
Can you please tell me how to send commands to it?
It used to work with "Screen". At any time I connected ( screen –x
) through the terminal to the working session "Screen" and could enter console, game commands, but in the case of Docker I can't figure out how to do this.
Answer the question
In order to leave comments, you need to log in
docker exec -ti my_container sh -c "echo a && echo b"
Read more here https://docs.docker.com/engine/reference/commandli...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question