Skip to content

Feature: BuildKit support #940

@akatsukilelouch

Description

@akatsukilelouch

What are you trying to do?

Building local containers that utilize buildkit build backend. I've personally hit a need for it due to extensive use of RUN --mount type=cache. Without it, redownloading packages for building OCI via OCI (multi-stage builds) increases time of builds drastically. Not only that but it also decreases SSD expectancy and uses extra ingress.

Why should it be done this way?

Allows building with buildkit backend! I've skimmed over testcontainers community modules and found out that only node supports buildkit now and that rust supports it too via bollard. I am not sure what's the state with official Go and Java modules, but skimming over other modules' issues haven't shown any BuildKit related items.

I am by no means expert and I've not spent time tinkering with Docker API, but just putting version=2 in params in docker/api/build.py leads to docker.errors.BuildError: Syntax error - can't find = in "label.decode(\"utf-8\")". Must be of the form: name=value for me (it's an error from moby namespace from the host, for sure).

If that's an error that is local to my build configuration, then please edit this message to reflect that or notify me, that might be misleading.

If you can provide hints what might be an issue, I'd be able to look for a solution in a few days and try to implement it myself, because I need it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions