Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add netcat openbsd image #331

Merged
merged 3 commits into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
| [melange](./images/melange) | `cgr.dev/chainguard/melange` | stable | [![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/melange.build.status.latest.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/melange:latest) |
| [memcached](./images/memcached) | `cgr.dev/chainguard/memcached` | experimental | [![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/memcached.build.status.latest.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/memcached:latest) |
| [musl-dynamic](./images/musl-dynamic) | `cgr.dev/chainguard/musl-dynamic` | stable | [![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/musl-dynamic.build.status.latest.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/musl-dynamic:latest) |
| [netcat](./images/netcat) | `cgr.dev/chainguard/netcat` | experimental | [![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/netcat.build.status.latest.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/netcat:latest) |
| [nginx](./images/nginx) | `cgr.dev/chainguard/nginx` | stable | [![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/nginx.build.status.latest.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/nginx:latest) |
| [node](./images/node) | `cgr.dev/chainguard/node` | stable | [![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/node.build.status.19.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/node:19)<br/>[![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/node.build.status.latest.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/node:latest) |
| [php](./images/php) | `cgr.dev/chainguard/php` | stable | [![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/php.build.status.latest-dev.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/php:latest-dev)<br/>[![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/php.build.status.latest-fpm.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/php:latest-fpm)<br/>[![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/php.build.status.latest.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/php:latest) |
Expand Down
30 changes: 30 additions & 0 deletions images/netcat/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!--monopod:start-->
# netcat
| | |
| - | - |
| **Status** | experimental |
| **OCI Reference** | `cgr.dev/chainguard/netcat` |
| **Variants/Tags** | ![](https://storage.googleapis.com/chainguard-images-build-outputs/summary/netcat.svg) |

*[Contact Chainguard](https://www.chainguard.dev/chainguard-images) for enterprise support, SLAs, and access to older tags.*

---
<!--monopod:end-->

Minimal image for Debian port of OpenBSD's netcat. **EXPERIMENTAL**

## Get It!

The image is available on `cgr.dev`:

```
docker pull cgr.dev/chainguard/netcat:latest
```

## Usage

```
docker run --rm -ti ghcr.io/chainguard/netcat -zv google.com 443
```

See [here](https://manpages.debian.org/unstable/netcat-openbsd/nc.1.en.html) for more invocation details.
26 changes: 26 additions & 0 deletions images/netcat/configs/latest.apko.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
contents:
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
repositories:
- https://packages.wolfi.dev/os
packages:
- wolfi-baselayout
- netcat-openbsd
accounts:
groups:
- groupname: nonroot
gid: 65532
users:
- username: nonroot
uid: 65532
gid: 65532
run-as: 65532

entrypoint:
command: /usr/bin/nc
cmd: -h
work-dir: /home/nc

archs:
- x86_64
- aarch64
6 changes: 6 additions & 0 deletions images/netcat/image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
status: experimental
versions:
tuananh marked this conversation as resolved.
Show resolved Hide resolved
- apko:
config: configs/latest.apko.yaml
extractTagsFrom:
package: netcat-openbsd
7 changes: 7 additions & 0 deletions images/netcat/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -o errexit -o nounset -o errtrace -o pipefail

IMAGE_NAME=${IMAGE_NAME:-"cgr.dev/chainguard/netcat"}

docker run $IMAGE_NAME -h