Giter Club home page Giter Club logo

go-dockerveth's Introduction

go-dockerveth

go-dockerveth is CLI tool that show which docker containers are attached to which veth interfaces.
This is inspired by micahculpepper/dockerveth.

Features

  • Doesn't need sudo
  • Doesn't need docker cli
  • Can be used in combination with other commands in plain text output

Requirements

  • Go 1.13.4 or higher

Support OS

  • Linux

Installation

$ git clone https://github.com/skanehira/go-dockerveth
$ cmd go-dockerveth/cmd/dockerveth
$ go install

Usage

$ dockerveth
+--------------+-------------+------------+---------------+------+
|  CONTAINER   |    VETH     |   NAMES    |     IMAGE     | CMD  |
+--------------+-------------+------------+---------------+------+
| ad448862880e | veth393c35f | vimgolf    | ruby          | bash |
| eadea1368853 | veth43f9468 | golang1.13 | golang:latest | bash |
+--------------+-------------+------------+---------------+------+

# If you use option `-p`, then print plain text
$ dockerveth -p
ad448862880e    veth393c35f     vimgolf         ruby            bash
eadea1368853    veth43f9468     golang1.13      golang:latest   bash

# help
$ dockerveth -h
Usage of dockerveth:
  -nocolor
        doesn't use header color
  -p    make plain text(default is make table)

If you want to capture packet from container, you cat do it following.

# fzf is fuzzy finder, you can install it from https://github.com/junegunn/fzf
# termshark is tui for wireshark, you can install if from https://github.com/gcla/termshark
sudo termshark -i $(dockerveth -p | fzf | awk "{print \$2}")

Author

skanehira

go-dockerveth's People

Contributors

skanehira avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.