Created
October 16, 2025 14:36
-
-
Save ccampo133/99109293a0e0e9b859afaddd3dc0f524 to your computer and use it in GitHub Desktop.
Shell script to search Chainguard packages (using Docker)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env sh | |
| if [ $# -eq 0 ]; then | |
| echo "Usage: apkcg <command> [options]" | |
| echo "Note: Quote wildcards to prevent shell expansion (e.g., apkcg search \"php*8.2*xml*\")" | |
| echo "Examples:" | |
| echo " apkcg search curl" | |
| echo " apkcg info busybox" | |
| echo " apkcg list --available" | |
| exit 1 | |
| fi | |
| # Ref: https://edu.chainguard.dev/chainguard/migration/migrating-to-chainguard-images/#searching-for-packages | |
| docker run --rm cgr.dev/chainguard/wolfi-base sh -c "apk update >/dev/null 2>&1 && apk $*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment