question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use main docker build command by default rather than buildx

See original GitHub issue

Currently docker.build() is an alias to docker.buildx.build(), but it’s not clear to me why this is since docker build and docker buildx build aren’t entirely compatible and the latter still seems to be somewhat experimental?

I have hit two issues with docker.buildx.build(): using FROM sha256:{image.id} in a Dockerfile is not recognised (it is with docker build); and on another host my docker client does not have buildx installed (and I’m very reluctant for this to be a requirement).

Under the assumption that the main reason docker build is not implemented is because it’s additional effort on top of supporting docker buildx commands I’ve put together a basic implementation that is working for me - the PR is #346, feel free to take it over or let me know how I can get it ready for merge. Unfortunately this is a breaking change, since the docker.build() API is slightly different… This does seem a more correct mirror of the CLI, so I wonder if there’s a way to get it in with the appropriate changelog notices and version bump?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
gabrieldemarmiessecommented, Jul 11, 2022

I’ll make a new release when it’s merged yes 😃

0reactions
gabrieldemarmiessecommented, Jul 11, 2022

I made a new release, I hope this package will work for you 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

docker build - Docker Documentation
The docker build command builds Docker images from a Dockerfile and a “context”. A build's context is the set of files located in...
Read more >
Overview of Docker Build - Docker Documentation
docker buildx build command provides the same user experience as docker build with many new features like creating scoped builder instances, building against ......
Read more >
docker buildx build
The buildx build command starts a build using BuildKit. This command is similar to the UI of docker build command and takes the...
Read more >
docker buildx use
docker buildx use : Switches the current builder instance. Build commands invoked after this command will run on a specified builder.
Read more >
docker buildx create - Docker Documentation
By default, the current Docker configuration is used for determining the context/endpoint value. Builder instances are isolated environments where builds can be ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found