Contributing to Netshoot
Contributions are welcome! Whether it's adding a new tool, improving documentation, or fixing a bug, your help is appreciated.
Adding a New Tool
If you would like to add a new package or tool to Netshoot, please follow these steps:
-
Open an Issue: Before starting work, please open a GitHub issue to discuss the proposed tool. In the issue, include a rationale explaining why the tool would be a useful addition to Netshoot. > Note: If the functionality of the proposed tool is already well-covered by an existing tool in the image, the change may not be accepted to keep the image size manageable.
-
Fork and Clone: Fork the repository and create a new branch for your changes.
-
Modify the Build:
- For Alpine Packages: If the tool is available in the Alpine package repositories, add it to the
apk add
list in theDockerfile
. - For External Binaries: If the tool needs to be built from source or downloaded as a binary, update the
build/fetch_binaries.sh
script. Please leverage the multi-stage build process to keep the final image clean. Ensure your script handles bothamd64
andarm64
architectures if the tool supports them.
- For Alpine Packages: If the tool is available in the Alpine package repositories, add it to the
-
Update Documentation:
- Add the new package to the list of included packages in the
README.md
file. - Add a new section under "Sample Use-cases" in the
README.md
to demonstrate how to use the new tool, including a brief description and a code example.
- Add the new package to the list of included packages in the
-
Submit a Pull Request:
- Push your changes to your fork and open a pull request against the
master
branch ofnicolaka/netshoot
. - The CI pipeline will automatically run, performing a multi-platform build to verify that your changes work for both
amd64
andarm64
. Please ensure this check passes.
- Push your changes to your fork and open a pull request against the
Development Workflow
To test your changes locally, you can build the Docker image using the provided Makefile
.
-
Build for all platforms (requires Docker Buildx):
make build-all
-
Build for a specific platform (e.g., amd64):
make build-x86