Zot Developer Guide
Getting Started
Supported Developer Platforms
Development is officially supported on Linux
and Apple MacOS
platforms. However,
development should be possible on any platform that supports the golang
toolchain.
Prerequisites
Install golang (1.17+)
The zot project requires golang 1.17
or newer. You can follow
these instructions to install the golang
toolchain. After
installation, make sure that the path
environment variable or your IDE can find
the toolchain.
Cloning zot
The zot registry code base is hosted on GitHub at https://github.com/project-zot/zot.
To clone the zot project, use this command:
$ git clone https://github.com/project-zot/zot.git
Building zot
To build zot, execute the make
command in the zot directory using the
following general syntax:
$ make OS=os ARCH=architecture {binary | binary-minimal}
The binary
option builds the full zot binary with all extensions.
The binary-minimal
option builds the minimal zot binary without extensions.
Examples
The following are examples of the make
command for several supported platforms
and architectures:
-
Linux/Intel-based platforms
$ make OS=linux ARCH=amd64 binary
-
Linux/amd64 platform
$ make OS=linux ARCH=amd64 binary
-
Linux/ARM64-based platforms such as ARM64 servers and Raspberry Pi4
$ make OS=linux ARCH=arm64 binary
-
Apple MacOS/Intel-based platforms
$ make OS=darwin ARCH=amd64 binary
-
Apple MacOS/ARM64-based platforms
$ make OS=darwin ARCH=arm64 binary
Code Organization
The zot
project codebase is organized as follows:
/ - pkg/ # Source code for all libraries - api/ # Source code for HTTP APIs - config/ # Global configuration model - storage/ # Source code for storage backends - cli/ # Source code for command line interface (cli) - common/ # Source code for common utility routines - compliance/ # Source code for dist-spec conformance tests - log/ # Source code for logging framework - test/ # Internal test scripts/data - extensions/ # Source code for all extensions - config/ - sync/ - monitoring/ - sync/ - exporter/ # Source code for metrics exporter - cmd/ # Source code for binary main()s - zot/ # Source code for zot binary - zli/ # Source code for zot cli - zb/ # Source code for zb which is the dist-spec benchmarking tool - errors/ # Source code for error codes - examples/ # Configuration examples - swagger/ # Swagger integration - docs/ # Documentation
Contributor Guidelines
License
zot is released under the Apache License 2.0. All contributions must adhere to this license.
Developer Certificate of Origin (DCO)
All commits require a Developer Certificate of Origin via the "Signed-off-by:" commit message and commit signatures using GPG keys.
Submitting a Pull Request (PR)
First, fork the zot project on GitHub and submit a commit to your fork. Then open a new pull request (PR) to the zot project.
Reporting Issues
Issues are broadly classified as functional bugs and security issues. The latter is treated a little differently due to the sensitive nature.
Filing an Issue
No software is perfect, and we expect users to find issues with the zot code base. First, check whether your issue has already been filed by someone else by doing an issue search. If the issue not found, file a new issue by clicking the New issue button on the zot/issues page and answering the questions. The more information that you can provide, the easier it becomes to triage the issue.
Code of Conduct
The zot project follows the CNCF Code of Conduct.
CNCF Community Code of Conduct v1.1
Other languages available: -
Contributor Code of Conduct
As contributors and maintainers in the CNCF community, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
We are committed to making participation in the CNCF community a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
Scope
This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
CNCF Events
CNCF events, or events run by the Linux Foundation with professional events staff, are governed by the Linux Foundation Events Code of Conduct available on the event page. This is designed to be used iconjunction with the CNCF Code of Conduct.
Our Standards
Examples of behavior that contributes to a positive environment include:
-
Demonstrating empathy and kindness toward other people
-
Being respectful of differing opinions, viewpoints, and experiences
-
Giving and gracefully accepting constructive feedback
-
Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
-
Focusing on what is best not just for us as individuals, but for the overall community
Examples of unacceptable behavior include:
-
The use of sexualized language or imagery, and sexual attention or advances of any kind
-
Trolling, insulting or derogatory comments, and personal or political attacks
-
Public or private harassment
-
Publishing others’ private information, such as a physical or email address, without their explicit permission
-
Other conduct which could reasonably be considered inappropriate in a professional setting
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
Reporting
For incidents occuring in the Kubernetes community, contact the Kubernetes Code of Conduct Committee via conduct@kubernetes.io. You can expect a response within three business days.
For other projects, please contact the CNCF staff via conduct@cncf.io. You can expect a response within three business days.
In matters that require an outside mediator, CNCF has retained Mishi Choudhary (mishi\@linux.com). Use of an outside mediator can be requested when reporting or used at CNCF staff’s discretion. In general, contacting conduct@cncf.io directly is preferred.
Enforcement
The Kubernetes project’s Code of Conduct Committee enforces code of conduct issues. For all other projects, the CNCF enforces code of conduct issues.
Both bodies try to resolve incidents without punishment, but may remove people from the project or CNCF communities at their discretion.
Acknowledgements
This Code of Conduct is adapted from the Contributor Covenant (http://contributor-covenant.org), version 2.0 available at http://contributor-covenant.org/version/2/0/code_of_conduct/
Notices
The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product.