HomePhabricator

experimental: Support buildkit
5853dfac8258Unpublished

Authored by dduvall on Apr 16 2019, 7:11 PM.

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

experimental: Support buildkit

Moby's BuildKit defines a low-level build language called LLB that
expresses image builds as a graph of source-code-to-binary artifacts. It
promises to make image building more efficient among many other things.
(See https://github.com/moby/buildkit)

This is a first step in supporting LLB. It uses the docker2llb package
to convert the dockerfile compiler's output and is therefore
inefficient in its transcompilation. However, the actual resulting LLB
instructions should be reasonably efficient.

A frontend gateway for buildctl is also included, and I've pushed the
image to Docker Hub as marxarelli/blubber-buildkit for testing.

buildctl build --frontend gateway.v0 \
  --opt source=marxarelli/blubber-buildkit \
  --local context=. --local dockerfile=. \
  --opt filename=blubber.yaml --opt variant=test

Change-Id: I265812482ea91873c4eb26603fc33b3bc28c26de

Details