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

allow passthrough of Docker/Buildkit CLI options #69

Open
tobybellwood opened this issue Oct 4, 2023 · 1 comment
Open

allow passthrough of Docker/Buildkit CLI options #69

tobybellwood opened this issue Oct 4, 2023 · 1 comment

Comments

@tobybellwood
Copy link

With docker compose v2, there are some underlying changes to how it performs builds (mostly around the use of buildkit if available).

In order to control these, in docker compose, we can use DOCKER_BUILDKIT=0 to disable, or BUILDKIT_PROGRESS=plain to show full build debug
e.g.

BUILDKIT_PROGRESS=plain docker compose build

it would be good if we could somehow also pass these variables through Lando to aid with debugging/support. I know that you use ?dockerode to call the docker API - but no idea whether passing CLI options across is a thing

@pirog
Copy link
Sponsor Member

pirog commented Oct 6, 2023

@tobybellwood we discussed this internally and here are some thoughts.

Currently it looks like Lando 3/Lando 3 services FORCE the use of BuildKit. So both Docker Compose 1/2 should be using buildkit when you try to "build" a Lando 3 service. I'm not sure it makes a ton of sense to allow this to change for Lando 3. For lagoon in particular i think we just want to set something like the below if the user is using the lagoon recipe.

process.env.DOCKER_BUILDKIT=0

We can also set process.env.BUILDKIT_PROGRESS=plain if the user has toggled on --debug|-vvv

Currently for Lando 4/Lando 4 services we DO NOT use buildkit because it hasnt been implemented in dockerode yet (see: apocas/dockerode#601) however its something we WILL use at some point because it has some pretty useful things we want to use for build. that said, i think in that scenario we can make it configureable.

So a summary would be: good idea, agreed, probably will be a build engine setting in lando 4 when buildkit becomes available.

i'm going to keep this open for now until we are certain we dont want to do something for Lando 3 here. In the interim pinging @reynoldsalec to see if he has bandwidth to look at lando/lagoon#53 as we probably just want to disable buildkit by default for lagoon?

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

No branches or pull requests

2 participants