Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save ursuad/81238fd33bd6a6135f25c76abdc6160f to your computer and use it in GitHub Desktop.

Select an option

Save ursuad/81238fd33bd6a6135f25c76abdc6160f to your computer and use it in GitHub Desktop.

Revisions

  1. @mbn18 mbn18 revised this gist Aug 25, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Ubuntu 14.04 don't have nsenter - the straight forward way required me to install build tools and etc.
    # I preferred to keep the system clean and install nsenter in a container and then copy the command to the host
    # Note - its also possible to run neneter from a container (didnt tried) https://github.com/jpetazzo/nsenter
    # Note - its also possible to run nsenter from a container (didn't tried) https://github.com/jpetazzo/nsenter

    # start a container
    docker run --name nsenter -it ubuntu:14.04 bash
  2. @mbn18 mbn18 created this gist Aug 25, 2014.
    21 changes: 21 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    # Ubuntu 14.04 don't have nsenter - the straight forward way required me to install build tools and etc.
    # I preferred to keep the system clean and install nsenter in a container and then copy the command to the host
    # Note - its also possible to run neneter from a container (didnt tried) https://github.com/jpetazzo/nsenter

    # start a container
    docker run --name nsenter -it ubuntu:14.04 bash

    ## in the docker
    apt-get update
    apt-get install git build-essential libncurses5-dev libslang2-dev gettext zlib1g-dev libselinux1-dev debhelper lsb-release pkg-config po-debconf autoconf automake autopoint libtool

    git clone git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git util-linux
    cd util-linux/

    ./autogen.sh
    ./configure --without-python --disable-all-programs --enable-nsenter
    make

    ## from different shell - on the host
    docker cp nsenter:/util-linux/nsenter /usr/local/bin/
    docker cp nsenter:/util-linux/bash-completion/nsenter /etc/bash_completion.d/nsenter