Add example to use buildkit and docker buildx #1413

Open
albundy83 wants to merge 9 commits from albundy83/runner:kubernetes-buildkit into main
Contributor
  • other
    • PR: Add example to use buildkit and docker buildx
<!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - other - [PR](https://code.forgejo.org/forgejo/runner/pulls/1413): <!--number 1413 --><!--line 0 --><!--description QWRkIGV4YW1wbGUgdG8gdXNlIGJ1aWxka2l0IGFuZCBkb2NrZXIgYnVpbGR4-->Add example to use buildkit and docker buildx<!--description--> <!--end release-notes-assistant-->
Improve deployment and use more modern syntaxe for build.yaml
All checks were successful
issue-labels / release-notes (pull_request_target) Successful in 5s
checks / validate pre-commit-hooks file (pull_request) Successful in 36s
checks / Build Forgejo Runner (pull_request) Successful in 40s
checks / validate mocks (pull_request) Successful in 41s
checks / Build unsupported platforms (pull_request) Successful in 18s
checks / runner exec tests (pull_request) Successful in 33s
checks / Run integration tests with Docker (docker-latest) (pull_request) Successful in 9m3s
checks / Run integration tests with Docker (docker-stable) (pull_request) Successful in 11m9s
checks / Run integration tests with Podman (pull_request) Successful in 15m40s
45793d0994
Signed-off-by: Grégoire Bellon-Gervais <gregoire.bellon-gervais@docaposte.fr>
viceice requested changes 2026-02-28 13:59:03 +00:00
Dismissed
@ -5,3 +5,3 @@
NOTE: Docker in Docker (dind) requires elevated privileges on Kubernetes. The current way to achieve this is to set the pod `SecurityContext` to `privileged`. Keep in mind that this is a potential security issue that has the potential for a malicious application to break out of the container context.
[`dind-docker.yaml`](dind-docker.yaml) creates a Deployment and Secret for Kubernetes to act as a runner. The Docker credentials are re-generated each time the pod connects and does not need to be persisted.
[dind-docker.yaml](dind-docker.yaml) creates a Deployment and Secret for Kubernetes to act as a runner. The Docker credentials are re-generated each time the pod connects and does not need to be persisted.
Owner

why?

why?
Author
Contributor

Hello,
well, backquotes on a link are not very needed but if you think it's better, I can add them back :)

Hello, well, backquotes on a link are not very needed but if you think it's better, I can add them back :)
Owner

yes, please revert unrelated changes

yes, please revert unrelated changes
albundy83 marked this conversation as resolved
@ -40,3 +46,1 @@
registry: ${{ steps.add-vars.outputs.registry }}
username: ${{ secrets.USERNAME_WRITE_REPOSITORY }}
password: ${{ secrets.PASSWORD_WRITE_REPOSITORY }}
run: |
Owner

why?

why?
Author
Contributor

I think as you have already docker in your hand, it's faster to login directly no ?

I think as you have already docker in your hand, it's faster to login directly no ?
Owner

no. please avoid unrelated changes

no. please avoid unrelated changes
albundy83 marked this conversation as resolved
albundy83 force-pushed kubernetes-buildkit from 7bab6e04ce
All checks were successful
cascade / end-to-end (pull_request_target) Has been skipped
cascade / forgejo (pull_request_target) Has been skipped
cascade / debug (pull_request_target) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 13s
checks / validate pre-commit-hooks file (pull_request) Successful in 1m4s
checks / validate mocks (pull_request) Successful in 1m19s
checks / Build Forgejo Runner (pull_request) Successful in 2m9s
checks / Build unsupported platforms (pull_request) Successful in 28s
checks / runner exec tests (pull_request) Successful in 59s
checks / Run integration tests with Docker (docker-latest) (pull_request) Successful in 11m5s
checks / Run integration tests with Docker (docker-stable) (pull_request) Successful in 13m24s
checks / Run integration tests with Podman (pull_request) Successful in 16m43s
to 0ba7ae6851
Some checks failed
cascade / forgejo (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Has been skipped
cascade / debug (pull_request_target) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 52s
checks / Build Forgejo Runner (pull_request) Has been cancelled
checks / validate mocks (pull_request) Has been cancelled
checks / validate pre-commit-hooks file (pull_request) Has been cancelled
checks / Build unsupported platforms (pull_request) Has been cancelled
checks / runner exec tests (pull_request) Has been cancelled
checks / Run integration tests with Docker (docker-latest) (pull_request) Has been cancelled
checks / Run integration tests with Docker (docker-stable) (pull_request) Has been cancelled
checks / Run integration tests with Podman (pull_request) Has been cancelled
2026-02-28 17:45:30 +00:00
Compare
Author
Contributor

Hello,
Is there any issue with this pull request ? @viceice ?

Hello, Is there any issue with this pull request ? @viceice ?
viceice left a comment

I think it make more sense to finish the official runner chart.

forgejo-helm/forgejo-runner#1

I think it make more sense to finish the official runner chart. https://code.forgejo.org/forgejo-helm/forgejo-runner/issues/1
Author
Contributor

@viceice wrote in #1413 (comment):

I think it make more sense to finish the official runner chart.

forgejo-helm/forgejo-runner#1

Finish .. you mean start :)

@viceice wrote in https://code.forgejo.org/forgejo/runner/pulls/1413#issuecomment-81148: > I think it make more sense to finish the official runner chart. > > forgejo-helm/forgejo-runner#1 Finish .. you mean start :)
Author
Contributor

@albundy83 wrote in #1413 (comment):

@viceice wrote in #1413 (comment):

I think it make more sense to finish the official runner chart.
forgejo-helm/forgejo-runner#1

Finish .. you mean start :)

Anyway, I guess the example is still correct and it could be a start example for the runner chart, what do you think ?

@albundy83 wrote in https://code.forgejo.org/forgejo/runner/pulls/1413#issuecomment-81149: > @viceice wrote in #1413 (comment): > > > I think it make more sense to finish the official runner chart. > > forgejo-helm/forgejo-runner#1 > > Finish .. you mean start :) Anyway, I guess the example is still correct and it could be a start example for the runner chart, what do you think ?
Owner

@albundy83 wrote in #1413 (comment):

@albundy83 wrote in #1413 (comment):

@viceice wrote in #1413 (comment):

I think it make more sense to finish the official runner chart.
forgejo-helm/forgejo-runner#1

Finish .. you mean start :)

Anyway, I guess the example is still correct and it could be a start example for the runner chart, what do you think ?

there is some start: forgejo-helm/forgejo-runner#2

@albundy83 wrote in https://code.forgejo.org/forgejo/runner/pulls/1413#issuecomment-81152: > @albundy83 wrote in #1413 (comment): > > > @viceice wrote in #1413 (comment): > > > I think it make more sense to finish the official runner chart. > > > forgejo-helm/forgejo-runner#1 > > > > > > Finish .. you mean start :) > > Anyway, I guess the example is still correct and it could be a start example for the runner chart, what do you think ? there is some start: https://code.forgejo.org/forgejo-helm/forgejo-runner/pulls/2
albundy83 force-pushed kubernetes-buildkit from 6b75cc2e57
All checks were successful
cascade / debug (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Has been skipped
cascade / forgejo (pull_request_target) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 8s
checks / Build Forgejo Runner (pull_request) Successful in 27s
checks / validate pre-commit-hooks file (pull_request) Successful in 34s
checks / validate mocks (pull_request) Successful in 39s
checks / Build unsupported platforms (pull_request) Successful in 21s
checks / runner exec tests (pull_request) Successful in 46s
checks / Run integration tests with Docker (docker-latest) (pull_request) Successful in 9m18s
checks / Run integration tests with Docker (docker-stable) (pull_request) Successful in 11m11s
checks / Run integration tests with Podman (pull_request) Successful in 15m21s
to 9aeb2923da
Some checks failed
cascade / end-to-end (pull_request_target) Has been skipped
cascade / forgejo (pull_request_target) Has been skipped
cascade / debug (pull_request_target) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 6s
checks / validate mocks (pull_request) Has been cancelled
checks / validate pre-commit-hooks file (pull_request) Has been cancelled
checks / Build Forgejo Runner (pull_request) Has been cancelled
checks / Build unsupported platforms (pull_request) Has been cancelled
checks / runner exec tests (pull_request) Has been cancelled
checks / Run integration tests with Docker (docker-latest) (pull_request) Has been cancelled
checks / Run integration tests with Docker (docker-stable) (pull_request) Has been cancelled
checks / Run integration tests with Podman (pull_request) Has been cancelled
2026-03-17 22:18:39 +00:00
Compare
albundy83 force-pushed kubernetes-buildkit from 4073fa2067
Some checks failed
cascade / forgejo (pull_request_target) Has been skipped
cascade / debug (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 6s
checks / Build Forgejo Runner (pull_request) Successful in 36s
checks / validate pre-commit-hooks file (pull_request) Successful in 39s
checks / validate mocks (pull_request) Successful in 48s
checks / Build unsupported platforms (pull_request) Successful in 27s
checks / runner exec tests (pull_request) Successful in 46s
checks / Run integration tests with Podman (pull_request) Has been cancelled
checks / Run integration tests with Docker (docker-stable) (pull_request) Has been cancelled
checks / Run integration tests with Docker (docker-latest) (pull_request) Has been cancelled
to da9e35cdf3
Some checks failed
cascade / end-to-end (pull_request_target) Has been skipped
cascade / debug (pull_request_target) Has been skipped
cascade / forgejo (pull_request_target) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 5s
checks / validate pre-commit-hooks file (pull_request) Has been cancelled
checks / validate mocks (pull_request) Has been cancelled
checks / Build Forgejo Runner (pull_request) Has been cancelled
checks / Build unsupported platforms (pull_request) Has been cancelled
checks / runner exec tests (pull_request) Has been cancelled
checks / Run integration tests with Docker (docker-latest) (pull_request) Has been cancelled
checks / Run integration tests with Docker (docker-stable) (pull_request) Has been cancelled
checks / Run integration tests with Podman (pull_request) Has been cancelled
2026-03-17 22:27:05 +00:00
Compare
Merge branch 'main' into kubernetes-buildkit
All checks were successful
cascade / debug (pull_request_target) Has been skipped
cascade / forgejo (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 5s
checks / Build Forgejo Runner (pull_request) Successful in 32s
checks / validate pre-commit-hooks file (pull_request) Successful in 39s
checks / validate mocks (pull_request) Successful in 49s
checks / Build unsupported platforms (pull_request) Successful in 27s
checks / runner exec tests (pull_request) Successful in 40s
checks / Run integration tests with Docker (docker-latest) (pull_request) Successful in 10m6s
checks / Run integration tests with Docker (docker-stable) (pull_request) Successful in 12m38s
checks / Run integration tests with Podman (pull_request) Successful in 17m2s
40e5b8a873
Author
Contributor

Hello,
will you merge this example and doc ?

Hello, will you merge this example and doc ?
Member

@viceice Could you have another look? It doesn't make sense that I review it because I know next to nothing about this topic.

@viceice Could you have another look? It doesn't make sense that I review it because I know next to nothing about this topic.
Owner

@aahlenst wrote in #1413 (comment):

@viceice Could you have another look? It doesn't make sense that I review it because I know next to nothing about this topic.

it still doesn't make sense to me to add this here. users should use the helm chart.

@aahlenst wrote in https://code.forgejo.org/forgejo/runner/pulls/1413#issuecomment-85064: > @viceice Could you have another look? It doesn't make sense that I review it because I know next to nothing about this topic. it still doesn't make sense to me to add this here. users should use the helm chart.
All checks were successful
cascade / debug (pull_request_target) Has been skipped
Required
Details
cascade / forgejo (pull_request_target) Has been skipped
Required
Details
cascade / end-to-end (pull_request_target) Has been skipped
Required
Details
issue-labels / release-notes (pull_request_target) Successful in 5s
checks / Build Forgejo Runner (pull_request) Successful in 32s
Required
Details
checks / validate pre-commit-hooks file (pull_request) Successful in 39s
checks / validate mocks (pull_request) Successful in 49s
checks / Build unsupported platforms (pull_request) Successful in 27s
checks / runner exec tests (pull_request) Successful in 40s
Required
Details
checks / Run integration tests with Docker (docker-latest) (pull_request) Successful in 10m6s
Required
Details
checks / Run integration tests with Docker (docker-stable) (pull_request) Successful in 12m38s
Required
Details
checks / Run integration tests with Podman (pull_request) Successful in 17m2s
Required
Details
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u kubernetes-buildkit:albundy83-kubernetes-buildkit
git switch albundy83-kubernetes-buildkit
Sign in to join this conversation.
No reviewers
No milestone
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
forgejo/runner!1413
No description provided.