Skip to content

Commit 03ccec9

Browse files
committed
patch: added new pacmage support and changes to workflow
1 parent f1b6d4a commit 03ccec9

3 files changed

Lines changed: 31 additions & 1 deletion

File tree

.github/workflows/docker-build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Build and Push Multi-Arch Docker Image
22

33
on:
44
workflow_dispatch:
5+
pull_request:
56
push:
67
branches:
78
- main
@@ -48,3 +49,14 @@ jobs:
4849
tags: |
4950
${{ secrets.DOCKER_USERNAME }}/net-utils:latest
5051
ghcr.io/${{ github.repository_owner }}/net-utils:latest
52+
53+
- name: Delete untagged images from GHCR
54+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
55+
uses: actions/delete-package-versions@v4
56+
with:
57+
package-name: 'net-utils'
58+
package-type: 'container'
59+
min-versions-to-keep: 5
60+
delete-only-untagged-versions: 'true'
61+
env:
62+
TOKEN: ${{ secrets.GH_PAT }}

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ RUN apk update && apk add --no-cache \
77
netcat-openbsd \
88
bind-tools \
99
openssl \
10+
nmap \
1011
bash
1112

1213
CMD ["/bin/bash"]

Readme.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,25 @@ The image includes the following tools:
1111
- `openssl` – Toolkit for SSL/TLS and general cryptography
1212
- `dig` – DNS lookup utility
1313
- `nslookup` – DNS query tool
14+
- `nmap` – Network mapping and port scanning utility
1415

15-
## Usage in Kubernetes
16+
## Usage
17+
18+
### Running as a Docker Container
19+
20+
You can run this image directly using Docker:
21+
22+
```sh
23+
docker run -it rdev2021/net-utils:latest
24+
```
25+
26+
Or with a specific command:
27+
28+
```sh
29+
docker run -it rdev2021/net-utils:latest curl https://example.com
30+
```
31+
32+
### Usage in Kubernetes
1633

1734
You can use this image as a temporary debug pod in a Kubernetes cluster.
1835

0 commit comments

Comments
 (0)