Areli Fuss | 471a2970 | 2018-02-01 13:09:07 +0200 | [diff] [blame] | 1 | # Ubuntu 14.04 don't have nsenter - the straight forward way required me to install build tools and etc. |
| 2 | # I preferred to keep the system clean and install nsenter in a container and then copy the command to the host |
| 3 | # Note - its also possible to run nsenter from a container (didn't tried) https://github.com/jpetazzo/nsenter |
| 4 | |
| 5 | # start a container |
| 6 | docker run --name nsenter -it ubuntu:14.04 bash |
| 7 | |
| 8 | ## in the docker |
| 9 | apt-get update |
Pratik Raj | 3490973 | 2020-08-23 23:52:52 +0530 | [diff] [blame] | 10 | apt-get install -y -qq --no-install-recommends git build-essential libncurses5-dev libslang2-dev gettext zlib1g-dev libselinux1-dev debhelper lsb-release pkg-config po-debconf autoconf automake autopoint libtool bison |
Areli Fuss | 471a2970 | 2018-02-01 13:09:07 +0200 | [diff] [blame] | 11 | |
Pratik Raj | 3c54913 | 2020-05-28 11:06:41 +0530 | [diff] [blame] | 12 | git clone --depth 1 git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git util-linux |
Areli Fuss | 471a2970 | 2018-02-01 13:09:07 +0200 | [diff] [blame] | 13 | cd util-linux/ |
| 14 | |
| 15 | ./autogen.sh |
| 16 | ./configure --without-python --disable-all-programs --enable-nsenter |
| 17 | make |
| 18 | |
| 19 | ## from different shell - on the host |
| 20 | echo "[Action requires] From different shell on the host run the following:" |
| 21 | docker cp nsenter:/util-linux/nsenter /usr/local/bin/ |
| 22 | docker cp nsenter:/util-linux/bash-completion/nsenter /etc/bash_completion.d/nsenter |