This project runs buildkit which is most easily run natively on Linux.
The repository contains submodules; they must be initialized first like so:
git submodule update --init --recursiveThe Dockerfile makes use of the experimental RUN --mount flag, enabled by
the following:
export DOCKER_BUILDKIT=1Building can be done with docker build as normal, though if you're planning
to test this as a Concourse task you'll need to tag and push your own image:
docker build -t myuser/oci-build-task .
docker push myuser/oci-build-task...and then reference myuser/oci-build-task in your task.
The tests only run on Linux. If your on a non-linux machine, you can use Docker to quickly build yourself a dev environment by running the following commands:
$ docker run -it -v ".:/src" --privileged cgr.dev/chainguard/wolfi-base
> cd /src
> apk add bash curl go
> ./scripts/setup-buildkit.shThe tests can be run rootless, though doing so requires newuidmap and
newgidmap to be installed:
apt install uidmapOnce this is all done, the tests can be run like so:
./scripts/testside note: it would be super cool to leverage rootless mode to be able to run the tests as part of the
Dockerfile- unfortunately image building involves bind-mounting, whichdocker builddoes not permit.
The pipeline for managing this task is in the concourse/ci repo. The pipeline itself is running in our CI here: https://ci.concourse-ci.org/teams/main/pipelines/oci-build-task
You can use the publish-* jobs to release a new version of the resource.