Skip to content

Commit

Permalink
docs: add building and Makefile usage sections
Browse files Browse the repository at this point in the history
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
  • Loading branch information
hdonnay committed Jul 16, 2024
1 parent 3c62355 commit 038966e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Documentation/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
- [Updaters and Airgap](./concepts/updatersandairgap.md)
- [Operation](./concepts/operation.md)
- [Contribution](./contribution.md)
- [Releases](./contribution/releases.md)
- [Building](./contribution/building.md)
- [Commit Style](./contribution/commit_style.md)
- [Releases](./contribution/releases.md)
- [Reference](./reference.md)
- [Api](./reference/api.md)
- [Clairctl](./reference/clairctl.md)
Expand Down
1 change: 1 addition & 0 deletions Documentation/contribution.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Contribuion
The following sections provides information on how to contribute to Clair.

- [Building](./contribution/building.md)
- [Commit Style](./contribution/commit_style.md)
- [Releases](./contribution/releases.md)
15 changes: 15 additions & 0 deletions Documentation/contribution/building.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Building

This repo is intended to be built with familiar `go build` or `go install` invocations.
All binaries (excepting debugging tools) are underneath the `cmd` directory.

### Cross-compiling

Currently Clair does not have any cgo dependencies, so there should not be any cross-compilation concerns.

## Container

A `Dockerfile` for the project is in the repo root.
**The only upstream-supported means of using it is Buildkit via `buildctl`.**
See the `container`, `container-build`, `dist-container`, and `dist-clairctl` make targets for example invocations.
The `BUILDKIT_HOST` environment variable may need to be set, depending on how `buildkitd` is running in one's environment.
4 changes: 4 additions & 0 deletions Documentation/contribution/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ release, and the container is pushed to the
repository.

This is all powered by a Github Action in `.github/workflows/cut-release.yml`.

A complete source archive can be created with `make dist`.
A corresponding container can be created with `make dist-container`.
See `etc/config.mk` for documentation on variables that control these targets.

0 comments on commit 038966e

Please sign in to comment.