| Crates.io | buildxargs |
| lib.rs | buildxargs |
| version | 1.4.0 |
| created_at | 2023-11-20 17:05:54.17108+00 |
| updated_at | 2025-03-20 01:32:40.725835+00 |
| description | xargs for BuildKit with docker buildx bake |
| homepage | |
| repository | https://github.com/fenollp/buildxargs |
| max_upload_size | |
| id | 1042548 |
| size | 43,120 |
xargs for BuildKit with docker buildx bakeAn efficient way of running multiple concurrent docker build jobs on the BuildKit toolkit.
# export DOCKER_HOST=ssh://...
❯ buildxargs <<EOF
docker build --build-arg ARGs='--format mp4 -- https://www.youtube.com/watch?v=Hj7LwZqTflc' --output=~/Videos https://github.com/fenollp/dockerhost-tools.git
docker build -o=. --platform=local --build-arg PREBUILT=1 https://github.com/FuzzyMonkeyCo/monkey.git
docker build --platform=local -o . https://github.com/docker/buildx.git
EOF
This is equivalent to executing the following
❯ export DOCKER_BUILDKIT=1
❯ xargs -P0 -o -I{} {} <<EOF
docker build ...
docker build ...
...
docker build ...
EOF
...docker buildx bake's --help...
--
xargs for BuildKit with docker buildx bake
Usage: buildxargs [BAKE OPTIONS] [OPTIONS]
Options:
--retry <RETRY> Retry each failed build at most this many times [default: 3]
--help Print help
-V, --version Print version
Try:
buildxargs <<EOF
docker build --platform=local -o . https://github.com/docker/buildx.git
docker build --tag my-image:latest https://github.com/bojand/ghz.git
EOF
cargo install --locked --git https://github.com/fenollp/buildxargs
# also: install Docker ≥ 18.09
Related:
xargs toolfmtd and a lib for piping data in & out of docker build tasksOPTIONS:
--attach ssh HOST -t /usr/bin/htop + replay daemon logs
--background Spawns calls using bg daemon and logs text back for log replain