At present, many docker ui can remotely call docker’s rest interface to operate the container. exec can be used to execute commands inside the running container. Suppose my calls exec interface are as follows:
After successfully creating an exec instance, how should you proceed to add commands, such as ls, to the bash shell?
I hope the leaders passing by will not hesitate to give me some advice ~
I don’t quite understand the connection between the command added in the container and the rpc interface.
If I want to add a command like ls, I will find this executable program from HOST, such as my /usr/lib/klibc/ls
Then copy the file to the container’s rootfs, and the copy method searches for “container and host file sharing.”