| Crates.io | ccheck |
| lib.rs | ccheck |
| version | 0.1.0 |
| created_at | 2025-08-01 17:27:19.716278+00 |
| updated_at | 2025-08-01 17:27:19.716278+00 |
| description | CLI that verifies the presence of commands inside containers. |
| homepage | https://github.com/bfoerschner/ccheck |
| repository | https://github.com/bfoerschner/ccheck |
| max_upload_size | |
| id | 1777162 |
| size | 27,243 |
A simple CLI tool that checks if commands are available inside Docker containers. Useful for validating Docker images and making sure your containerized apps have all the tools they need.
cargo install --git https://github.com/bfoerschner/ccheck.git
Check if basic commands exist in Alpine Linux:
ccheck alpine:latest ls cat grep curl
Output:
Checking Docker image: alpine:latest
Checking 4 command(s):
The following commands are missing:
curl
Summary: 3/4 commands installed
Error: 1 command(s) missing
# Check specific commands
ccheck ubuntu:latest python3 pip git nodejs npm
# Use different shell (default: zsh)
ccheck --shell bash alpine:latest make gcc g++
# Short form
ccheck -s sh debian:latest wget curl
Create a file with commands to check:
# commands.txt
python3
pip
git
nodejs
npm
# This is a comment - ignored
docker
kubectl
ccheck --file commands.txt ubuntu:latest
# Using bash entrypoint
ccheck --shell bash alpine:latest ls cat grep
# Using nu shell entrypoint (still uses POSIX scripts internally)
ccheck --shell nu hustcer/nushell:latest ls cat grep
# Using zsh entrypoint (default)
ccheck ubuntu:latest zsh git curl
Check that your custom Docker image has all the development tools you need:
# Create a comprehensive check list
cat > dev-tools.txt << EOF
# Core utilities
ls
cat
grep
find
sed
awk
# Development tools
git
curl
wget
vim
nano
# Build tools
make
gcc
g++
# Package managers
apt-get
pip
npm
EOF
ccheck -f dev-tools.txt mycompany/dev-image:latest
Here's how to use ccheck in your GitHub Actions workflow:
# .github/workflows/validate-image.yml
name: Validate Docker Image
on: [push, pull_request]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install ccheck
run: |
cargo install --git https://github.com/bfoerschner/ccheck.git
- name: Validate production image
run: |
ccheck production-image:latest curl jq envsubst
- name: Validate development image
run: |
ccheck -f .github/required-tools.txt dev-image:latest
We have tests for different shell types:
# Run all tests
just test
# Run only POSIX shell tests
just test-posix
# Run only Nu shell tests
just test-nu
# Debug build
cargo build
# Release build
cargo build --release
# Run without installing
cargo run -- alpine:latest ls cat grep
Contributions are welcome! You can help by:
This project is licensed under the MIT License - see the LICENSE file for details.