utilities build, run, and consistent name scheme

This commit is contained in:
Will 2023-06-16 21:06:24 -04:00
parent 0ba6f32791
commit 243fcad43f
6 changed files with 21 additions and 8 deletions

View file

@ -7,6 +7,6 @@ COPY Pipfile Pipfile.lock ./
RUN pip install pipenv RUN pip install pipenv
RUN pipenv install --system --deploy RUN pipenv install --system --deploy
COPY docker-net-graph.py ./ COPY docker-network-graph.py ./
ENTRYPOINT ["python", "docker-net-graph.py"] ENTRYPOINT ["python", "docker-network-graph.py"]

View file

@ -1,4 +1,5 @@
Copyright (c) 2018 Eugene Agafonov Copyright (c) 2018 Eugene Agafonov
Copyright (c) 2023 e-dant (github.com/e-dant)
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View file

@ -5,10 +5,10 @@ as a neat graphviz graph.
## Example ## Example
![example graph](https://raw.githubusercontent.com/LeoVerto/docker-network-graph/master/example.png) ![example graph](https://raw.githubusercontent.com/e-dant/docker-network-graph/release/example.png)
## Usage ## Usage
usage: docker-net-graph.py [-h] [-v] [-o OUT] usage: docker-network-graph.py [-h] [-v] [-o OUT]
Visualize docker networks. Visualize docker networks.
@ -19,10 +19,10 @@ as a neat graphviz graph.
In most cases what you want to run are the following couple commands: In most cases what you want to run are the following couple commands:
git clone https://github.com/LeoVerto/docker-network-graph.git git clone https://github.com/e-dant/docker-network-graph.git
cd docker-network-graph cd docker-network-graph
pipenv install pipenv install
pipenv run python docker-net-graph.py -o output.svg pipenv run python docker-network-graph.py -o output.svg
This will generate an .svg file containing the graph. This will generate an .svg file containing the graph.
@ -30,7 +30,7 @@ This will generate an .svg file containing the graph.
If you want to generate a graph for a remote system you can also easily If you want to generate a graph for a remote system you can also easily
run this script inside a pre-built docker container: run this script inside a pre-built docker container:
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock leoverto/docker-network-graph docker run --rm -v /var/run/docker.sock:/var/run/docker.sock e-dant/docker-network-graph
This will just generate and output the graph in the [DOT Language][dot]. This will just generate and output the graph in the [DOT Language][dot].
You can then paste that code into [GraphvizOnline][gvonline] You can then paste that code into [GraphvizOnline][gvonline]

6
tool/build Executable file
View file

@ -0,0 +1,6 @@
#! /usr/bin/env bash
(
cd "$(dirname "$0")/.." \
&& pipenv install
)

6
tool/run Executable file
View file

@ -0,0 +1,6 @@
#! /usr/bin/env bash
(
cd "$(dirname "$0")/.." \
&& pipenv run python docker-network-graph.py -o output.svg
)