Use main docker build command by default rather than buildx
See original GitHub issueCurrently 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:
- Created a year ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
I’ll make a new release when it’s merged yes 😃
I made a new release, I hope this package will work for you 😃