-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust documentation of local development and the versioning
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Local Development | ||
By following these steps, you will be able to build the container image for your desired architecture and generate packages using the containerized environment. This enables efficient local development, allowing you to iterate on your code, test packages, and validate changes effectively. | ||
|
||
## Build container | ||
|
||
To build the container, follow the steps below: | ||
|
||
Install `podman` on your system: https://podman.io/docs/installation | ||
|
||
Update unqualified search in `/etc/containers/registries.conf`: | ||
|
||
``` | ||
unqualified-search-registries = ["docker.io"] | ||
``` | ||
|
||
On amd64 architecture: | ||
``` | ||
podman build --build-arg arch=amd64 -f container/build.containerfile -t build:amd64 . | ||
``` | ||
|
||
On arm64 architecture: | ||
``` | ||
podman build --build-arg arch=arm64v8 -f container/build.containerfile -t build:arm64v8 . | ||
``` | ||
|
||
Note: You do not need to use `sudo` as the build should work just fine with unprivileged containers. | ||
|
||
## Build a package | ||
|
||
To build a package, perform the following steps inside the package repository: | ||
|
||
Create a .build directory: | ||
``` | ||
mkdir .build | ||
``` | ||
|
||
On amd64 architecture: | ||
``` | ||
podman run --rm -v $PWD:/input -v $PWD/.build:/output build:amd64 build | ||
``` | ||
|
||
On arm64 architecture: | ||
``` | ||
podman run --rm -v $PWD:/input -v $PWD/.build:/output build:arm64v8 build | ||
``` | ||
|
||
Alternatively, you can use pre-built containers from the GitHub Container Registry (ghcr) by accessing the following link: https://github.com/gardenlinux/package-build/pkgs/container/package-build. These pre-built containers can be used as an alternative to building the container locally. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Versioning |