diff options
author | Can Güney Aksakalli <cgaksakalli@gmail.com> | 2020-09-28 01:59:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-28 01:59:08 +0200 |
commit | c280f660e82869c72c6f4e2e4cd391ed0e6f67c8 (patch) | |
tree | c795a2e939e9a00226b1f6d321abbac46d7111eb | |
parent | 6e08a3fcce04565e491b3ea450c10864186354d1 (diff) | |
parent | be55dd94a2a299fb85bc505ea9ed7bc39788bb8e (diff) |
Merge pull request #101 from snpranav/docker-exec
Executable to run gtop in docker container.
-rw-r--r-- | README.md | 9 | ||||
-rwxr-xr-x | gtop-docker.sh | 19 |
2 files changed, 28 insertions, 0 deletions
@@ -33,6 +33,15 @@ $ docker run --rm -it \ aksakalli/gtop ``` +-OR- + +Run gtop in your terminal using the `gtop` command, but in a docker container by running the following lines. +```sh +$ sh -c "$(curl -fSsL https://raw.githubusercontent.com/aksakalli/gtop/master/gtop-docker.sh)" + +$ gtop # Run gtop from your terminal whenever you want to open gtop. +``` + ### Usage Start gtop with the `gtop` command diff --git a/gtop-docker.sh b/gtop-docker.sh new file mode 100755 index 0000000..a5824c4 --- /dev/null +++ b/gtop-docker.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +######################################### +# Run gtop in your terminal using the `gtop` command, but in a docker container by running the following lines. +# ```sh +# $ sh -c "$(curl -fSsL https://raw.githubusercontent.com/aksakalli/gtop/master/gtop-docker.sh)" + +# $ gtop # Run gtop from your terminal whenever you want to open gtop. +######################################### + +sudo tee /usr/local/bin/gtop > /dev/null << EOF +docker run --rm -it \ + --name gtop-from-executable \ + --net="host" \ + --pid="host" \ + aksakalli/gtop +EOF + +sudo chmod 555 /usr/local/bin/gtop |