diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index dade543..3315d4d 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -2,6 +2,7 @@ name: Build and Push Multi-Arch Docker Image on: workflow_dispatch: + pull_request: push: branches: - main @@ -48,3 +49,14 @@ jobs: tags: | ${{ secrets.DOCKER_USERNAME }}/net-utils:latest ghcr.io/${{ github.repository_owner }}/net-utils:latest + + - name: Delete untagged images from GHCR + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: actions/delete-package-versions@v4 + with: + package-name: 'net-utils' + package-type: 'container' + min-versions-to-keep: 5 + delete-only-untagged-versions: 'true' + env: + TOKEN: ${{ secrets.GH_PAT }} diff --git a/Dockerfile b/Dockerfile index 05aa82f..fa819dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ RUN apk update && apk add --no-cache \ netcat-openbsd \ bind-tools \ openssl \ + nmap \ bash CMD ["/bin/bash"] diff --git a/Readme.md b/Readme.md index 45a1383..1e7bacd 100644 --- a/Readme.md +++ b/Readme.md @@ -11,8 +11,25 @@ The image includes the following tools: - `openssl` – Toolkit for SSL/TLS and general cryptography - `dig` – DNS lookup utility - `nslookup` – DNS query tool +- `nmap` – Network mapping and port scanning utility -## Usage in Kubernetes +## Usage + +### Running as a Docker Container + +You can run this image directly using Docker: + +```sh +docker run -it rdev2021/net-utils:latest +``` + +Or with a specific command: + +```sh +docker run -it rdev2021/net-utils:latest curl https://example.com +``` + +### Usage in Kubernetes You can use this image as a temporary debug pod in a Kubernetes cluster.