Kev's Site
  • Home
  • Games
  • Categories
  • Tags
  • About

#Nsenter

Console access into a running Docker container

August 5, 2014

Sometimes, when setting up and debugging a container it is extremely useful to be able to ‘shell into’ the container to get a closer look at what’s going on. This is a quick guide on how to get shell console access into a running Docker container. UPDATE. If you are running docker version 1.3 or greater then you should use docker exec instead (see docker man pages for more info). The only use case that still requires the use of nsenter is where the user assigned to the container prevents you from doing tasks inside.
Read More

Install nsenter from source

August 5, 2014

nsenter is a great command line tool for accessing docker containers. Unfortunately it isn’t available in Ubuntu 14.04 at the time of writing. Fortunately building it from source is quite simple. Get the latest version of util-linux from kernel.org https://www.kernel.org/pub/linux/utils/util-linux/ At the time of writing the latest version was v2.25, which is the version used in the examples here. Install the build dependencies sudo apt-get install build-essential libncurses5-dev libslang2-dev gettext zlib1g-dev \ libselinux1-dev debhelper lsb-release pkg-config po-debconf autoconf \ automake autopoint libtool python2.
Read More

 © 2009 - 2025 Kevin Ellis