Skip to content

Commit 1da9a9f

Browse files
committed
ui fix, docker image update, github action added for release
1 parent 85eb013 commit 1da9a9f

File tree

8 files changed

+42
-7
lines changed

8 files changed

+42
-7
lines changed

.github/workflows/deploy.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Deploying Image on Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Logging into Github Container Registry
13+
run: |
14+
echo $CR_PAT | docker login ghcr.io -u utkarsh-1905 --password-stdin
15+
env:
16+
CR_PAT: ${{ secrets.CR_PAT }}
17+
- name: Building Docker Image
18+
run: |
19+
docker build . -t ghcr.io/utkarsh-1905/docker-network-vis:${{ github.sha }}
20+
- name: Pushing Docker Image
21+
run: |
22+
docker push ghcr.io/utkarsh-1905/docker-network-vis:${{ github.sha }}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
TODO.md
1+
TODO.md
2+
start.dev.sh
3+
*.exe

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ LABEL traefik.port=80
2121
LABEL traefik.http.routers.network.rule="Host(`network.utkarsh.ninja`)"
2222
LABEL traefik.http.routers.network.tls=true
2323
LABEL traefik.http.routers.network.tls.certresolver="lets-encrypt"
24+
LABEL org.opencontainers.image.source="https://github.com/utkarsh-1905/docker-network-vis"
2425
EXPOSE 3000
2526
CMD [ "./main.exe" ]

Readme.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1-
### Current UI
1+
### How to use
22

3-
![UI](./assets/ui-1.png)
3+
1. Clone the repository
4+
2. Run the start.sh bash file in your linux terminal to build and start the container on local port 6904.
5+
3. Open your browser and go to localhost:6904 and you should see the app running and displaying all your containers in your network buckets.
6+
7+
### Why to use?
8+
9+
1. It is a very simple application to give you a quick overview of all your containers in your network buckets.
10+
2. It helps in debugging and testing your containers.

assets/ui-1.png

-50.1 KB
Binary file not shown.

start.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
sudo docker run -d -p 6904:3000 --rm --net web --name docker-vis -v /var/run/docker.sock:/var/run/docker.sock docker-vis:latest
1+
sudo docker build . -t docker-vis:latest
2+
sudo docker run -d -p 6904:3000 --rm --net web --net bridge --name docker-vis -v /var/run/docker.sock:/var/run/docker.sock docker-vis:latest

utils/error.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package util
22

3+
import "log"
4+
35
func HandleError(err error) {
46
if err != nil {
5-
panic(err)
7+
log.Fatal(err)
68
}
79
}

views/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<h1>Docker Network Visualizer</h2>
1818
</header>
1919
<main>
20-
<div class="pingtest">
20+
<!-- <div class="pingtest">
2121
<div class="ping">Ping Containers to check Network</div>
2222
<select name="c1" class="c1">
2323
{{range .networks}}
@@ -35,7 +35,7 @@ <h1>Docker Network Visualizer</h2>
3535
{{end}}
3636
</select>
3737
<button class="pingbtn">Ping</button>
38-
</div>
38+
</div> -->
3939
<hr />
4040
<div class="networks-container">
4141
<h2>Networks</h2>

0 commit comments

Comments
 (0)