Skip to content

Conversation

robert-cronin
Copy link
Contributor

@robert-cronin robert-cronin commented Jul 23, 2025

WIP

Closes #1211
Closes #604

This PR is dependent on #1228

Example command that works using buildctl:

docker buildx create --name copa-builder --driver docker-container --bootstrap --use
buildctl --addr=docker-container://buildx_buildkit_copa-builder0 build \
 --frontend=gateway.v0 \
 --opt source=ghcr.io/robert-cronin/copacetic-frontend:latest \
 --opt image=docker.io/library/alpine:3.14.0 \
 --output type=image,name=localhost:5000/alpine:3.14.0-updated \
 --progress=plain

and for docker build (just need a very basic Dockerfile in cwd, FROM scratch will suffice):

docker buildx build \
  --builder copa-builder \
  --build-arg BUILDKIT_SYNTAX=ghcr.io/robert-cronin/copacetic-frontend:latest \
  --build-arg image=docker.io/library/alpine:3.14.0 \
  -o type=image,name=localhost:5000/alpine:3.14.0-updated \
  --progress=plain .

@robert-cronin robert-cronin self-assigned this Jul 23, 2025
@robert-cronin robert-cronin changed the title Feat: add buildkit frontend feat: add buildkit frontend Jul 23, 2025
@robert-cronin robert-cronin force-pushed the feat/buildkit-frontend branch from 13e7020 to 10b3558 Compare July 23, 2025 02:22
Copy link

codecov bot commented Jul 23, 2025

Codecov Report

❌ Patch coverage is 0% with 458 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.75%. Comparing base (825451c) to head (20ce953).

Files with missing lines Patch % Lines
pkg/frontend/options.go 0.00% 215 Missing ⚠️
pkg/frontend/frontend.go 0.00% 143 Missing ⚠️
pkg/frontend/build.go 0.00% 100 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1221      +/-   ##
==========================================
- Coverage   43.03%   38.75%   -4.29%     
==========================================
  Files          35       38       +3     
  Lines        4143     4601     +458     
==========================================
  Hits         1783     1783              
- Misses       2228     2686     +458     
  Partials      132      132              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@robert-cronin robert-cronin force-pushed the feat/buildkit-frontend branch 4 times, most recently from 9012851 to 31a5b00 Compare July 24, 2025 08:50
@robert-cronin robert-cronin force-pushed the feat/buildkit-frontend branch 4 times, most recently from e131442 to e2a2d74 Compare July 30, 2025 07:42
@ashnamehrotra
Copy link
Contributor

@robert-cronin just approved the refactoring changes! could we rebase this on top of that? also I think the unit test is missing the vuln report

.dockerignore Outdated
@@ -0,0 +1,36 @@
# Ignore large directories that aren't needed for building
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to keep this file?

Copy link
Contributor Author

@robert-cronin robert-cronin Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could probably remove it since we just publish a single binary in the frontend image, nothing unnecessary is copied over anyway.

@ashnamehrotra
Copy link
Contributor

@robert-cronin maybe we can also add this under features in the documentation?

@robert-cronin robert-cronin requested a review from cpuguy83 August 4, 2025 09:15
Signed-off-by: robert-cronin <robert.owen.cronin@gmail.com>
Signed-off-by: robert-cronin <robert.owen.cronin@gmail.com>
Signed-off-by: robert-cronin <robert.owen.cronin@gmail.com>
Signed-off-by: robert-cronin <robert.owen.cronin@gmail.com>
Signed-off-by: robert-cronin <robert.owen.cronin@gmail.com>
@robert-cronin robert-cronin force-pushed the feat/buildkit-frontend branch from 0b3659d to 882cc9e Compare August 18, 2025 07:12
Signed-off-by: robert-cronin <robert.owen.cronin@gmail.com>
Signed-off-by: robert-cronin <robert.owen.cronin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

[REQ] Add BuildKit frontend [REQ] Add support for other output modes as buildctl does
2 participants