Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Case: How to enable Buildkit when building docker image from source code #1337

Closed
draco1023 opened this issue Sep 26, 2022 · 5 comments
Closed
Assignees
Labels

Comments

@draco1023
Copy link

The requirements?

Enable Buildkit when building docker image from source code

Way:

https://docs.docker.com/engine/reference/builder/#buildkit

@zzzhangqi
Copy link
Collaborator

sorry, not support buildkit. Rainbond v5.9.x pipeline feature will support custom builds

@yangkaa
Copy link
Collaborator

yangkaa commented Oct 12, 2022

Which features of BuildKit do you think attract you?

Currently, the source code build is built using buildpack. You can refer to this project: https://github.com/goodrain/builder

If you mean Dockerfile build, In the v5.9.0 version of Rainbond, Dockerfile build is no longer dependent on Docker, https://github.com/GoogleContainerTools/kaniko is used by default to build

@draco1023
Copy link
Author

@yangkaa
I want to use the feature of https://docs.docker.com/engine/reference/builder/#run---mount to speed up building.

RUN --mount=type=cache,target=/root/.m2 ./mvnw install -DskipTests

@yangkaa
Copy link
Collaborator

yangkaa commented Oct 12, 2022

Unfortunately, with reference to this GoogleContainerTools/kaniko#1568, we may not support this feature in the short term.

But you might have an alternative, Buildah already supports this feature. refer: containers/buildah#3452, Podman uses buildah to build images.

So you can customize your CI process and use Podman to build the image. On Rainbond, use mirrors to build your component. When your code is submitted, the CI process is triggered and the image built by Podman is pushed to the repository. Finally trigger the construction of Rainbond image.

@zzzhangqi
Copy link
Collaborator

Stale issue, I will close it, please open again if there is a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Test
Development

No branches or pull requests

3 participants