Installing and using nsenter
In any commercial Docker deployments, you may use various containers, such as web application, database, and so on. However, you need to access these containers in order to modify the configuration or debug/troubleshoot the issues. A simple solution for this problem is to run an SSH server in each container. It is a not good way to access the machines due to unanticipated security implications. However, if you are working in any one of the world-class IT companies, such as IBM, DELL, HP, and so on, your security compliance guy will never allow you to use SSH to connect to machines.
So, here is the solution. The nsenter
tool provides you access to log in to your container. Note that nsenter
will be first deployed as a Docker container only. Using this deployed nsenter
, you can access your container. Follow these steps:
- Let's run a simple web application as a container:
$ sudo docker run -d -p 5000:5000 training/webapp python app.py ------------------------...